Browse Source

fix overview page on distributed server

Signed-off-by: ryjiang <jiangruiyi@gmail.com>
ryjiang 1 year ago
parent
commit
64006c13f6
1 changed files with 45 additions and 43 deletions
  1. 45 43
      client/src/pages/overview/Overview.tsx

+ 45 - 43
client/src/pages/overview/Overview.tsx

@@ -112,60 +112,62 @@ const Overview = () => {
       </section>
 
       {data?.systemInfo && (
-        <section className={classes.section}>
-          <Typography variant="h4">{overviewTrans('sysInfo')}</Typography>
-          <div className={classes.cardWrapper}>
-            <SysCard
-              title={'Milvus Version'}
-              count={data?.systemInfo?.build_version}
-              link="system"
-            />
-
-            <SysCard
-              title={overviewTrans('deployMode')}
-              count={data?.deployMode}
-              link="system"
-            />
-            <SysCard
-              title={overviewTrans('upTime')}
-              count={duration}
-              link="system"
-            />
-
-            <SysCard
-              title={overviewTrans('users')}
-              count={data?.users?.length}
-              link="users"
-            />
-            <SysCard
-              title={overviewTrans('roles')}
-              count={data?.roles?.length}
-              link="roles"
-            />
-
-            {data?.deployMode === MILVUS_DEPLOY_MODE.DISTRIBUTED ? (
-              <>
+        <>
+          <section className={classes.section}>
+            <Typography variant="h4">{overviewTrans('sysInfo')}</Typography>
+            <div className={classes.cardWrapper}>
+              <SysCard
+                title={'Milvus Version'}
+                count={data?.systemInfo?.build_version}
+                link="system"
+              />
+
+              <SysCard
+                title={overviewTrans('deployMode')}
+                count={data?.deployMode}
+                link="system"
+              />
+              <SysCard
+                title={overviewTrans('upTime')}
+                count={duration}
+                link="system"
+              />
+
+              <SysCard
+                title={overviewTrans('users')}
+                count={data?.users?.length}
+                link="users"
+              />
+              <SysCard
+                title={overviewTrans('roles')}
+                count={data?.roles?.length}
+                link="roles"
+              />
+            </div>
+          </section>
+
+          {data?.deployMode === MILVUS_DEPLOY_MODE.DISTRIBUTED && (
+            <section className={classes.section}>
+              <div className={classes.cardWrapper}>
                 <SysCard
                   title={overviewTrans('dataNodes')}
                   count={data?.dataNodes?.length}
                   link="system"
                 />
-
                 <SysCard
-                  title={overviewTrans('queryNodes')}
-                  count={data?.queryNodes?.length}
+                  title={overviewTrans('indexNodes')}
+                  count={data?.indexNodes?.length}
                   link="system"
                 />
-
                 <SysCard
-                  title={overviewTrans('indexNodes')}
-                  count={data?.indexNodes?.length}
+                  title={overviewTrans('queryNodes')}
+                  count={data?.queryNodes?.length}
                   link="system"
                 />
-              </>
-            ) : null}
-          </div>
-        </section>
+              </div>
+            </section>
+          )}
+        </>
       )}
     </section>
   );