mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-28 02:17:53 +00:00
Worked on the dynamic column width of stats table (#5996)
This commit is contained in:
parent
904403941c
commit
4e5f22cf3d
@ -104,16 +104,24 @@ export default function SchemaTable({
|
||||
});
|
||||
|
||||
const fieldColumn = {
|
||||
width: '22%',
|
||||
title: 'Field',
|
||||
dataIndex: 'fieldPath',
|
||||
key: 'fieldPath',
|
||||
width: 300,
|
||||
render: schemaTitleRenderer,
|
||||
filtered: true,
|
||||
};
|
||||
|
||||
const descriptionColumn = {
|
||||
width: '22%',
|
||||
title: 'Description',
|
||||
dataIndex: 'description',
|
||||
key: 'description',
|
||||
render: descriptionRender,
|
||||
};
|
||||
|
||||
const tagColumn = {
|
||||
width: 125,
|
||||
width: '13%',
|
||||
title: 'Tags',
|
||||
dataIndex: 'globalTags',
|
||||
key: 'tag',
|
||||
@ -122,7 +130,7 @@ export default function SchemaTable({
|
||||
};
|
||||
|
||||
const termColumn = {
|
||||
width: 125,
|
||||
width: '13%',
|
||||
title: 'Glossary Terms',
|
||||
dataIndex: 'globalTags',
|
||||
key: 'tag',
|
||||
@ -130,25 +138,10 @@ export default function SchemaTable({
|
||||
onCell: onTagTermCell,
|
||||
};
|
||||
|
||||
const usageColumn = {
|
||||
width: 50,
|
||||
title: 'Usage',
|
||||
dataIndex: 'fieldPath',
|
||||
key: 'usage',
|
||||
render: usageStatsRenderer,
|
||||
};
|
||||
const descriptionColumn = {
|
||||
title: 'Description',
|
||||
dataIndex: 'description',
|
||||
key: 'description',
|
||||
render: descriptionRender,
|
||||
width: 300,
|
||||
};
|
||||
|
||||
const blameColumn = {
|
||||
width: '10%',
|
||||
dataIndex: 'fieldPath',
|
||||
key: 'fieldPath',
|
||||
width: 75,
|
||||
render(record: SchemaField) {
|
||||
return {
|
||||
props: {
|
||||
@ -159,6 +152,14 @@ export default function SchemaTable({
|
||||
},
|
||||
};
|
||||
|
||||
const usageColumn = {
|
||||
width: '10%',
|
||||
title: 'Usage',
|
||||
dataIndex: 'fieldPath',
|
||||
key: 'usage',
|
||||
render: usageStatsRenderer,
|
||||
};
|
||||
|
||||
let allColumns: ColumnsType<ExtendedSchemaFields> = [fieldColumn, descriptionColumn, tagColumn, termColumn];
|
||||
|
||||
if (hasUsageStats) {
|
||||
|
||||
@ -73,6 +73,13 @@ const EntityTitle = styled(Typography.Text)<{ $titleSizePx?: number }>`
|
||||
}
|
||||
`;
|
||||
|
||||
const CardEntityTitle = styled(EntityTitle)`
|
||||
max-width: 350px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
`;
|
||||
|
||||
const PlatformText = styled(Typography.Text)`
|
||||
font-size: 12px;
|
||||
line-height: 20px;
|
||||
@ -271,9 +278,15 @@ export default function DefaultPreviewCard({
|
||||
/>
|
||||
<EntityTitleContainer>
|
||||
<Link to={url}>
|
||||
<EntityTitle onClick={onClick} $titleSizePx={titleSizePx}>
|
||||
{name || ' '}
|
||||
</EntityTitle>
|
||||
{previewType === PreviewType.HOVER_CARD ? (
|
||||
<CardEntityTitle onClick={onClick} $titleSizePx={titleSizePx}>
|
||||
{name || ' '}
|
||||
</CardEntityTitle>
|
||||
) : (
|
||||
<EntityTitle onClick={onClick} $titleSizePx={titleSizePx}>
|
||||
{name || ' '}
|
||||
</EntityTitle>
|
||||
)}
|
||||
</Link>
|
||||
{deprecation?.deprecated && <DeprecationPill deprecation={deprecation} preview />}
|
||||
{externalUrl && (
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user