Browse Source

fix tooltip of export button

Signed-off-by: shanghaikid <jiangruiyi@gmail.com>
shanghaikid 2 years ago
parent
commit
ac21d15013
2 changed files with 7 additions and 7 deletions
  1. 3 3
      client/src/i18n/en/collection.ts
  2. 4 4
      client/src/pages/query/Query.tsx

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

@@ -13,7 +13,8 @@ const collectionTrans = {
   alias: 'Alias',
   aliasTooltip: 'Please select one collection to create alias',
   download: 'Download',
-  downloadTooltip: 'Download all query results',
+  downloadTooltip: 'Export all query results to CSV file',
+  downloadDisabledTooltip: 'Please query data before exporting',
 
   collection: 'Collection',
   entites: 'entites',
@@ -91,8 +92,7 @@ const collectionTrans = {
 
   // rename dialog
   newColNamePlaceholder: 'New Collection Name',
-  newNameInfo:
-    'Only numbers, letters, and underscores are allowed.',
+  newNameInfo: 'Only numbers, letters, and underscores are allowed.',
 };
 
 export default collectionTrans;

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

@@ -219,12 +219,12 @@ const Query: FC<{
         const csvData = new Blob([csvDataMemo.toString()], {
           type: 'text/csv;charset=utf-8',
         });
-        saveAs(csvData, 'query_result.csv');
+        saveAs(csvData, 'milvus_query_result.csv');
       },
-      label: collectionTrans('delete'),
+      label: '',
       icon: 'download',
-      tooltip: collectionTrans('download'),
-      disabledTooltip: collectionTrans('downloadTooltip'),
+      tooltip: collectionTrans('downloadTooltip'),
+      disabledTooltip: collectionTrans('downloadDisabledTooltip'),
       disabled: () => !queryResult?.length,
     },
   ];