Browse Source

UI update

Signed-off-by: ruiyi.jiang <ruiyi.jiang@zilliz.com>
ruiyi.jiang 1 year ago
parent
commit
00dd60650b

+ 2 - 7
client/src/components/advancedSearch/CopyButton.tsx

@@ -54,7 +54,7 @@ const CopyButton: FC<CopyButtonProps> = props => {
       onClick={event => handleClick(event, value || '')}
       onClick={event => handleClick(event, value || '')}
       {...others}
       {...others}
     >
     >
-      {icon || <CopyIcon style={{ color: 'transparent' }} />}
+      {icon || <CopyIcon  />}
     </CustomIconButton>
     </CustomIconButton>
   );
   );
 };
 };
@@ -64,12 +64,7 @@ CopyButton.displayName = 'CopyButton';
 const useStyles = makeStyles((theme: Theme) =>
 const useStyles = makeStyles((theme: Theme) =>
   createStyles({
   createStyles({
     root: {},
     root: {},
-    button: {
-      '& svg': {
-        width: '16px',
-        height: '16px',
-      },
-    },
+    button: {},
     tooltip: {},
     tooltip: {},
   })
   })
 );
 );

File diff suppressed because it is too large
+ 176 - 30
client/src/components/icons/Icons.tsx


+ 3 - 4
client/src/components/icons/Types.ts

@@ -6,8 +6,6 @@ export type IconsType =
   | 'deleteOutline'
   | 'deleteOutline'
   | 'list'
   | 'list'
   | 'copy'
   | 'copy'
-  | 'visible'
-  | 'invisible'
   | 'error'
   | 'error'
   | 'clear'
   | 'clear'
   | 'app'
   | 'app'
@@ -36,7 +34,6 @@ export type IconsType =
   | 'refresh'
   | 'refresh'
   | 'filter'
   | 'filter'
   | 'copyExpression'
   | 'copyExpression'
-  | 'alias'
   | 'datePicker'
   | 'datePicker'
   | 'download'
   | 'download'
   | 'source'
   | 'source'
@@ -45,4 +42,6 @@ export type IconsType =
   | 'uploadFile'
   | 'uploadFile'
   | 'compact'
   | 'compact'
   | 'saveAs'
   | 'saveAs'
-  | 'settings';
+  | 'settings'
+  | 'avatar'
+  | 'flush';

+ 13 - 3
client/src/components/layout/Header.tsx

@@ -7,7 +7,6 @@ import {
   Typography,
   Typography,
   Tooltip,
   Tooltip,
 } from '@material-ui/core';
 } from '@material-ui/core';
-import AccountCircleIcon from '@material-ui/icons/AccountCircle';
 import { useNavigate } from 'react-router-dom';
 import { useNavigate } from 'react-router-dom';
 import { navContext, dataContext, authContext } from '@/context';
 import { navContext, dataContext, authContext } from '@/context';
 import { MilvusService } from '@/http';
 import { MilvusService } from '@/http';
