Skip to content

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

[#3005] fix(web): fix table properties displaying format (#3019)

CHEYNE3c39fa97d7e1
diff --git a/web/src/app/metalakes/metalake/rightContent/tabsContent/TabsContent.js b/web/src/app/metalakes/metalake/rightContent/tabsContent/TabsContent.js
index 699d3bf069..bdea15e776 100644
--- a/web/src/app/metalakes/metalake/rightContent/tabsContent/TabsContent.js
+++ b/web/src/app/metalakes/metalake/rightContent/tabsContent/TabsContent.js
@@ -7,7 +7,7 @@
import { Inconsolata } from 'next/font/google'
-import { useState, useEffect } from 'react'
+import { useState, useEffect, Fragment } from 'react'
import { styled, Box, Divider, List, ListItem, ListItemText, Stack, Tab, Typography } from '@mui/material'
import Tooltip, { tooltipClasses } from '@mui/material/Tooltip'
@@ -163,10 +163,16 @@ const TabsContent = () => {
</Box>
<Box sx={{ p: 1.5, px: 4 }}>
- {item.items.map(i => {
+ {item.items.map((it, idx) => {
return (
- <Typography key={i} variant='caption' color='white' className={fonts.className}>
- {item.type === 'sortOrders' ? i.text : i.fields}
+ <Typography
+ key={idx}
+ variant='caption'
+ color='white'
+ className={fonts.className}
+ sx={{ display: 'flex', flexDirection: 'column' }}
+ >
+ {item.type === 'sortOrders' ? it.text : it.fields.join('.')}
</Typography>
)
})}
@@ -210,11 +216,16 @@ const TabsContent = () => {
textOverflow: 'ellipsis'
}}
>
- <Typography variant='caption' className={fonts.className}>
- {item.type === 'sortOrders'
- ? item.items.map(i => i.text)
- : item.items.map(i => i.fields)}
- </Typography>
+ {item.items.map((it, idx) => {
+ return (
+ <Fragment key={idx}>
+ <Typography variant='caption' className={fonts.className}>
+ {it.fields.join('.')}
+ </Typography>
+ {idx < item.items.length - 1 && <span>, </span>}
+ </Fragment>
+ )
+ })}
</Box>
}
/>
diff --git a/web/src/app/metalakes/metalake/rightContent/tabsContent/tableView/TableView.js b/web/src/app/metalakes/metalake/rightContent/tabsContent/tableView/TableView.js
index 1074e86aa4..71a2ea1464 100644
--- a/web/src/app/metalakes/metalake/rightContent/tabsContent/tableView/TableView.js
+++ b/web/src/app/metalakes/metalake/rightContent/tabsContent/tableView/TableView.js
@@ -111,10 +111,16 @@ const TableView = () => {
</Box>
<Box sx={{ p: 1.5, px: 4 }}>
- {items.map(i => {
+ {items.map((it, idx) => {
return (
- <Typography key={i} variant='caption' color='white' className={fonts.className}>
- {i.text || i.fields}
+ <Typography
+ key={idx}
+ variant='caption'
+ color='white'
+ className={fonts.className}
+ sx={{ display: 'flex', flexDirection: 'column' }}
+ >
+ {it.text || it.fields}
</Typography>
)
})}
diff --git a/web/src/lib/store/metalakes/index.js b/web/src/lib/store/metalakes/index.js
index eeba3508a4..b9e505fc31 100644
--- a/web/src/lib/store/metalakes/index.js
+++ b/web/src/lib/store/metalakes/index.js
@@ -609,7 +609,7 @@ export const getTableDetails = createAsyncThunk(
items: partitioning.map(i => {
let fields = i.fieldName || []
let sub = ''
- let last = i.fieldName.join('.')
+ let last = i.fieldName
switch (i.strategy) {
case 'bucket':
@@ -680,7 +680,7 @@ export const getTableDetails = createAsyncThunk(
fields: i.fieldNames,
name: i.name,
indexType: i.indexType,
- text: `${i.name}(${i.fieldNames.join(',')})`
+ text: `${i.name}(${i.fieldNames.join('.')})`
}
})
}