Browse Source

adjust UI style (#404)

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

+ 1 - 1
client/src/components/customTabList/CustomTabList.tsx

@@ -19,7 +19,7 @@ const useStyles = makeStyles((theme: Theme) => ({
     backgroundColor: theme.palette.primary.main,
     backgroundColor: theme.palette.primary.main,
   },
   },
   tabContainer: {
   tabContainer: {
-    borderBottom: '1px solid #e9e9ed',
+    borderBottom: '1px solid #e0e0e0',
   },
   },
   tabContent: {
   tabContent: {
     minWidth: 0,
     minWidth: 0,

+ 6 - 3
client/src/components/customTabList/RouteTabList.tsx

@@ -11,16 +11,19 @@ const useStyles = makeStyles((theme: Theme) => ({
     flexGrow: 1,
     flexGrow: 1,
     '& .MuiTab-wrapper': {
     '& .MuiTab-wrapper': {
       textTransform: 'capitalize',
       textTransform: 'capitalize',
-      fontWeight: 'bold',
+      fontWeight: 'normal',
       color: '#323232',
       color: '#323232',
     },
     },
+    background: '#fff',
+    border: '1px solid #e9e9ed',
+    padding: theme.spacing(0, 1),
   },
   },
   tab: {
   tab: {
     height: theme.spacing(0.5),
     height: theme.spacing(0.5),
     backgroundColor: theme.palette.primary.main,
     backgroundColor: theme.palette.primary.main,
   },
   },
   tabContainer: {
   tabContainer: {
-    borderBottom: '1px solid #e9e9ed',
+    borderBottom: '1px solid #e0e0e0',
   },
   },
   tabContent: {
   tabContent: {
     minWidth: 0,
     minWidth: 0,
@@ -29,7 +32,7 @@ const useStyles = makeStyles((theme: Theme) => ({
   tabPanel: {
   tabPanel: {
     flexBasis: 0,
     flexBasis: 0,
     flexGrow: 1,
     flexGrow: 1,
-    marginTop: theme.spacing(2),
+    marginTop: theme.spacing(1),
     overflow: 'hidden',
     overflow: 'hidden',
   },
   },
 }));
 }));

+ 7 - 4
client/src/components/layout/Header.tsx

@@ -21,14 +21,17 @@ const useStyles = makeStyles((theme: Theme) =>
       display: 'flex',
       display: 'flex',
       alignItems: 'center',
       alignItems: 'center',
       color: theme.palette.common.black,
       color: theme.palette.common.black,
-      marginRight: theme.spacing(5),
+      paddingRight: theme.spacing(1),
+      paddingBottom: theme.spacing(1),
+      backgroundColor: '#fff',
+      borderBottom: '1px solid #e0e0e0',
     },
     },
     contentWrapper: {
     contentWrapper: {
       display: 'flex',
       display: 'flex',
       justifyContent: 'space-between',
       justifyContent: 'space-between',
       alignItems: 'center',
       alignItems: 'center',
-      paddingTop: theme.spacing(3),
-      paddingLeft: theme.spacing(3),
+      paddingTop: theme.spacing(1),
+      paddingLeft: theme.spacing(2),
       flex: 1,
       flex: 1,
     },
     },
     navigation: {
     navigation: {
@@ -45,7 +48,7 @@ const useStyles = makeStyles((theme: Theme) =>
       alignItems: 'center',
       alignItems: 'center',
 
 
       '& .text': {
       '& .text': {
-        marginRight: theme.spacing(3),
+        marginRight: theme.spacing(2),
 
 
         '& .address': {
         '& .address': {
           fontSize: '14px',
           fontSize: '14px',

+ 4 - 4
client/src/components/menu/NavMenu.tsx

@@ -20,7 +20,7 @@ const duration = `${timeout}ms`;
 const useStyles = makeStyles((theme: Theme) =>
 const useStyles = makeStyles((theme: Theme) =>
   createStyles({
   createStyles({
     root: {
     root: {
-      borderRight: '1px solid #efefef',
+      borderRight: '1px solid #e0e0e0',
       background: '#fff',
       background: '#fff',
       paddingTop: 0,
       paddingTop: 0,
       paddingBottom: theme.spacing(4),
       paddingBottom: theme.spacing(4),
@@ -48,7 +48,7 @@ const useStyles = makeStyles((theme: Theme) =>
       width: 'initial',
       width: 'initial',
       color: theme.palette.attuGrey.dark,
       color: theme.palette.attuGrey.dark,
       '&:hover': {
       '&:hover': {
-        backgroundColor: '#efefef',
+        backgroundColor: '#e0e0e0',
       },
       },
     },
     },
     itemIcon: {
     itemIcon: {
@@ -69,7 +69,7 @@ const useStyles = makeStyles((theme: Theme) =>
     },
     },
     active: {
     active: {
       color: '#000',
       color: '#000',
-      backgroundColor: '#efefef',
+      backgroundColor: '#e0e0e0',
 
 
       '& .icon': {
       '& .icon': {
         stroke: theme.palette.primary.main,
         stroke: theme.palette.primary.main,
@@ -113,7 +113,7 @@ const useStyles = makeStyles((theme: Theme) =>
       position: 'fixed',
       position: 'fixed',
       borderRadius: '50%',
       borderRadius: '50%',
       backgroundColor: 'white',
       backgroundColor: 'white',
-      top: '64px',
+      top: '24px',
       transition: theme.transitions.create('all', {
       transition: theme.transitions.create('all', {
         duration,
         duration,
       }),
       }),

+ 1 - 1
client/src/pages/collections/Collection.tsx

@@ -15,7 +15,7 @@ import Segments from '../segments/Segments';
 const useStyles = makeStyles((theme: Theme) => ({
 const useStyles = makeStyles((theme: Theme) => ({
   wrapper: {
   wrapper: {
     flexDirection: 'row',
     flexDirection: 'row',
-    gap: theme.spacing(4),
+    gap: theme.spacing(2),
   },
   },
   card: {
   card: {
     boxShadow: 'none',
     boxShadow: 'none',

+ 2 - 4
client/src/pages/system/BaseCard.tsx

@@ -2,13 +2,11 @@ import { FC } from 'react';
 import { makeStyles } from '@material-ui/core';
 import { makeStyles } from '@material-ui/core';
 import { SvgIcon } from '@material-ui/core';
 import { SvgIcon } from '@material-ui/core';
 import { BaseCardProps } from './Types';
 import { BaseCardProps } from './Types';
-import { ReactComponent } from '../../assets/imgs/pic.svg';
+import pic from '../../assets/imgs/pic.svg?react';
 
 
 const getStyles = makeStyles(theme => ({
 const getStyles = makeStyles(theme => ({
   root: {
   root: {
     backgroundColor: 'white',
     backgroundColor: 'white',
-    borderRadius: '8px',
-    boxShadow: '3px 3px 10px rgba(0, 0, 0, 0.05)',
     boxSizing: 'border-box',
     boxSizing: 'border-box',
     height: '150px',
     height: '150px',
     padding: theme.spacing(2),
     padding: theme.spacing(2),
@@ -64,7 +62,7 @@ const BaseCard: FC<BaseCardProps> = props => {
       {desc && <span className={classes.desc}>{desc}</span>}
       {desc && <span className={classes.desc}>{desc}</span>}
       {!content && !desc && (
       {!content && !desc && (
         <div className={classes.emptyRoot}>
         <div className={classes.emptyRoot}>
-          <SvgIcon viewBox="0 0 101 26" component={ReactComponent} {...props} />
+          <SvgIcon viewBox="0 0 101 26" component={pic} {...props} />
           <span className={classes.emptyTitle}>no data available</span>
           <span className={classes.emptyTitle}>no data available</span>
           <span className={classes.emptyDesc}>
           <span className={classes.emptyDesc}>
             There is no data to show you right now.
             There is no data to show you right now.

+ 0 - 2
client/src/pages/system/DataCard.tsx

@@ -8,8 +8,6 @@ import { DataProgressProps, DataSectionProps, DataCardProps } from './Types';
 const getStyles = makeStyles(theme => ({
 const getStyles = makeStyles(theme => ({
   root: {
   root: {
     backgroundColor: '#F6F6F6',
     backgroundColor: '#F6F6F6',
-    borderTopRightRadius: '8px',
-    borderBottomRightRadius: '8px',
     height: '100%',
     height: '100%',
     padding: theme.spacing(1.5, 2),
     padding: theme.spacing(1.5, 2),
     boxSizing: 'border-box',
     boxSizing: 'border-box',

+ 0 - 2
client/src/pages/system/NodeListView.tsx

@@ -26,8 +26,6 @@ const getStyles = makeStyles((theme: Theme) => ({
     gridTemplateColumns: 'repeat(4, minmax(300px, 1fr))',
     gridTemplateColumns: 'repeat(4, minmax(300px, 1fr))',
   },
   },
   contentContainer: {
   contentContainer: {
-    borderRadius: '8px',
-    boxShadow: '3px 3px 10px rgba(0, 0, 0, 0.05)',
     display: 'grid',
     display: 'grid',
     marginTop: '14px',
     marginTop: '14px',
   },
   },

+ 1 - 23
client/src/pages/system/SystemView.tsx

@@ -14,7 +14,7 @@ import DataCard from './DataCard';
 
 
 const getStyles = makeStyles((theme: Theme) => ({
 const getStyles = makeStyles((theme: Theme) => ({
   root: {
   root: {
-    margin: '12px 24px',
+    margin: '16px',
     position: 'relative',
     position: 'relative',
     height: 'fit-content',
     height: 'fit-content',
     display: 'flex',
     display: 'flex',
@@ -30,8 +30,6 @@ const getStyles = makeStyles((theme: Theme) => ({
     transition: 'opacity .5s',
     transition: 'opacity .5s',
   },
   },
   contentContainer: {
   contentContainer: {
-    borderRadius: '8px',
-    boxShadow: '3px 3px 10px rgba(0, 0, 0, 0.05)',
     display: 'grid',
     display: 'grid',
     gridTemplateColumns: '1fr auto',
     gridTemplateColumns: '1fr auto',
     marginTop: '14px',
     marginTop: '14px',
@@ -102,26 +100,6 @@ const SystemView: any = () => {
 
 
   return (
   return (
     <div className={classes.root}>
     <div className={classes.root}>
-      {/* hide cards until metrics api can provide enough data*/}
-      {/* <div
-        className={clsx(
-          classes.cardContainer,
-          selectedCord && classes.transparent
-        )}
-      >
-        <ProgressCard
-          title={t('diskTitle')}
-          usage={system.diskUsage}
-          total={system.disk}
-        />
-        <ProgressCard
-          title={t('memoryTitle')}
-          usage={system.memoryUsage}
-          total={system.memory}
-        />
-        <LineChartCard title={t('qpsTitle')} value={qps} />
-        <LineChartCard title={t('latencyTitle')} value={latency} />
-      </div> */}
       <div className={classes.contentContainer}>
       <div className={classes.contentContainer}>
         <Topo
         <Topo
           nodes={nodes}
           nodes={nodes}

+ 0 - 2
client/src/pages/system/Topology.tsx

@@ -4,8 +4,6 @@ import { useEffect } from 'react';
 
 
 const getStyles = makeStyles((theme: Theme) => ({
 const getStyles = makeStyles((theme: Theme) => ({
   container: {
   container: {
-    borderTopLeftRadius: '8px',
-    borderBottomLeftRadius: '8px',
     overflow: 'auto',
     overflow: 'auto',
     backgroundColor: 'white',
     backgroundColor: 'white',
     // height: 'auto',
     // height: 'auto',