@@ -42,6 +41,7 @@ const useStyles = makeStyles((theme: Theme) =>
       color: theme.palette.primary.main,
       color: theme.palette.primary.main,
       cursor: 'pointer',
       cursor: 'pointer',
       marginRight: theme.spacing(1),
       marginRight: theme.spacing(1),
+      width: '20px',
     },
     },
     addressWrapper: {
     addressWrapper: {
       display: 'flex',
       display: 'flex',
@@ -82,6 +82,7 @@ const Header: FC<HeaderType> = props => {
   const { t: dbTrans } = useTranslation('database');
   const { t: dbTrans } = useTranslation('database');
   const BackIcon = icons.back;
   const BackIcon = icons.back;
   const LogoutIcon = icons.logout;
   const LogoutIcon = icons.logout;
+  const Avatar = icons.avatar;
 
 
   const handleBack = (path: string) => {
   const handleBack = (path: string) => {
     navigate(path);
     navigate(path);
@@ -135,10 +136,19 @@ const Header: FC<HeaderType> = props => {
           </div>
           </div>
           {username && (
           {username && (
             <Tooltip title={username}>
             <Tooltip title={username}>
-              <AccountCircleIcon classes={{ root: classes.icon }} />
+              <div>
+                <Avatar classes={{ root: classes.icon }} />
+              </div>
             </Tooltip>
             </Tooltip>
           )}
           )}
-          <LogoutIcon classes={{ root: classes.icon }} onClick={handleLogout} />
+          <Tooltip title={''}>
+            <div>
+              <LogoutIcon
+                classes={{ root: classes.icon }}
+                onClick={handleLogout}
+              />
+            </div>
+          </Tooltip>
         </div>
         </div>
       </div>
       </div>
     </header>
     </header>

+ 5 - 21
client/src/components/menu/NavMenu.tsx

@@ -46,38 +46,22 @@ const useStyles = makeStyles((theme: Theme) =>
       width: 'initial',
       width: 'initial',
       color: theme.palette.attuGrey.dark,
       color: theme.palette.attuGrey.dark,
       '&:hover': {
       '&:hover': {
-        backgroundColor: '#e0e0e0',
+        backgroundColor: '#efefef',
       },
       },
     },
     },
     itemIcon: {
     itemIcon: {
-      minWidth: '20px',
+      minWidth: '24px',
       marginRight: theme.spacing(1),
       marginRight: theme.spacing(1),
-
-      '& .icon': {
-        fill: 'transparent',
-
-        '& path': {
-          stroke: theme.palette.attuGrey.dark,
-          strokeWidth: 2,
-        },
-      },
     },
     },
     itemText: {
     itemText: {
       whiteSpace: 'nowrap',
       whiteSpace: 'nowrap',
     },
     },
     active: {
     active: {
-      color: '#000',
-      backgroundColor: '#e0e0e0',
+      color: '#323232',
+      backgroundColor: '#efefef',
 
 
       '& .icon': {
       '& .icon': {
-        stroke: theme.palette.primary.main,
-
-        '& path': {
-          stroke: theme.palette.primary.main,
-        },
-      },
-      '& span': {
-        fontWeight: 'bold',
+        color: theme.palette.primary.main,
       },
       },
     },
     },
 
 

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

@@ -506,7 +506,7 @@ const Collections = () => {
         <span className="flex-center with-max-content">
         <span className="flex-center with-max-content">
           {collectionTrans('rowCount')}
           {collectionTrans('rowCount')}
           <CustomToolTip title={collectionTrans('entityCountInfo')}>
           <CustomToolTip title={collectionTrans('entityCountInfo')}>
-            <InfoIcon classes={{ root: classes.icon }} />
+            <InfoIcon width={15} classes={{ root: classes.icon }} />
           </CustomToolTip>
           </CustomToolTip>
         </span>
         </span>
       ),
       ),
@@ -582,7 +582,7 @@ const Collections = () => {
         <span className="flex-center with-max-content">
         <span className="flex-center with-max-content">
           {collectionTrans('alias')}
           {collectionTrans('alias')}
           <CustomToolTip title={collectionTrans('aliasInfo')}>
           <CustomToolTip title={collectionTrans('aliasInfo')}>
-            <InfoIcon classes={{ root: classes.icon }} />
+            <InfoIcon width={15} classes={{ root: classes.icon }} />
           </CustomToolTip>
           </CustomToolTip>
         </span>
         </span>
       ),
       ),

+ 3 - 0
client/src/pages/databases/tree/index.tsx

@@ -37,6 +37,9 @@ const getExpanded = (nodes: DatabaseTreeItem[]) => {
 
 
 const useStyles = makeStyles((theme: Theme) => ({
 const useStyles = makeStyles((theme: Theme) => ({
   root: {
   root: {
+    '& .MuiTreeItem-iconContainer': {
+      width: 'auto',
+    },
     '& .MuiTreeItem-group': {
     '& .MuiTreeItem-group': {
       marginLeft: 0,
       marginLeft: 0,
       '& .MuiTreeItem-content': {
       '& .MuiTreeItem-content': {

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

@@ -348,7 +348,6 @@ const Query = () => {
                 disabled={!collection.loaded}
                 disabled={!collection.loaded}
               >
               >
                 <ResetIcon classes={{ root: 'icon' }} />
                 <ResetIcon classes={{ root: 'icon' }} />
-                {btnTrans('reset')}
               </CustomButton>
               </CustomButton>
               <CustomButton
               <CustomButton
                 variant="contained"
                 variant="contained"

+ 1 - 18
client/src/pages/query/Styles.ts

@@ -53,27 +53,10 @@ export const getQueryStyles = makeStyles((theme: Theme) => ({
       display: 'flex',
       display: 'flex',
       justifyContent: 'space-between',
       justifyContent: 'space-between',
       alignItems: 'center',
       alignItems: 'center',
-      gap: theme.spacing(2),
+      gap: theme.spacing(1),
     },
     },
   },
   },
   selector: {
   selector: {
     width: 180,
     width: 180,
   },
   },
-  vectorTableCell: {
-    '& >div': {
-      maxWidth: theme.spacing(50),
-      overflow: 'hidden',
-      textOverflow: 'ellipsis',
-    },
-    display: 'flex',
-    flexDirection: 'row',
-    alignItems: 'center',
-  },
-  copyBtn: {
-    padding: '4px',
-    width: '16px',
-    height: '16px',
-    position: 'relative',
-    top: '-3px',
-  },
 }));
 }));

+ 1 - 1
client/src/pages/segments/Segments.tsx

@@ -91,7 +91,7 @@ const Segments = () => {
         });
         });
       },
       },
       label: btnTrans('flush'),
       label: btnTrans('flush'),
-      icon: 'saveAs',
+      icon: 'flush',
     },
     },
     {
     {
       type: 'button',
       type: 'button',

+ 1 - 4
server/src/crons/crons.service.ts

@@ -60,10 +60,7 @@ export class CronsService {
       );
       );
 
 
       if (!currentJob) {
       if (!currentJob) {
-        console.log(
-          `running getCollection task, payload:`,
-          currentJob.data.payload
-        );
+        console.log(`running getCollection task, payload:`, currentJob.data);
         return;
         return;
       }
       }
       try {
       try {

Some files were not shown because too many files changed in this diff