mirror of
https://github.com/datahub-project/datahub.git
synced 2025-09-01 13:23:09 +00:00
feat(ui/summary): add the new summary tab to glossary node entity (#14541)
This commit is contained in:
parent
8234cbec8f
commit
5dd2a3633a
@ -17,6 +17,9 @@ import SidebarNotesSection from '@app/entityV2/shared/sidebarSection/SidebarNote
|
|||||||
import SidebarStructuredProperties from '@app/entityV2/shared/sidebarSection/SidebarStructuredProperties';
|
import SidebarStructuredProperties from '@app/entityV2/shared/sidebarSection/SidebarStructuredProperties';
|
||||||
import { DocumentationTab } from '@app/entityV2/shared/tabs/Documentation/DocumentationTab';
|
import { DocumentationTab } from '@app/entityV2/shared/tabs/Documentation/DocumentationTab';
|
||||||
import { PropertiesTab } from '@app/entityV2/shared/tabs/Properties/PropertiesTab';
|
import { PropertiesTab } from '@app/entityV2/shared/tabs/Properties/PropertiesTab';
|
||||||
|
import { EntityTab } from '@app/entityV2/shared/types';
|
||||||
|
import SummaryTab from '@app/entityV2/summary/SummaryTab';
|
||||||
|
import { useShowAssetSummaryPage } from '@app/entityV2/summary/useShowAssetSummaryPage';
|
||||||
import { FetchedEntity } from '@app/lineage/types';
|
import { FetchedEntity } from '@app/lineage/types';
|
||||||
|
|
||||||
import { useGetGlossaryNodeQuery } from '@graphql/glossaryNode.generated';
|
import { useGetGlossaryNodeQuery } from '@graphql/glossaryNode.generated';
|
||||||
@ -85,26 +88,7 @@ class GlossaryNodeEntity implements Entity<GlossaryNode> {
|
|||||||
useEntityQuery={useGetGlossaryNodeQuery}
|
useEntityQuery={useGetGlossaryNodeQuery}
|
||||||
getOverrideProperties={this.getOverridePropertiesFromEntity}
|
getOverrideProperties={this.getOverridePropertiesFromEntity}
|
||||||
isNameEditable
|
isNameEditable
|
||||||
tabs={[
|
tabs={this.getProfileTabs()}
|
||||||
{
|
|
||||||
name: 'Contents',
|
|
||||||
component: ChildrenTab,
|
|
||||||
icon: AppstoreOutlined,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Documentation',
|
|
||||||
component: DocumentationTab,
|
|
||||||
icon: FileOutlined,
|
|
||||||
properties: {
|
|
||||||
hideLinksButton: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Properties',
|
|
||||||
component: PropertiesTab,
|
|
||||||
icon: UnorderedListOutlined,
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
sidebarSections={this.getSidebarSections()}
|
sidebarSections={this.getSidebarSections()}
|
||||||
// NOTE: Hiding this for now as we've moved the actions to the content of ChildrenTab.tsx
|
// NOTE: Hiding this for now as we've moved the actions to the content of ChildrenTab.tsx
|
||||||
// The buttons are too big and causes other actions to overflow.
|
// The buttons are too big and causes other actions to overflow.
|
||||||
@ -142,6 +126,43 @@ class GlossaryNodeEntity implements Entity<GlossaryNode> {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
getProfileTabs = (): EntityTab[] => {
|
||||||
|
const showSummaryTab = useShowAssetSummaryPage();
|
||||||
|
|
||||||
|
return [
|
||||||
|
...(showSummaryTab
|
||||||
|
? [
|
||||||
|
{
|
||||||
|
name: 'Summary',
|
||||||
|
component: SummaryTab,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
: []),
|
||||||
|
{
|
||||||
|
name: 'Contents',
|
||||||
|
component: ChildrenTab,
|
||||||
|
icon: AppstoreOutlined,
|
||||||
|
},
|
||||||
|
...(!showSummaryTab
|
||||||
|
? [
|
||||||
|
{
|
||||||
|
name: 'Documentation',
|
||||||
|
component: DocumentationTab,
|
||||||
|
icon: FileOutlined,
|
||||||
|
properties: {
|
||||||
|
hideLinksButton: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]
|
||||||
|
: []),
|
||||||
|
{
|
||||||
|
name: 'Properties',
|
||||||
|
component: PropertiesTab,
|
||||||
|
icon: UnorderedListOutlined,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
getSidebarTabs = () => [
|
getSidebarTabs = () => [
|
||||||
{
|
{
|
||||||
name: 'Properties',
|
name: 'Properties',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user