diff --git a/catalog-rest-service/src/main/resources/ui/src/components/Modals/AddServiceModal/AddServiceModal.tsx b/catalog-rest-service/src/main/resources/ui/src/components/Modals/AddServiceModal/AddServiceModal.tsx index 1ff050aa323..b71ffdf8a11 100644 --- a/catalog-rest-service/src/main/resources/ui/src/components/Modals/AddServiceModal/AddServiceModal.tsx +++ b/catalog-rest-service/src/main/resources/ui/src/components/Modals/AddServiceModal/AddServiceModal.tsx @@ -17,6 +17,7 @@ import classNames from 'classnames'; import React, { FunctionComponent, useRef, useState } from 'react'; +import { fromISOString } from '../../../utils/ServiceUtils'; import { Button } from '../../buttons/Button/Button'; import MarkdownWithPreview from '../../common/editor/MarkdownWithPreview'; // import { serviceType } from '../../../constants/services.const'; @@ -119,24 +120,6 @@ const seprateUrl = (url?: string) => { return {}; }; -const fromISOString = (isoValue = '') => { - if (isoValue) { - // 'P1DT 0H 0M' - const [d, hm] = isoValue.split('T'); - const day = +d.replace('D', '').replace('P', ''); - const [h, time] = hm.split('H'); - const minute = +time.replace('M', ''); - - return { day, hour: +h, minute }; - } else { - return { - day: 1, - hour: 0, - minute: 0, - }; - } -}; - const errorMsg = (value: string) => { return (
diff --git a/catalog-rest-service/src/main/resources/ui/src/components/searched-data/SearchedData.tsx b/catalog-rest-service/src/main/resources/ui/src/components/searched-data/SearchedData.tsx index a5c63a25f2e..36b9c3f50f6 100644 --- a/catalog-rest-service/src/main/resources/ui/src/components/searched-data/SearchedData.tsx +++ b/catalog-rest-service/src/main/resources/ui/src/components/searched-data/SearchedData.tsx @@ -93,7 +93,7 @@ const SearchedData: React.FC = ({
))} - {totalValue > 0 && data.length > 0 && ( + {totalValue > PAGE_SIZE && data.length > 0 && ( { - {data.length ? ( - <> - - - - - - - - - - - - {data.map((table, index) => ( - + + + + + + + + + + + {data.length > 0 ? ( + data.map((table, index) => ( + + + - + + - - - - - ))} - -
Table NameDescriptionOwnerUsageTags
Table NameDescriptionOwnerUsageTags
+ + {table.name} + + + {table.description ? ( + + ) : ( + + No description added + )} - data-testid="column" - key={index}> - - - {table.name} - - - {table.description ? ( - - ) : ( - - No description added - + +

{getOwnerFromId(table?.owner?.id)?.name || '--'}

+
+

+ {getUsagePercentile( + table.usageSummary.weeklyStats.percentileRank || 0 )} -

-

- {getOwnerFromId(table?.owner?.id)?.name || '--'} -

-
-

- {getUsagePercentile( - table.usageSummary.weeklyStats.percentileRank || 0 - )} -

-
- {table.tags.map((tag, tagIndex) => ( - - - - ))} - {getTableTags(table.columns).map((tag, tagIdx) => ( - - - - ))} -
- - - ) : ( -

- {databaseName} does not have any tables -

+

+ + + {table.tags.map((tag, tagIndex) => ( + + + + ))} + {getTableTags(table.columns).map((tag, tagIdx) => ( + + + + ))} + + + )) + ) : ( + + + No records found. + + + )} + + + {Boolean(!isNull(paging.after) || !isNull(paging.before)) && ( + )} 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 03447b0c85e..95d8e83a9b8 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 @@ -17,7 +17,7 @@ import { AxiosError, AxiosResponse } from 'axios'; import classNames from 'classnames'; -import { isUndefined } from 'lodash'; +import { isNull, isUndefined } from 'lodash'; import { Database, Paging, ServiceOption } from 'Models'; import React, { FunctionComponent, useEffect, useState } from 'react'; import { Link, useParams } from 'react-router-dom'; @@ -33,7 +33,7 @@ import { ModalWithMarkdownEditor } from '../../components/Modals/ModalWithMarkdo import { pagingObject } from '../../constants/constants'; import useToastContext from '../../hooks/useToastContext'; import { isEven } from '../../utils/CommonUtils'; -import { serviceTypeLogo } from '../../utils/ServiceUtils'; +import { getFrequencyTime, serviceTypeLogo } from '../../utils/ServiceUtils'; import SVGIcons from '../../utils/SvgUtils'; import { getUsagePercentile } from '../../utils/TableUtils'; @@ -141,6 +141,44 @@ const ServicePage: FunctionComponent = () => {
+
+ + + Driver Class : + {' '} + + {serviceDetails?.jdbc.driverClass || '--'} + + + • + + + + + Frequency : + {' '} + + {' '} + {serviceDetails?.ingestionSchedule + ? getFrequencyTime( + serviceDetails.ingestionSchedule.repeatFrequency + ) + : 'N/A'} + + + • + + + + + Service Type : + {' '} + + {serviceDetails?.serviceType} + + +
+
@@ -179,67 +217,69 @@ const ServicePage: FunctionComponent = () => {
- {data.length > 0 ? ( - <> -
- - - - - - - - - - - {data.map((database, index) => ( - +
Database NameDescriptionOwnerUsage
+ + + + + + + + + + {data.length > 0 ? ( + data.map((database, index) => ( + + + - + + - - - - ))} - -
Database NameDescriptionOwnerUsage
+ + {database.name} + + + {database.description ? ( + + ) : ( + + No description added + )} - data-testid="column" - key={index}> - - - {database.name} - - - {database.description ? ( - - ) : ( - - No description added - + +

{database?.owner?.name || '--'}

+
+

+ {getUsagePercentile( + database.usageSummary.weeklyStats.percentileRank )} -

-

{database?.owner?.name || '--'}

-
-

- {getUsagePercentile( - database.usageSummary.weeklyStats.percentileRank - )} -

-
-
- - - ) : ( -

- {serviceFQN} does not have any databases -

+

+ + + )) + ) : ( + + + No records found. + + + )} + + +
+ {Boolean(!isNull(paging.after) || !isNull(paging.before)) && ( + )} diff --git a/catalog-rest-service/src/main/resources/ui/src/pages/services/index.tsx b/catalog-rest-service/src/main/resources/ui/src/pages/services/index.tsx index ff519766642..963c852f14f 100644 --- a/catalog-rest-service/src/main/resources/ui/src/pages/services/index.tsx +++ b/catalog-rest-service/src/main/resources/ui/src/pages/services/index.tsx @@ -38,7 +38,7 @@ import { } from '../../components/Modals/AddServiceModal/AddServiceModal'; import { getServiceDetailsPath } from '../../constants/constants'; import { NOSERVICE, PLUS } from '../../constants/services.const'; -import { serviceTypeLogo } from '../../utils/ServiceUtils'; +import { getFrequencyTime, serviceTypeLogo } from '../../utils/ServiceUtils'; import SVGIcons from '../../utils/SvgUtils'; export type ApiData = { @@ -218,6 +218,22 @@ const ServicesPage = () => { mysql sales */} +
+ + + {service.driverClass} + +
+
+ + + {service.ingestionSchedule + ? getFrequencyTime( + service.ingestionSchedule.repeatFrequency + ) + : 'N/A'} + +
diff --git a/catalog-rest-service/src/main/resources/ui/src/utils/ServiceUtils.ts b/catalog-rest-service/src/main/resources/ui/src/utils/ServiceUtils.ts index 4d6e9870265..c0f4e3baf93 100644 --- a/catalog-rest-service/src/main/resources/ui/src/utils/ServiceUtils.ts +++ b/catalog-rest-service/src/main/resources/ui/src/utils/ServiceUtils.ts @@ -47,6 +47,30 @@ export const serviceTypeLogo = (type: string) => { } }; +export const fromISOString = (isoValue = '') => { + if (isoValue) { + // 'P1DT 0H 0M' + const [d, hm] = isoValue.split('T'); + const day = +d.replace('D', '').replace('P', ''); + const [h, time] = hm.split('H'); + const minute = +time.replace('M', ''); + + return { day, hour: +h, minute }; + } else { + return { + day: 1, + hour: 0, + minute: 0, + }; + } +}; + +export const getFrequencyTime = (isoDate: string): string => { + const { day, hour, minute } = fromISOString(isoDate); + + return `${day}D-${hour}H-${minute}M`; +}; + const getAllServiceList = ( allServiceCollectionArr: Array ): Promise> => {