Browse Source

update some logic

ruiyi.jiang 2 years ago
parent
commit
cf12f1dabc

+ 2 - 1
client/src/components/dialogs/LoadCollectionDialog.tsx

@@ -75,7 +75,8 @@ const LoadCollectionDialog = (props: any) => {
         rootCoord.infos.system_info.deploy_mode ===
         MILVUS_DEPLOY_MODE.DISTRIBUTED;
 
-      if (enableRelica) {
+      // only show replica toggle in distributed mode && query node > 1
+      if (enableRelica && queryNodes.length > 1) {
         setForm({
           replica: queryNodes.length,
         });

+ 1 - 1
client/src/i18n/en/collection.ts

@@ -62,7 +62,7 @@ const collectionTrans = {
   loadConfirmLabel: 'Load',
   replicaNum: 'Replica number',
   replicaDes: `With in-memory replicas, Milvus can load the same segment on multiple query nodes. The replica number can not exceed query node count.`,
-  enableRepica: `Enable in-memory replicas`,
+  enableRepica: `Enable in-memory replica`,
 
   // release dialog
   releaseTitle: 'Release Collection',

+ 8 - 6
client/src/pages/overview/collectionCard/CollectionCard.tsx

@@ -129,12 +129,14 @@ const CollectionCard: FC<CollectionCardProps> = ({
         <RightArrowIcon classes={{ root: classes.icon }} />
       </Link>
       <ul className={classes.content}>
-        <li>
-          <Typography>{collectionTrans('replicaNum')}</Typography>:
-          <Typography className={classes.rowCount}>
-            {_replicas.length}
-          </Typography>
-        </li>
+        {_replicas.length > 1 ? (
+          <li>
+            <Typography>{collectionTrans('replicaNum')}</Typography>:
+            <Typography className={classes.rowCount}>
+              {_replicas.length}
+            </Typography>
+          </li>
+        ) : null}
         <li>
           <Typography>{collectionTrans('rowCount')}</Typography>:
           <Typography className={classes.rowCount}>{rowCount}</Typography>