diff --git a/catalog-rest-service/src/main/resources/ui/src/assets/svg/config.svg b/catalog-rest-service/src/main/resources/ui/src/assets/svg/config.svg new file mode 100644 index 00000000000..16b04fbc5d2 --- /dev/null +++ b/catalog-rest-service/src/main/resources/ui/src/assets/svg/config.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/catalog-rest-service/src/main/resources/ui/src/components/common/TabsPane/TabsPane.tsx b/catalog-rest-service/src/main/resources/ui/src/components/common/TabsPane/TabsPane.tsx index 5eb9c6cd491..4901237b409 100644 --- a/catalog-rest-service/src/main/resources/ui/src/components/common/TabsPane/TabsPane.tsx +++ b/catalog-rest-service/src/main/resources/ui/src/components/common/TabsPane/TabsPane.tsx @@ -39,6 +39,7 @@ const TabsPane = ({ activeTab, setActiveTab, tabs }: Props) => { alt={tab.icon.alt} icon={tab.icon.name} title={tab.icon.title} + width="16" />{' '} {tab.name} @@ -53,6 +54,7 @@ const TabsPane = ({ activeTab, setActiveTab, tabs }: Props) => { alt={tab.icon.alt} icon={tab.icon.name} title={tab.icon.title} + width="16" />{' '} {tab.name} diff --git a/catalog-rest-service/src/main/resources/ui/src/components/common/entityPageInfo/EntityPageInfo.tsx b/catalog-rest-service/src/main/resources/ui/src/components/common/entityPageInfo/EntityPageInfo.tsx index c3b05f564f1..86b17da444b 100644 --- a/catalog-rest-service/src/main/resources/ui/src/components/common/entityPageInfo/EntityPageInfo.tsx +++ b/catalog-rest-service/src/main/resources/ui/src/components/common/entityPageInfo/EntityPageInfo.tsx @@ -11,7 +11,7 @@ import { TitleBreadcrumbProps } from '../title-breadcrumb/title-breadcrumb.inter type ExtraInfo = { key: string; - value: string; + value: string | number; }; type Props = { diff --git a/catalog-rest-service/src/main/resources/ui/src/pages/topic-details/index.tsx b/catalog-rest-service/src/main/resources/ui/src/pages/topic-details/index.tsx index 92ae029e9ff..19837d6d528 100644 --- a/catalog-rest-service/src/main/resources/ui/src/pages/topic-details/index.tsx +++ b/catalog-rest-service/src/main/resources/ui/src/pages/topic-details/index.tsx @@ -49,6 +49,11 @@ const MyTopicDetailPage = () => { const [tags, setTags] = useState>([]); const [activeTab, setActiveTab] = useState(1); const [partitions, setPartitions] = useState(0); + const [cleanupPolicies, setCleanupPolicies] = useState>([]); + const [maximumMessageSize, setMaximumMessageSize] = useState(0); + const [replicationFactor, setReplicationFactor] = useState(0); + const [retentionSize, setRetentionSize] = useState(0); + const [isEdit, setIsEdit] = useState(false); const [schemaText, setSchemaText] = useState('{}'); const [slashedTopicName, setSlashedTopicName] = useState< @@ -84,6 +89,16 @@ const MyTopicDetailPage = () => { protectedState: !owner || hasEditAccess(), position: 2, }, + { + name: 'Config', + icon: { + alt: 'config', + name: 'icon-config', + title: 'Config', + }, + isProtected: false, + position: 3, + }, ]; const fetchTags = () => { getTagCategories().then((res) => { @@ -102,23 +117,31 @@ const MyTopicDetailPage = () => { followers, fullyQualifiedName, name, - partitions, schemaType, schemaText, service, tags, owner, + partitions, + cleanupPolicies, + maximumMessageSize, + replicationFactor, + retentionSize, } = res.data; setTopicDetails(res.data); setTopicId(id); setDescription(description ?? ''); setSchemaType(schemaType); - setPartitions(partitions); setFollowers(followers?.length); setOwner(getOwnerFromId(owner?.id)); setTier(getTierFromTableTags(tags)); setTags(getTagsWithoutTier(tags)); setSchemaText(schemaText); + setPartitions(partitions); + setCleanupPolicies(cleanupPolicies); + setMaximumMessageSize(maximumMessageSize); + setReplicationFactor(replicationFactor); + setRetentionSize(retentionSize); setIsFollowing( followers.some(({ id }: { id: string }) => id === USERId) ); @@ -265,6 +288,16 @@ const MyTopicDetailPage = () => { ); }; + const getConfigDetails = () => { + return [ + { key: 'Partitions', value: partitions }, + { key: 'Replication Factor', value: replicationFactor }, + { key: 'Retention Size', value: retentionSize.toLocaleString() }, + { key: 'CleanUp Policies', value: cleanupPolicies.join() }, + { key: 'Max Message Size', value: maximumMessageSize }, + ]; + }; + useEffect(() => { fetchTopicDetail(topicFQN); }, [topicFQN]); @@ -301,7 +334,7 @@ const MyTopicDetailPage = () => { tabs={tabs} /> -
+
{activeTab === 1 && ( <>
@@ -317,10 +350,7 @@ const MyTopicDetailPage = () => { />
- {getInfoBadge([ - { key: 'Schema', value: schemaType }, - { key: 'Partitions', value: partitions }, - ])} + {getInfoBadge([{ key: 'Schema', value: schemaType }])}
@@ -334,6 +364,18 @@ const MyTopicDetailPage = () => { onSave={onSettingsUpdate} /> )} + {activeTab === 3 && ( +
+ {getConfigDetails().map((config, index) => ( +
+

{config.key}

+

{config.value}

+
+ ))} +
+ )}
diff --git a/catalog-rest-service/src/main/resources/ui/src/utils/SvgUtils.tsx b/catalog-rest-service/src/main/resources/ui/src/utils/SvgUtils.tsx index db7851a11df..97dcabc3957 100644 --- a/catalog-rest-service/src/main/resources/ui/src/utils/SvgUtils.tsx +++ b/catalog-rest-service/src/main/resources/ui/src/utils/SvgUtils.tsx @@ -3,6 +3,7 @@ import IconGoogle from '../assets/img/google-icon.png'; import IconWelcomePopper from '../assets/img/welcome-popper-icon.png'; import IconAPI from '../assets/svg/api.svg'; import IconSuccess from '../assets/svg/check.svg'; +import IconConfig from '../assets/svg/config.svg'; import IconDashboardGrey from '../assets/svg/dashboard-grey.svg'; import IconDashboard from '../assets/svg/dashboard.svg'; import IconAsstest from '../assets/svg/data-assets.svg'; @@ -118,6 +119,7 @@ export const Icons = { TABLE_GREY: 'table-grey', TOPIC_GREY: 'topic-grey', DASHBOARD_GREY: 'dashboard-grey', + CONFIG: 'icon-config', }; const SVGIcons: FunctionComponent = ({ @@ -351,6 +353,10 @@ const SVGIcons: FunctionComponent = ({ case Icons.DASHBOARD_GREY: IconComponent = IconDashboardGrey; + break; + case Icons.CONFIG: + IconComponent = IconConfig; + break; default: diff --git a/catalog-rest-service/src/main/resources/ui/tailwind.config.js b/catalog-rest-service/src/main/resources/ui/tailwind.config.js index 3d7a71c4e70..377923ad446 100644 --- a/catalog-rest-service/src/main/resources/ui/tailwind.config.js +++ b/catalog-rest-service/src/main/resources/ui/tailwind.config.js @@ -118,6 +118,7 @@ module.exports = { minHeight: { 32: '8rem', 168: '10.5rem', + tab: '24rem', }, padding: { '5px': '5px',