2
0
ryjiang 2 жил өмнө
parent
commit
f30f5fbb43

+ 1 - 3
client/src/components/customToolTip/CustomToolTip.tsx

@@ -5,9 +5,7 @@ import { makeStyles, Theme, createStyles } from '@material-ui/core';
 
 const useStyles = makeStyles((theme: Theme) =>
   createStyles({
-    tooltip: {
-      textTransform: 'capitalize',
-    },
+    tooltip: {},
   })
 );
 

+ 12 - 1
client/src/http/Collection.ts

@@ -3,7 +3,7 @@ import {
   CollectionView,
   DeleteEntitiesReq,
   InsertDataParam,
-  LoadSampleParam
+  LoadSampleParam,
 } from '../pages/collections/Types';
 import { Field } from '../pages/schema/Types';
 import { VectorSearchParam } from '../types/SearchTypes';
@@ -16,6 +16,7 @@ import dayjs from 'dayjs';
 import { LOADING_STATE } from '../consts/Milvus';
 
 export class CollectionHttp extends BaseModel implements CollectionView {
+  private aliases!: string[];
   private autoID!: string;
   private collection_name!: string;
   private description!: string;
@@ -117,6 +118,12 @@ export class CollectionHttp extends BaseModel implements CollectionView {
     });
   }
 
