Skip to content

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.

[#1988] improve(web): add the column headers `autoIncrement` and `comment` in the Table view (#1989)

CHEYNE27b6f64a48da
diff --git a/web/app/ui/MetalakeList.js b/web/app/ui/MetalakeList.js
index f54374307b..01535ce08f 100644
--- a/web/app/ui/MetalakeList.js
+++ b/web/app/ui/MetalakeList.js
@@ -143,7 +143,7 @@ const MetalakeList = () => {
minWidth: 150,
disableColumnMenu: true,
field: 'createdBy',
- headerName: 'Created By',
+ headerName: 'Created by',
renderCell: ({ row }) => {
return (
<Typography noWrap sx={{ color: 'text.secondary' }}>
@@ -158,7 +158,7 @@ const MetalakeList = () => {
disableColumnMenu: true,
valueGetter: params => `${params.row.audit?.createTime}`,
field: 'createdAt',
- headerName: 'Created At',
+ headerName: 'Created at',
renderCell: ({ row }) => {
return (
<Typography noWrap sx={{ color: 'text.secondary' }}>
diff --git a/web/app/ui/metalakes/TableView.js b/web/app/ui/metalakes/TableView.js
index e5235a5fce..68c3aa1b21 100644
--- a/web/app/ui/metalakes/TableView.js
+++ b/web/app/ui/metalakes/TableView.js
@@ -53,7 +53,8 @@ const TableView = props => {
flex: 0.1,
minWidth: 60,
disableColumnMenu: true,
- field: 'id',
+ type: 'string',
+ field: 'name',
headerName: 'Name',
renderCell: ({ row }) => {
const { name, path } = row
@@ -89,7 +90,8 @@ const TableView = props => {
flex: 0.1,
minWidth: 60,
disableColumnMenu: true,
- field: 'id',
+ type: 'string',
+ field: 'name',
headerName: 'Name',
renderCell: ({ row }) => {
const { name, path } = row
@@ -123,6 +125,7 @@ const TableView = props => {
minWidth: 90,
sortable: false,
disableColumnMenu: true,
+ type: 'actions',
field: 'actions',
headerName: 'Actions',
renderCell: ({ row }) => (
@@ -163,6 +166,7 @@ const TableView = props => {
flex: 0.1,
minWidth: 60,
disableColumnMenu: true,
+ type: 'string',
field: 'name',
headerName: 'Name',
renderCell: ({ row }) => {
@@ -188,6 +192,7 @@ const TableView = props => {
flex: 0.1,
minWidth: 60,
disableColumnMenu: true,
+ type: 'string',
field: 'type',
headerName: 'Type',
renderCell: ({ row }) => {
@@ -204,6 +209,7 @@ const TableView = props => {
flex: 0.1,
minWidth: 60,
disableColumnMenu: true,
+ type: 'boolean',
field: 'nullable',
headerName: 'Nullable',
renderCell: ({ row }) => {
@@ -225,6 +231,60 @@ const TableView = props => {
</Box>
)
}
+ },
+ {
+ flex: 0.1,
+ minWidth: 60,
+ disableColumnMenu: true,
+ type: 'boolean',
+ field: 'autoIncrement',
+ headerName: 'AutoIncrement',
+ renderCell: ({ row }) => {
+ const { autoIncrement } = row
+
+ return (
+ <Box sx={{ display: 'flex', alignItems: 'center' }}>
+ <Typography
+ noWrap
+ variant='body2'
+ sx={{
+ fontWeight: 400,
+ color: 'text.secondary',
+ textDecoration: 'none'
+ }}
+ >
+ {typeof autoIncrement !== 'undefined' && `${autoIncrement}`}
+ </Typography>
+ </Box>
+ )
+ }
+ },
+ {
+ flex: 0.1,
+ minWidth: 60,
+ disableColumnMenu: true,
+ type: 'string',
+ field: 'comment',
+ headerName: 'Comment',
+ renderCell: ({ row }) => {
+ const { comment } = row
+
+ return (
+ <Box sx={{ display: 'flex', alignItems: 'center' }}>
+ <Typography
+ noWrap
+ variant='body2'
+ sx={{
+ fontWeight: 400,
+ color: 'text.secondary',
+ textDecoration: 'none'
+ }}
+ >
+ {typeof comment !== 'undefined' && `${comment}`}
+ </Typography>
+ </Box>
+ )
+ }
}
]
diff --git a/web/app/ui/metalakes/TabsContent.js b/web/app/ui/metalakes/TabsContent.js
index 5c4be8ed39..454424b9ff 100644
--- a/web/app/ui/metalakes/TabsContent.js
+++ b/web/app/ui/metalakes/TabsContent.js
@@ -25,7 +25,7 @@ const CustomTab = props => {
label={
<Box sx={{ display: 'flex', alignItems: 'center' }}>
<Icon icon={icon} />
- <Typography sx={{ ml: 1 }} color={'inherit'}>
+ <Typography className={`twc-font-bold twc-ml-1 twc-normal-case`} color={'inherit'}>
{label}
</Typography>
</Box>
diff --git a/web/lib/theme/mui.js b/web/lib/theme/mui.js
index ff2e5c3b29..d6f920a4f4 100644
--- a/web/lib/theme/mui.js
+++ b/web/lib/theme/mui.js
@@ -697,8 +697,7 @@ const createMuiTheme = (config = {}) => {
columnHeaderTitle: {
fontWeight: 600,
fontSize: '0.75rem',
- letterSpacing: '0.17px',
- textTransform: 'uppercase'
+ letterSpacing: '0.17px'
},
columnSeparator: ({ theme }) => ({
color: theme.palette.divider