Browse Source

update consistency tooltip

Signed-off-by: shanghaikid <jiangruiyi@gmail.com>
shanghaikid 1 year ago
parent
commit
feacf689d1

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

@@ -120,9 +120,13 @@ const collectionTrans = {
     `,
     `,
 
 
   // column tooltip
   // column tooltip
-  autoIDTooltip: `A boolean flag that indicates whether the primary key is automatically generated by Milvus.`,
+  autoIDTooltip: `The values of the primary key column are automatically generated by Milvus.`,
   dynamicSchemaTooltip: `Dynamic schema enables users to insert entities with new fields into a Milvus collection without modifying the existing schema.`,
   dynamicSchemaTooltip: `Dynamic schema enables users to insert entities with new fields into a Milvus collection without modifying the existing schema.`,
   consistencyLevelTooltip: `Consistency in a distributed database specifically refers to the property that ensures every node or replica has the same view of data when writing or reading data at a given time.`,
   consistencyLevelTooltip: `Consistency in a distributed database specifically refers to the property that ensures every node or replica has the same view of data when writing or reading data at a given time.`,
+  consistencyBoundedTooltip: `It allows data inconsistency during a certain period of time`,
+  consistencyStrongTooltip: `It ensures that users can read the latest version of data.`,
+  consistencySessionTooltip: `It ensures that all data writes can be immediately perceived in reads during the same session.`,
+  consistencyEventuallyTooltip: `There is no guaranteed order of reads and writes, and replicas eventually converge to the same state given that no further write operations are done.`,
 };
 };
 
 
 export default collectionTrans;
 export default collectionTrans;

+ 13 - 2
client/src/pages/collections/Collections.tsx

@@ -94,6 +94,13 @@ const Collections = () => {
   const InfoIcon = icons.info;
   const InfoIcon = icons.info;
   const SourceIcon = icons.source;
   const SourceIcon = icons.source;
 
 
+  const consistencyTooltipsMap: Record<string, string> = {
+    Strong: collectionTrans('consistencyStrongTooltip'),
+    Bounded: collectionTrans('consistencyBoundedTooltip'),
+    Session: collectionTrans('consistencySessionTooltip'),
+    Eventually: collectionTrans('consistencyEventuallyTooltip'),
+  };
+
   const fetchData = useCallback(async () => {
   const fetchData = useCallback(async () => {
     try {
     try {
       setLoading(true);
       setLoading(true);
@@ -144,7 +151,11 @@ const Collections = () => {
         features: (
         features: (
           <>
           <>
             {v._autoId ? (
             {v._autoId ? (
-              <Tooltip title={collectionTrans('autoIDTooltip')} placement="top" arrow>
+              <Tooltip
+                title={collectionTrans('autoIDTooltip')}
+                placement="top"
+                arrow
+              >
                 <Chip
                 <Chip
                   className={classes.chip}
                   className={classes.chip}
                   label={collectionTrans('autoID')}
                   label={collectionTrans('autoID')}
@@ -166,7 +177,7 @@ const Collections = () => {
               </Tooltip>
               </Tooltip>
             ) : null}
             ) : null}
             <Tooltip
             <Tooltip
-              title={collectionTrans('consistencyLevelTooltip')}
+              title={consistencyTooltipsMap[v._consistencyLevel]}
               placement="top"
               placement="top"
               arrow
               arrow
             >
             >

+ 0 - 4
client/src/pages/collections/Constants.ts

@@ -18,10 +18,6 @@ export const CONSISTENCY_LEVEL_OPTIONS: KeyValuePair[] = [
     label: 'Eventually',
     label: 'Eventually',
     value: ConsistencyLevelEnum.Eventually,
     value: ConsistencyLevelEnum.Eventually,
   },
   },
-  {
-    label: 'Customized',
-    value: ConsistencyLevelEnum.Customized,
-  },
 ];
 ];
 
 
 export const VECTOR_FIELDS_OPTIONS: KeyValuePair[] = [
 export const VECTOR_FIELDS_OPTIONS: KeyValuePair[] = [

+ 1 - 1
client/src/pages/collections/Types.ts

@@ -12,7 +12,7 @@ export interface CollectionData {
   _desc: string;
   _desc: string;
   _indexState: ChildrenStatusType;
   _indexState: ChildrenStatusType;
   _fields?: FieldData[];
   _fields?: FieldData[];
-  _consistencyLevel?: string;
+  _consistencyLevel: string;
   _aliases: string[];
   _aliases: string[];
   _replicas: Replica[];
   _replicas: Replica[];
   _enableDynamicField: boolean;
   _enableDynamicField: boolean;