+  static dropAlias(collectionName: string, params: { alias: string }) {
+    return super.delete({
+      path: `${this.COLLECTIONS_URL}/${collectionName}/alias/${params.alias}`,
+    });
+  }
+
   static queryData(collectionName: string, params: QueryParam) {
     return super.query({
       path: `${this.COLLECTIONS_URL}/${collectionName}/query`,
@@ -128,6 +135,10 @@ export class CollectionHttp extends BaseModel implements CollectionView {
     return this.autoID;
   }
 
+  get _aliases() {
+    return this.aliases;
+  }
+
   get _desc() {
     return this.description || '--';
   }

+ 15 - 10
client/src/i18n/cn/button.ts

@@ -1,22 +1,27 @@
 const btnTrans = {
-  cancel: '取消',
-  save: '保存',
-  reset: '重置',
-  update: '更新',
-  search: '搜索',
-  confirm: '确认',
-  connect: '连接',
-  import: '导入',
-  delete: '删除',
-  release: 'Release',
+  cancel: 'Cancel',
+  save: 'Save',
   create: 'Create',
+  reset: 'Reset',
+  update: 'Update',
+  search: 'Search',
+  confirm: 'Confirm',
+  connect: 'Connect',
+  import: 'Import',
+  delete: 'Delete',
+  drop: 'Drop',
+  release: 'Release',
   load: 'Load',
   insert: 'Import Data',
+  refresh: 'Refresh',
   next: 'Next',
   previous: 'Previous',
   done: 'Done',
   vectorSearch: 'Vector search',
   query: 'Query',
+  importSampleData: 'Import Sample data',
+  loading: 'Loading...',
+  importing: 'Importing...'
 };
 
 export default btnTrans;

+ 25 - 11
client/src/i18n/cn/collection.ts

@@ -2,13 +2,12 @@ const collectionTrans = {
   noLoadData: 'No Loaded Collection',
   noData: 'No Collection',
 
-  rowCount: 'Entity Count',
-  tooltip: 'Approximately entity count.',
+  rowCount: 'Approx Entity Count',
 
   create: 'Create Collection',
   delete: 'delete',
   deleteTooltip: 'Please select at least one item to delete.',
-  alias: 'alias',
+  alias: 'Alias',
   aliasTooltip: 'Please select one collection to create alias',
   download: 'Download',
   downloadTooltip: 'Download all query results',
@@ -19,29 +18,40 @@ const collectionTrans = {
   // table
   id: 'ID',
   name: 'Name',
+  nameTip: 'Collection Name',
   status: 'Status',
   desc: 'Description',
   createdTime: 'Created Time',
   maxLength: 'Max Length',
 
+  // table tooltip
+  aliasInfo: 'Alias can be used as collection name in vector search.',
+  consistencyLevelInfo:
+    'Consistency 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.',
+  entityCountInfo: 'Approximately entity count.',
+
   // create dialog
   createTitle: 'Create Collection',
-  general: '1. General Info',
-  schema: '2. Define Schema',
-  consistency: '3. Consistency Level',
+  general: 'General information',
+  schema: 'Schema',
+  consistency: 'Consistency Level',
   consistencyLevel: 'Consistency Level',
-  description: 'Description (Optional)',
+  description: 'Description',
   fieldType: 'Field Type',
   vectorFieldType: 'Vector Field Type',
   fieldName: 'Field Name',
+  idFieldName: 'ID Name',
+  vectorFieldName: 'Vector Name',
   autoId: 'Auto ID',
+  vectorType: 'Vector Type',
+  idType: 'ID Type',
   dimension: 'Dimension',
   dimensionTooltip: 'Only vector type has dimension',
   dimensionMutipleWarning: 'Dimension should be 8 multiple',
-  dimensionPositiveWarning: 'Dimension should be positive number',
+  dimensionPositiveWarning: 'Positive number only',
   newBtn: 'add new field',
   nameLengthWarning: 'Name length should be less than 256',
-  nameContentWarning: 'Only numbers, letters, and underscores are allowed',
+  nameContentWarning: 'Only numbers, letters, and underscores are allowed.',
   nameFirstLetterWarning:
     'Name first character must be underscore or character(a~z, A~Z)',
 
@@ -58,16 +68,20 @@ const collectionTrans = {
   releaseConfirmLabel: 'Release',
 
   // delete dialog
-  deleteWarning:
-    'You are trying to delete a collection with data. This action cannot be undone.',
+  deleteWarning: `You are trying to delete a collection with data. This action cannot be undone.`,
   deleteDataWarning: `You are trying to delete entites. This action cannot be undone.`,
+  deleteAliasWarning: `You are trying to drop an alias. This action cannot be undone.`,
 
   // collection tabs
   partitionTab: 'Partitions',
   schemaTab: 'Schema',
   queryTab: 'Data Query',
+  previewTab: 'Data Preview',
   startTip: 'Start your data query',
   exprPlaceHolder: 'Please enter your query by using advanced filter ->',
+
+  // alias dialog
+  aliasCreatePlaceholder: 'Alias name',
 };
 
 export default collectionTrans;

+ 1 - 2
client/src/i18n/cn/common.ts

@@ -8,7 +8,7 @@ const commonTrans = {
     ssl: 'SSL',
   },
   status: {
-    loaded: 'loaded for search',
+    loaded: 'loaded',
     unloaded: 'unloaded',
     error: 'error',
     running: 'running',
@@ -42,7 +42,6 @@ const commonTrans = {
     join: 'Join our growing social community today',
     get: 'Get insight, tips and share ideas',
   },
-
   capacity: {
     b: 'B',
     kb: 'KB',

+ 2 - 3
client/src/i18n/cn/dialog.ts

@@ -1,10 +1,9 @@
 const dialogTrans = {
   deleteTipAction: 'Type',
   deleteTipPurpose: 'to confirm.',
-  deleteTitle: `Delete {{type}}`,
-  createAlias: `Create alias for {{type}}`,
-
+  deleteTitle: `Drop {{type}}`,
   releaseTitle: `Release {{type}}`,
+  createAlias: `Create alias for {{type}}`,
   loadTitle: `Load {{type}}`,
 
   loadContent: `You are trying to load a {{type}} with data. Only loaded {{type}} can be searched.`,

+ 3 - 2
client/src/i18n/cn/index.ts

@@ -1,13 +1,14 @@
 const indexTrans = {
   type: 'Index Type',
   param: 'Index Parameters',
-  create: 'Create Index',
 
+  create: 'Create Index',
   index: 'Index',
-  metric: 'Metric Type',
   desc: 'Description',
+
   creating: 'Creating Index',
 
+  metric: 'Metric Type',
   createSuccess: 'Start creating index',
   deleteWarning:
     'You are trying to delete an index. This action cannot be undone.',

+ 5 - 0
client/src/i18n/cn/insert.ts

@@ -19,6 +19,7 @@ const insertTrans = {
     'Uploaded data column count is not equal to schema count',
   uploadAutoIdFieldWarning:
     'AutoId field ({{fieldName}}) does not require data',
+
   previewTipData: 'Data Preview(Top 4 rows shown)',
   previewTipAction: '*Change header cell selector value to edit field name',
   requiredFieldName: 'Field Name*',
@@ -27,6 +28,10 @@ const insertTrans = {
   statusLoadingTip: 'Please wait patiently, thank you',
   statusSuccess: 'Import Data Successfully!',
   statusError: 'Import Data Failed!',
+
+  importSampleData: 'Import sample data into {{collection}}',
+  sampleDataSize: 'Choose sample data size',
+  importSampleDataDesc: `Import random data based on the collection's schema.`
 };
 
 export default insertTrans;

+ 2 - 2
client/src/i18n/cn/partition.ts

@@ -8,7 +8,7 @@ const partitionTrans = {
   name: 'Name',
   createdTime: 'Created Time',
   status: 'Status',
-  rowCount: 'Entity Count',
+  rowCount: 'Approx Entity Count',
   tooltip: 'Approximately entity count.',
 
   createTitle: 'Create Partition',
@@ -16,7 +16,7 @@ const partitionTrans = {
 
   deleteWarning:
     'You are trying to delete partition. This action cannot be undone.',
-  deletePartitionError: 'default partition cannot be deleted',
+  deletePartitionError: 'default partition cannot be dropped',
 };
 
 export default partitionTrans;

+ 1 - 2
client/src/i18n/cn/search.ts

@@ -11,8 +11,7 @@ const searchTrans = {
   result: 'Search Results',
   topK: 'TopK {{number}}',
   filter: 'Advanced Filter',
-  vectorValueWarning:
-    'Vector value should be an array of length {{dimension}}(dimension)',
+  vectorValueWarning: 'Vector value should be an array of length {{dimension}}',
   timeTravel: 'Time Travel',
   timeTravelPrefix: 'Data before',
 };

+ 2 - 1
client/src/i18n/cn/success.ts

@@ -2,8 +2,9 @@ const successTrans = {
   connect: 'Connection to milvus successful',
   create: `{{name}} has been created`,
   load: `{{name}} has been loaded`,
-  delete: `Delete {{name}} successfully`,
+  delete: `{{name}} successfully dropped`,
   release: `{{name}} has been released`,
+  update: `{{name}} has been updated`,
 };
 
 export default successTrans;

+ 1 - 1
client/src/i18n/cn/user.ts

@@ -7,7 +7,7 @@ const userTrans = {
   newPassword: 'New Password',
   confirmPassword: 'Confirm Password',
   update: 'Update password',
-  isNotSame: 'Confirm password is not same as new password',
+  isNotSame: 'Not same as new password',
   deleteTip:
     'Please select at least one item to delete and root can not be deleted.',
 };

+ 2 - 1
client/src/i18n/cn/warning.ts

@@ -1,8 +1,9 @@
 const warningTrans = {
   required: '{{name}} is required',
+  requiredOnly: 'Required',
   positive: '{{name}} should be positive',
   integer: '{{name}} should be integers',
-  range: 'range is {{min}} ~ {{max}}',
+  range: 'Range is {{min}} ~ {{max}}',
   specValueOrRange:
     '{{name}} should be {{specValue}}, or in range {{min}} ~ {{max}}',
   noSupportIndexType:

+ 1 - 0
client/src/i18n/en/button.ts

@@ -9,6 +9,7 @@ const btnTrans = {
   connect: 'Connect',
   import: 'Import',
   delete: 'Delete',
+  drop: 'Drop',
   release: 'Release',
   load: 'Load',
   insert: 'Import Data',

+ 12 - 3
client/src/i18n/en/collection.ts

@@ -2,13 +2,12 @@ const collectionTrans = {
   noLoadData: 'No Loaded Collection',
   noData: 'No Collection',
 
-  rowCount: 'Entity Count',
-  tooltip: 'Approximately entity count.',
+  rowCount: 'Approx Entity Count',
 
   create: 'Create Collection',
   delete: 'delete',
   deleteTooltip: 'Please select at least one item to delete.',
-  alias: 'alias',
+  alias: 'Alias',
   aliasTooltip: 'Please select one collection to create alias',
   download: 'Download',
   downloadTooltip: 'Download all query results',
@@ -25,6 +24,12 @@ const collectionTrans = {
   createdTime: 'Created Time',
   maxLength: 'Max Length',
 
+  // table tooltip
+  aliasInfo: 'Alias can be used as collection name in vector search.',
+  consistencyLevelInfo:
+    'Consistency 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.',
+  entityCountInfo: 'Approximately entity count.',
+
   // create dialog
   createTitle: 'Create Collection',
   general: 'General information',
@@ -65,6 +70,7 @@ const collectionTrans = {
   // delete dialog
   deleteWarning: `You are trying to delete a collection with data. This action cannot be undone.`,
   deleteDataWarning: `You are trying to delete entites. This action cannot be undone.`,
+  deleteAliasWarning: `You are trying to drop an alias. This action cannot be undone.`,
 
   // collection tabs
   partitionTab: 'Partitions',
@@ -73,6 +79,9 @@ const collectionTrans = {
   previewTab: 'Data Preview',
   startTip: 'Start your data query',
   exprPlaceHolder: 'Please enter your query by using advanced filter ->',
+
+  // alias dialog
+  aliasCreatePlaceholder: 'Alias name',
 };
 
 export default collectionTrans;

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

@@ -8,7 +8,7 @@ const commonTrans = {
     ssl: 'SSL',
   },
   status: {
-    loaded: 'loaded for search',
+    loaded: 'loaded',
     unloaded: 'unloaded',
     error: 'error',
     running: 'running',

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

@@ -1,7 +1,7 @@
 const dialogTrans = {
   deleteTipAction: 'Type',
   deleteTipPurpose: 'to confirm.',
-  deleteTitle: `Delete {{type}}`,
+  deleteTitle: `Drop {{type}}`,
   releaseTitle: `Release {{type}}`,
   createAlias: `Create alias for {{type}}`,
   loadTitle: `Load {{type}}`,

+ 2 - 2
client/src/i18n/en/partition.ts

@@ -8,7 +8,7 @@ const partitionTrans = {
   name: 'Name',
   createdTime: 'Created Time',
   status: 'Status',
-  rowCount: 'Entity Count',
+  rowCount: 'Approx Entity Count',
   tooltip: 'Approximately entity count.',
 
   createTitle: 'Create Partition',
@@ -16,7 +16,7 @@ const partitionTrans = {
 
   deleteWarning:
     'You are trying to delete partition. This action cannot be undone.',
-  deletePartitionError: 'default partition cannot be deleted',
+  deletePartitionError: 'default partition cannot be dropped',
 };
 
 export default partitionTrans;

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

@@ -2,7 +2,7 @@ const successTrans = {
   connect: 'Connection to milvus successful',
   create: `{{name}} has been created`,
   load: `{{name}} has been loaded`,
-  delete: `{{name}} successfully deleted`,
+  delete: `{{name}} successfully dropped`,
   release: `{{name}} has been released`,
   update: `{{name}} has been updated`,
 };

+ 132 - 0
client/src/pages/collections/Aliases.tsx

@@ -0,0 +1,132 @@
+import { useContext } from 'react';
+import { Chip, IconButton, makeStyles, Theme } from '@material-ui/core';
+import { useTranslation } from 'react-i18next';
+import { rootContext } from '../../context/Root';
+import { AliasesProps } from './Types';
+import icons from '../../components/icons/Icons';
+import DeleteIcon from '@material-ui/icons/Delete';
+import CreateAlias from './CreateAlias';
+import DeleteTemplate from '../../components/customDialog/DeleteDialogTemplate';
+import { CollectionHttp } from '../../http/Collection';
+
+const useStyles = makeStyles((theme: Theme) => ({
+  wrapper: {
+    display: 'flex',
+    flexWrap: 'wrap',
+    gap: 8,
+  },
+  iconBtn: {
+    marginTop: 4,
+    width: '16px',
+    height: '16px',
+  },
+}));
+
+export default function Aliases(props: AliasesProps) {
+  const {
+    aliases,
+    collectionName,
+    onCreate = () => {},
+    onDelete = () => {},
+  } = props;
+  const classes = useStyles();
+  const { setDialog, openSnackBar, handleCloseDialog } =
+    useContext(rootContext);
+  // i18n
+  const { t: btnTrans } = useTranslation('btn');
+  const { t: dialogTrans } = useTranslation('dialog');
+  const { t: collectionTrans } = useTranslation('collection');
+  const { t: successTrans } = useTranslation('success');
+
+  const AddIcon = icons.add;
+
+  const handleCreate = (e: React.MouseEvent) => {
+    setDialog({
+      open: true,
+      type: 'custom',
+      params: {
+        component: (
+          <CreateAlias
+            collectionName={collectionName}
+            cb={() => {
+              onCreate();
+            }}
+          />
+        ),
+      },
+    });
+    e.stopPropagation();
+  };
+
+  if (aliases.length === 0) {
+    return (
+      <>
+        <IconButton
+          onClick={handleCreate}
+          size="small"
+          classes={{ root: classes.iconBtn }}
+          aria-label="add"
+        >
+          <AddIcon width="8" height="8" fontSize="small" />
+        </IconButton>
+      </>
+    );
+  }
+
+  const handleDelete = async (params: {
+    collection: string;
+    alias: string;
+  }) => {
+    await CollectionHttp.dropAlias(params.collection, { alias: params.alias });
+    openSnackBar(successTrans('delete', { name: collectionTrans('alias') }));
+    handleCloseDialog();
+    onDelete();
+  };
+
+  const _onDelete = (alias: { collection: string; alias: string }) => {
+    setDialog({
+      open: true,
+      type: 'custom',
+      params: {
+        component: (
+          <DeleteTemplate
+            label={btnTrans('drop')}
+            title={dialogTrans('deleteTitle', {
+              type: collectionTrans('alias'),
+            })}
+            text={collectionTrans('deleteAliasWarning')}
+            handleDelete={() => handleDelete(alias)}
+          />
+        ),
+      },
+    });
+  };
+
+  return (
+    <div className={classes.wrapper}>
+      {aliases.map(a => (
+        <Chip
+          key={a}
+          size="small"
+          label={a}
+          variant="outlined"
+          deleteIcon={<DeleteIcon />}
+          onClick={(e: React.MouseEvent) => {
+            e.stopPropagation();
+          }}
+          onDelete={() => {
+            _onDelete({ collection: collectionName, alias: a });
+          }}
+        />
+      ))}
+      <IconButton
+        onClick={handleCreate}
+        size="small"
+        classes={{ root: classes.iconBtn }}
+        aria-label="add"
+      >
+        <AddIcon width="8" height="8" fontSize="small" />
+      </IconButton>
+    </div>
+  );
+}

+ 40 - 34
client/src/pages/collections/Collections.tsx

@@ -37,7 +37,7 @@ import { LOADING_STATE } from '../../consts/Milvus';
 import { webSokcetContext } from '../../context/WebSocket';
 import { WS_EVENTS, WS_EVENTS_TYPE } from '../../consts/Http';
 import { checkIndexBuilding, checkLoading } from '../../utils/Validation';
-// import CreateAlias from './CreateAlias';
+import Aliases from './Aliases';
 
 const useStyles = makeStyles((theme: Theme) => ({
   emptyWrapper: {
@@ -138,6 +138,14 @@ const Collections = () => {
         indexCreatingElement: (
           <StatusIcon type={v._indexState || ChildrenStatusType.FINISH} />
         ),
+        _aliasElement: (
+          <Aliases
+            aliases={v._aliases}
+            collectionName={v._name}
+            onCreate={fetchData}
+            onDelete={fetchData}
+          />
+        ),
       });
       return v;
     });
@@ -329,7 +337,7 @@ const Collections = () => {
           params: {
             component: (
               <DeleteTemplate
-                label={btnTrans('delete')}
+                label={btnTrans('drop')}
                 title={dialogTrans('deleteTitle', {
                   type: collectionTrans('collection'),
                 })}
@@ -346,30 +354,7 @@ const Collections = () => {
       disabledTooltip: collectionTrans('deleteTooltip'),
       disabled: data => data.length === 0,
     },
-    // Todo: hide alias after we can get all alias from milvus.
-    // {
-    //   type: 'iconBtn',
-    //   onClick: () => {
-    //     setDialog({
-    //       open: true,
-    //       type: 'custom',
-    //       params: {
-    //         component: (
-    //           <CreateAlias
-    //             collectionName={selectedCollections[0]._name}
-    //             cb={() => {
-    //               setSelectedCollections([]);
-    //             }}
-    //           />
-    //         ),
-    //       },
-    //     });
-    //   },
-    //   label: collectionTrans('alias'),
-    //   icon: 'alias',
-    //   disabledTooltip: collectionTrans('aliasTooltip'),
-    //   disabled: data => data.length !== 1,
-    // },
+
     {
       label: 'Search',
       icon: 'search',
@@ -402,7 +387,20 @@ const Collections = () => {
       label: (
         <span className="flex-center">
           {collectionTrans('rowCount')}
-          <CustomToolTip title={collectionTrans('tooltip')}>
+          <CustomToolTip title={collectionTrans('entityCountInfo')}>
+            <InfoIcon classes={{ root: classes.icon }} />
+          </CustomToolTip>
+        </span>
+      ),
+    },
+    {
+      id: '_aliasElement',
+      align: 'left',
+      disablePadding: false,
+      label: (
+        <span className="flex-center">
+          {collectionTrans('alias')}
+          <CustomToolTip title={collectionTrans('aliasInfo')}>
             <InfoIcon classes={{ root: classes.icon }} />
           </CustomToolTip>
         </span>
@@ -412,8 +410,16 @@ const Collections = () => {
       id: 'consistency_level',
       align: 'left',
       disablePadding: false,
-      label: collectionTrans('consistencyLevel'),
+      label: (
+        <span className="flex-center">
+          {collectionTrans('consistencyLevel')}
+          <CustomToolTip title={collectionTrans('consistencyLevelInfo')}>
+            <InfoIcon classes={{ root: classes.icon }} />
+          </CustomToolTip>
+        </span>
+      ),
     },
+
     {
       id: '_desc',
       align: 'left',
@@ -426,12 +432,12 @@ const Collections = () => {
       disablePadding: false,
       label: collectionTrans('createdTime'),
     },
-    {
-      id: 'indexCreatingElement',
-      align: 'left',
-      disablePadding: false,
-      label: '',
-    },
+    // {
+    //   id: 'indexCreatingElement',
+    //   align: 'left',
+    //   disablePadding: false,
+    //   label: '',
+    // },
     {
       id: 'action',
       align: 'center',

+ 24 - 11
client/src/pages/collections/CreateAlias.tsx

@@ -1,10 +1,8 @@
 import { FC, useContext, useMemo, useState } from 'react';
-
+import { Typography, makeStyles, Theme } from '@material-ui/core';
 import { useTranslation } from 'react-i18next';
 import { rootContext } from '../../context/Root';
-
 import DialogTemplate from '../../components/customDialog/DialogTemplate';
-
 import CustomInput from '../../components/customInput/CustomInput';
 import { formatForm } from '../../utils/Form';
 import { useFormValidation } from '../../hooks/Form';
@@ -12,12 +10,20 @@ import { ITextfieldConfig } from '../../components/customInput/Types';
 import { CollectionHttp } from '../../http/Collection';
 import { CreateAliasProps } from './Types';
 
+const useStyles = makeStyles((theme: Theme) => ({
+  desc: {
+    margin: '8px 0 16px 0',
+  },
+}));
+
 const CreateAlias: FC<CreateAliasProps> = props => {
   const { cb, collectionName } = props;
   const [form, setForm] = useState({
     alias: '',
   });
 
+  const classes = useStyles();
+
   const checkedForm = useMemo(() => {
     const { alias } = form;
     return formatForm({ alias });
@@ -29,6 +35,7 @@ const CreateAlias: FC<CreateAliasProps> = props => {
   const { t: dialogTrans } = useTranslation('dialog');
   const { t: warningTrans } = useTranslation('warning');
   const { t: collectionTrans } = useTranslation('collection');
+  const { t: btnTrans } = useTranslation('btn');
 
   const handleInputChange = (value: string) => {
     setForm({ alias: value });
@@ -41,11 +48,11 @@ const CreateAlias: FC<CreateAliasProps> = props => {
   };
 
   const aliasInputConfig: ITextfieldConfig = {
-    label: 'Collection Alias',
+    label: collectionTrans('alias'),
     key: 'alias',
     onChange: handleInputChange,
     variant: 'filled',
-    placeholder: 'alias name',
+    placeholder: collectionTrans('aliasCreatePlaceholder'),
     fullWidth: true,
     validations: [
       {
@@ -68,13 +75,19 @@ const CreateAlias: FC<CreateAliasProps> = props => {
       })}
       handleClose={handleCloseDialog}
       children={
-        <CustomInput
-          type="text"
-          textConfig={aliasInputConfig}
-          checkValid={checkIsValid}
-          validInfo={validation}
-        />
+        <>
+          <Typography variant="body1" component="p" className={classes.desc}>
+            {collectionTrans('aliasInfo')}
+          </Typography>
+          <CustomInput
+            type="text"
+            textConfig={aliasInputConfig}
+            checkValid={checkIsValid}
+            validInfo={validation}
+          />
+        </>
       }
+      confirmLabel={btnTrans('create')}
       handleConfirm={handleConfirm}
       confirmDisabled={disabled}
     />

+ 8 - 0
client/src/pages/collections/Types.ts

@@ -13,6 +13,7 @@ export interface CollectionData {
   _indexState: ChildrenStatusType;
   _fields?: FieldData[];
   _consistencyLevel?: string;
+  _aliases: string[];
 }
 
 export interface CollectionView extends CollectionData {
@@ -120,3 +121,10 @@ export interface DeleteEntitiesReq {
   expr: string;
   partition_name?: string;
 }
+
+export interface AliasesProps {
+  aliases: string[];
+  collectionName: string;
+  onCreate?: Function;
+  onDelete?: Function;
+}

+ 1 - 1
client/src/pages/overview/collectionCard/CollectionCard.tsx

@@ -117,7 +117,7 @@ const CollectionCard: FC<CollectionCardProps> = ({
       </Link>
       <div className={classes.content}>
         <Typography>{collectionTrans('rowCount')}</Typography>
-        <CustomToolTip title={collectionTrans('tooltip')} placement="bottom">
+        <CustomToolTip title={collectionTrans('entityCountInfo')} placement="bottom">
           <InfoIcon classes={{ root: classes.icon }} />
         </CustomToolTip>
         <Typography className={classes.rowCount}>{rowCount}</Typography>

+ 1 - 1
client/src/pages/partitions/Partitions.tsx

@@ -228,7 +228,7 @@ const Partitions: FC<{
           params: {
             component: (
               <DeleteTemplate
-                label={btnTrans('delete')}
+                label={btnTrans('drop')}
                 title={dialogTrans('deleteTitle', { type: t('partition') })}
                 text={t('deleteWarning')}
                 handleDelete={handleDelete}

+ 1 - 1
client/src/pages/query/Query.tsx

@@ -181,7 +181,7 @@ const Query: FC<{
           params: {
             component: (
               <DeleteTemplate
-                label={btnTrans('delete')}
+                label={btnTrans('drop')}
                 title={dialogTrans('deleteTitle', {
                   type: collectionTrans('entites'),
                 })}

+ 1 - 1
client/src/pages/schema/IndexTypeElement.tsx

@@ -183,7 +183,7 @@ const IndexTypeElement: FC<{
       params: {
         component: (
           <DeleteTemplate
-            label={btnTrans('delete')}
+            label={btnTrans('drop')}
             title={dialogTrans('deleteTitle', { type: indexTrans('index') })}
             text={indexTrans('deleteWarning')}
             handleDelete={requestDeleteIndex}

+ 11 - 0
server/src/collections/collections.controller.ts

@@ -47,6 +47,7 @@ export class CollectionController {
     );
 
     this.router.delete('/:name', this.dropCollection.bind(this));
+    this.router.delete('/:name/alias/:alias', this.dropAlias.bind(this));
 
     this.router.get('/:name', this.describeCollection.bind(this));
 
@@ -294,4 +295,14 @@ export class CollectionController {
       next(error);
     }
   }
+
+  async dropAlias(req: Request, res: Response, next: NextFunction) {
+    const alias = req.params?.alias;
+    try {
+      const result = await this.collectionsService.dropAlias({ alias });
+      res.send(result);
+    } catch (error) {
+      next(error);
+    }
+  }
 }

+ 1 - 0
server/src/collections/collections.service.ts

@@ -176,6 +176,7 @@ export class CollectionsService {
           : loadCollection.loadedPercentage;
 
         data.push({
+          aliases: collectionInfo.aliases,
           collection_name: name,
           schema: collectionInfo.schema,
           description: collectionInfo.schema.description,