diff --git a/catalog-rest-service/src/main/resources/ui/src/pages/database-details/index.tsx b/catalog-rest-service/src/main/resources/ui/src/pages/database-details/index.tsx index 40001ccbc61..1f084e73537 100644 --- a/catalog-rest-service/src/main/resources/ui/src/pages/database-details/index.tsx +++ b/catalog-rest-service/src/main/resources/ui/src/pages/database-details/index.tsx @@ -71,6 +71,7 @@ const DatabaseDetails: FunctionComponent = () => { const [description, setDescription] = useState(''); const [databaseId, setDatabaseId] = useState(''); const [paging, setPaging] = useState(pagingObject); + const [instanceCount, setInstanceCount] = useState(0); const history = useHistory(); const showToast = useToastContext(); @@ -88,6 +89,7 @@ const DatabaseDetails: FunctionComponent = () => { if (res.data.data) { setData(res.data.data); setPaging(res.data.paging); + setInstanceCount(res.data.paging.total); setIsLoading(false); } else { setData([]); @@ -228,8 +230,15 @@ const DatabaseDetails: FunctionComponent = () => { ) : (
-
- + + +
+ + + Tables : + {' '} + {instanceCount} +
diff --git a/catalog-rest-service/src/main/resources/ui/src/pages/service/index.tsx b/catalog-rest-service/src/main/resources/ui/src/pages/service/index.tsx index 556678eb4dc..639bcb8b671 100644 --- a/catalog-rest-service/src/main/resources/ui/src/pages/service/index.tsx +++ b/catalog-rest-service/src/main/resources/ui/src/pages/service/index.tsx @@ -63,6 +63,7 @@ const ServicePage: FunctionComponent = () => { const [data, setData] = useState>([]); const [isLoading, setIsloading] = useState(true); const [paging, setPaging] = useState(pagingObject); + const [instanceCount, setInstanceCount] = useState(0); const showToast = useToastContext(); const fetchDatabases = (paging?: string) => { @@ -72,6 +73,7 @@ const ServicePage: FunctionComponent = () => { if (res.data.data) { setData(res.data.data); setPaging(res.data.paging); + setInstanceCount(res.data.paging.total); setIsloading(false); } else { setData([]); @@ -91,6 +93,7 @@ const ServicePage: FunctionComponent = () => { if (res.data.data) { setData(res.data.data); setPaging(res.data.paging); + setInstanceCount(res.data.paging.total); setIsloading(false); } else { setData([]); @@ -115,6 +118,7 @@ const ServicePage: FunctionComponent = () => { if (res.data.data) { setData(res.data.data); setPaging(res.data.paging); + setInstanceCount(res.data.paging.total); setIsloading(false); } else { setData([]); @@ -159,7 +163,7 @@ const ServicePage: FunctionComponent = () => { case ServiceCategory.DATABASE_SERVICES: default: - return getEntityLink(SearchIndex.TABLE, fqn); + return `/database/${fqn}`; } }; @@ -442,6 +446,18 @@ const ServicePage: FunctionComponent = () => { getOtherDetails(pagingString); }; + const getCountLabel = () => { + switch (serviceName) { + case ServiceCategory.DASHBOARD_SERVICES: + return 'Dashboards'; + case ServiceCategory.MESSAGING_SERVICES: + return 'Topics'; + case ServiceCategory.DATABASE_SERVICES: + default: + return 'Databases'; + } + }; + return ( <> {isLoading ? ( @@ -466,6 +482,13 @@ const ServicePage: FunctionComponent = () => { : '--'} + + + + {getCountLabel()} : + {' '} + {instanceCount} +