mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-26 17:34:41 +00:00
Added new connectors Glue, MariaDB, Vertica from UI (#1289)
This commit is contained in:
parent
42e0c1caa1
commit
95fe21c18f
Binary file not shown.
After Width: | Height: | Size: 9.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
Binary file not shown.
After Width: | Height: | Size: 5.6 KiB |
@ -26,6 +26,7 @@ import {
|
|||||||
TITLE_FOR_NON_ADMIN_ACTION,
|
TITLE_FOR_NON_ADMIN_ACTION,
|
||||||
} from '../../constants/constants';
|
} from '../../constants/constants';
|
||||||
import { NoDataFoundPlaceHolder } from '../../constants/services.const';
|
import { NoDataFoundPlaceHolder } from '../../constants/services.const';
|
||||||
|
import { ServiceCategory } from '../../enums/service.enum';
|
||||||
import { useAuth } from '../../hooks/authHooks';
|
import { useAuth } from '../../hooks/authHooks';
|
||||||
import { isEven } from '../../utils/CommonUtils';
|
import { isEven } from '../../utils/CommonUtils';
|
||||||
import { Button } from '../buttons/Button/Button';
|
import { Button } from '../buttons/Button/Button';
|
||||||
@ -287,7 +288,9 @@ const Ingestion: React.FC<Props> = ({
|
|||||||
<Link
|
<Link
|
||||||
to={getServiceDetailsPath(
|
to={getServiceDetailsPath(
|
||||||
ingestion.service.name as string,
|
ingestion.service.name as string,
|
||||||
getServiceTypeFromName(ingestion.service.name)
|
getServiceTypeFromName(ingestion.service.name),
|
||||||
|
// TODO: Add logic below to select service-cat if necessary
|
||||||
|
ServiceCategory.DATABASE_SERVICES
|
||||||
)}>
|
)}>
|
||||||
{ingestion.service.name}
|
{ingestion.service.name}
|
||||||
</Link>
|
</Link>
|
||||||
|
@ -41,6 +41,7 @@ const PLACEHOLDER_ROUTE_DASHBOARD_FQN = ':dashboardFQN';
|
|||||||
const PLACEHOLDER_ROUTE_DATABASE_FQN = ':databaseFQN';
|
const PLACEHOLDER_ROUTE_DATABASE_FQN = ':databaseFQN';
|
||||||
const PLACEHOLDER_ROUTE_SERVICE_FQN = ':serviceFQN';
|
const PLACEHOLDER_ROUTE_SERVICE_FQN = ':serviceFQN';
|
||||||
const PLACEHOLDER_ROUTE_SERVICE_TYPE = ':serviceType';
|
const PLACEHOLDER_ROUTE_SERVICE_TYPE = ':serviceType';
|
||||||
|
const PLACEHOLDER_ROUTE_SERVICE_CAT = ':serviceCategory';
|
||||||
const PLACEHOLDER_ROUTE_SEARCHQUERY = ':searchQuery';
|
const PLACEHOLDER_ROUTE_SEARCHQUERY = ':searchQuery';
|
||||||
const PLACEHOLDER_ROUTE_TAB = ':tab';
|
const PLACEHOLDER_ROUTE_TAB = ':tab';
|
||||||
const PLACEHOLDER_ROUTE_TEAM = ':team';
|
const PLACEHOLDER_ROUTE_TEAM = ':team';
|
||||||
@ -114,7 +115,7 @@ export const ROUTES = {
|
|||||||
STORE: '/store',
|
STORE: '/store',
|
||||||
FEEDS: '/feeds',
|
FEEDS: '/feeds',
|
||||||
DUMMY: '/dummy',
|
DUMMY: '/dummy',
|
||||||
SERVICE: `/service/${PLACEHOLDER_ROUTE_SERVICE_TYPE}/${PLACEHOLDER_ROUTE_SERVICE_FQN}`,
|
SERVICE: `/service/${PLACEHOLDER_ROUTE_SERVICE_CAT}/${PLACEHOLDER_ROUTE_SERVICE_TYPE}/${PLACEHOLDER_ROUTE_SERVICE_FQN}`,
|
||||||
SERVICES: '/services',
|
SERVICES: '/services',
|
||||||
USERS: '/users',
|
USERS: '/users',
|
||||||
SCORECARD: '/scorecard',
|
SCORECARD: '/scorecard',
|
||||||
@ -170,10 +171,12 @@ export const getDatasetTabPath = (datasetFQN: string, tab = 'schema') => {
|
|||||||
|
|
||||||
export const getServiceDetailsPath = (
|
export const getServiceDetailsPath = (
|
||||||
serviceFQN: string,
|
serviceFQN: string,
|
||||||
serviceType: string
|
serviceType: string,
|
||||||
|
serviceCat: string
|
||||||
) => {
|
) => {
|
||||||
let path = ROUTES.SERVICE;
|
let path = ROUTES.SERVICE;
|
||||||
path = path
|
path = path
|
||||||
|
.replace(PLACEHOLDER_ROUTE_SERVICE_CAT, serviceCat)
|
||||||
.replace(PLACEHOLDER_ROUTE_SERVICE_TYPE, serviceType)
|
.replace(PLACEHOLDER_ROUTE_SERVICE_TYPE, serviceType)
|
||||||
.replace(PLACEHOLDER_ROUTE_SERVICE_FQN, serviceFQN);
|
.replace(PLACEHOLDER_ROUTE_SERVICE_FQN, serviceFQN);
|
||||||
|
|
||||||
|
@ -21,9 +21,11 @@ import noService from '../assets/img/no-service.png';
|
|||||||
import airflow from '../assets/img/service-icon-airflow.png';
|
import airflow from '../assets/img/service-icon-airflow.png';
|
||||||
import athena from '../assets/img/service-icon-athena.png';
|
import athena from '../assets/img/service-icon-athena.png';
|
||||||
import serviceDefault from '../assets/img/service-icon-generic.png';
|
import serviceDefault from '../assets/img/service-icon-generic.png';
|
||||||
|
import glue from '../assets/img/service-icon-glue.png';
|
||||||
import hive from '../assets/img/service-icon-hive.png';
|
import hive from '../assets/img/service-icon-hive.png';
|
||||||
import kafka from '../assets/img/service-icon-kafka.png';
|
import kafka from '../assets/img/service-icon-kafka.png';
|
||||||
import looker from '../assets/img/service-icon-looker.png';
|
import looker from '../assets/img/service-icon-looker.png';
|
||||||
|
import mariadb from '../assets/img/service-icon-mariadb.png';
|
||||||
import mssql from '../assets/img/service-icon-mssql.png';
|
import mssql from '../assets/img/service-icon-mssql.png';
|
||||||
import oracle from '../assets/img/service-icon-oracle.png';
|
import oracle from '../assets/img/service-icon-oracle.png';
|
||||||
import postgres from '../assets/img/service-icon-post.png';
|
import postgres from '../assets/img/service-icon-post.png';
|
||||||
@ -38,6 +40,7 @@ import mysql from '../assets/img/service-icon-sql.png';
|
|||||||
import superset from '../assets/img/service-icon-superset.png';
|
import superset from '../assets/img/service-icon-superset.png';
|
||||||
import tableau from '../assets/img/service-icon-tableau.png';
|
import tableau from '../assets/img/service-icon-tableau.png';
|
||||||
import trino from '../assets/img/service-icon-trino.png';
|
import trino from '../assets/img/service-icon-trino.png';
|
||||||
|
import vertica from '../assets/img/service-icon-vertica.png';
|
||||||
import plus from '../assets/svg/plus.svg';
|
import plus from '../assets/svg/plus.svg';
|
||||||
|
|
||||||
export const NoDataFoundPlaceHolder = noDataFound;
|
export const NoDataFoundPlaceHolder = noDataFound;
|
||||||
@ -52,6 +55,9 @@ export const SNOWFLAKE = snowflakes;
|
|||||||
export const ATHENA = athena;
|
export const ATHENA = athena;
|
||||||
export const PRESTO = presto;
|
export const PRESTO = presto;
|
||||||
export const TRINO = trino;
|
export const TRINO = trino;
|
||||||
|
export const GLUE = glue;
|
||||||
|
export const MARIADB = mariadb;
|
||||||
|
export const VERTICA = vertica;
|
||||||
export const KAFKA = kafka;
|
export const KAFKA = kafka;
|
||||||
export const PULSAR = pulsar;
|
export const PULSAR = pulsar;
|
||||||
export const SUPERSET = superset;
|
export const SUPERSET = superset;
|
||||||
@ -79,10 +85,13 @@ export const serviceTypes: Record<ServiceTypes, Array<string>> = {
|
|||||||
'Athena',
|
'Athena',
|
||||||
'Presto',
|
'Presto',
|
||||||
'Trino',
|
'Trino',
|
||||||
|
'Glue',
|
||||||
|
'MariaDB',
|
||||||
|
'Vertica',
|
||||||
],
|
],
|
||||||
messagingServices: ['Kafka'],
|
messagingServices: ['Kafka'],
|
||||||
dashboardServices: ['Superset', 'Looker', 'Tableau', 'Redash'],
|
dashboardServices: ['Superset', 'Looker', 'Tableau', 'Redash'],
|
||||||
pipelineServices: ['Airflow', 'Prefect'],
|
pipelineServices: ['Airflow', 'Prefect', 'Glue'],
|
||||||
};
|
};
|
||||||
|
|
||||||
export const arrServiceTypes: Array<ServiceTypes> = [
|
export const arrServiceTypes: Array<ServiceTypes> = [
|
||||||
|
@ -34,6 +34,9 @@ export enum DatabaseServiceType {
|
|||||||
ATHENA = 'Athena',
|
ATHENA = 'Athena',
|
||||||
PRESTO = 'Presto',
|
PRESTO = 'Presto',
|
||||||
TRINO = 'Trino',
|
TRINO = 'Trino',
|
||||||
|
GLUE = 'Glue',
|
||||||
|
MARIADB = 'MariaDB',
|
||||||
|
VERTICA = 'Vertica',
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum MessagingServiceType {
|
export enum MessagingServiceType {
|
||||||
|
@ -20,6 +20,7 @@ import {
|
|||||||
getServiceDetailsPath,
|
getServiceDetailsPath,
|
||||||
} from '../../constants/constants';
|
} from '../../constants/constants';
|
||||||
import { EntityType } from '../../enums/entity.enum';
|
import { EntityType } from '../../enums/entity.enum';
|
||||||
|
import { ServiceCategory } from '../../enums/service.enum';
|
||||||
import { Chart } from '../../generated/entity/data/chart';
|
import { Chart } from '../../generated/entity/data/chart';
|
||||||
import { Dashboard } from '../../generated/entity/data/dashboard';
|
import { Dashboard } from '../../generated/entity/data/dashboard';
|
||||||
import { User } from '../../generated/entity/teams/user';
|
import { User } from '../../generated/entity/teams/user';
|
||||||
@ -169,7 +170,8 @@ const DashboardDetailsPage = () => {
|
|||||||
url: serviceRes.data.name
|
url: serviceRes.data.name
|
||||||
? getServiceDetailsPath(
|
? getServiceDetailsPath(
|
||||||
serviceRes.data.name,
|
serviceRes.data.name,
|
||||||
serviceRes.data.serviceType
|
serviceRes.data.serviceType,
|
||||||
|
ServiceCategory.DASHBOARD_SERVICES
|
||||||
)
|
)
|
||||||
: '',
|
: '',
|
||||||
imgSrc: serviceRes.data.serviceType
|
imgSrc: serviceRes.data.serviceType
|
||||||
|
@ -41,6 +41,7 @@ import {
|
|||||||
getServiceDetailsPath,
|
getServiceDetailsPath,
|
||||||
} from '../../constants/constants';
|
} from '../../constants/constants';
|
||||||
import { EntityType } from '../../enums/entity.enum';
|
import { EntityType } from '../../enums/entity.enum';
|
||||||
|
import { ServiceCategory } from '../../enums/service.enum';
|
||||||
import {
|
import {
|
||||||
Table,
|
Table,
|
||||||
TableData,
|
TableData,
|
||||||
@ -231,7 +232,8 @@ const DatasetDetailsPage: FunctionComponent = () => {
|
|||||||
url: resService.data.name
|
url: resService.data.name
|
||||||
? getServiceDetailsPath(
|
? getServiceDetailsPath(
|
||||||
resService.data.name,
|
resService.data.name,
|
||||||
resService.data.serviceType
|
resService.data.serviceType,
|
||||||
|
ServiceCategory.DATABASE_SERVICES
|
||||||
)
|
)
|
||||||
: '',
|
: '',
|
||||||
imgSrc: resService.data.serviceType
|
imgSrc: resService.data.serviceType
|
||||||
|
@ -17,6 +17,7 @@ import {
|
|||||||
getDatasetVersionPath,
|
getDatasetVersionPath,
|
||||||
getServiceDetailsPath,
|
getServiceDetailsPath,
|
||||||
} from '../../constants/constants';
|
} from '../../constants/constants';
|
||||||
|
import { ServiceCategory } from '../../enums/service.enum';
|
||||||
import { Table } from '../../generated/entity/data/table';
|
import { Table } from '../../generated/entity/data/table';
|
||||||
import { EntityHistory } from '../../generated/type/entityHistory';
|
import { EntityHistory } from '../../generated/type/entityHistory';
|
||||||
import useToastContext from '../../hooks/useToastContext';
|
import useToastContext from '../../hooks/useToastContext';
|
||||||
@ -72,7 +73,8 @@ const EntityVersionPage: FunctionComponent = () => {
|
|||||||
url: resService.data.name
|
url: resService.data.name
|
||||||
? getServiceDetailsPath(
|
? getServiceDetailsPath(
|
||||||
resService.data.name,
|
resService.data.name,
|
||||||
resService.data.serviceType
|
resService.data.serviceType,
|
||||||
|
ServiceCategory.DATABASE_SERVICES
|
||||||
)
|
)
|
||||||
: '',
|
: '',
|
||||||
imgSrc: resService.data.serviceType
|
imgSrc: resService.data.serviceType
|
||||||
@ -131,7 +133,8 @@ const EntityVersionPage: FunctionComponent = () => {
|
|||||||
url: resService.data.name
|
url: resService.data.name
|
||||||
? getServiceDetailsPath(
|
? getServiceDetailsPath(
|
||||||
resService.data.name,
|
resService.data.name,
|
||||||
resService.data.serviceType
|
resService.data.serviceType,
|
||||||
|
ServiceCategory.DATABASE_SERVICES
|
||||||
)
|
)
|
||||||
: '',
|
: '',
|
||||||
imgSrc: resService.data.serviceType
|
imgSrc: resService.data.serviceType
|
||||||
|
@ -25,15 +25,12 @@ import { getIngestionWorkflows } from '../../axiosAPIs/ingestionWorkflowAPI';
|
|||||||
import { searchData } from '../../axiosAPIs/miscAPI';
|
import { searchData } from '../../axiosAPIs/miscAPI';
|
||||||
import Loader from '../../components/Loader/Loader';
|
import Loader from '../../components/Loader/Loader';
|
||||||
import MyData from '../../components/MyData/MyData.component';
|
import MyData from '../../components/MyData/MyData.component';
|
||||||
import { PAGE_SIZE } from '../../constants/constants';
|
|
||||||
import {
|
import {
|
||||||
myDataEntityCounts,
|
myDataEntityCounts,
|
||||||
myDataSearchIndex,
|
myDataSearchIndex,
|
||||||
} from '../../constants/Mydata.constants';
|
} from '../../constants/Mydata.constants';
|
||||||
import {
|
import { getEntityCountByType } from '../../utils/EntityUtils';
|
||||||
getAllServices,
|
import { getAllServices } from '../../utils/ServiceUtils';
|
||||||
getEntityCountByService,
|
|
||||||
} from '../../utils/ServiceUtils';
|
|
||||||
|
|
||||||
const MyDataPage = () => {
|
const MyDataPage = () => {
|
||||||
const [error, setError] = useState<string>('');
|
const [error, setError] = useState<string>('');
|
||||||
@ -49,7 +46,7 @@ const MyDataPage = () => {
|
|||||||
searchData(
|
searchData(
|
||||||
value.queryString,
|
value.queryString,
|
||||||
value.from,
|
value.from,
|
||||||
PAGE_SIZE,
|
0,
|
||||||
value.filters,
|
value.filters,
|
||||||
value.sortField,
|
value.sortField,
|
||||||
value.sortOrder,
|
value.sortOrder,
|
||||||
@ -59,8 +56,8 @@ const MyDataPage = () => {
|
|||||||
setSearchResult(res);
|
setSearchResult(res);
|
||||||
if (isUndefined(entityCounts)) {
|
if (isUndefined(entityCounts)) {
|
||||||
setEntityCounts(
|
setEntityCounts(
|
||||||
getEntityCountByService(
|
getEntityCountByType(
|
||||||
res.data.aggregations?.['sterms#Service']?.buckets
|
res.data.aggregations?.['sterms#EntityType']?.buckets
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@ import {
|
|||||||
getServiceDetailsPath,
|
getServiceDetailsPath,
|
||||||
} from '../../constants/constants';
|
} from '../../constants/constants';
|
||||||
import { EntityType } from '../../enums/entity.enum';
|
import { EntityType } from '../../enums/entity.enum';
|
||||||
|
import { ServiceCategory } from '../../enums/service.enum';
|
||||||
import { Pipeline, Task } from '../../generated/entity/data/pipeline';
|
import { Pipeline, Task } from '../../generated/entity/data/pipeline';
|
||||||
import { User } from '../../generated/entity/teams/user';
|
import { User } from '../../generated/entity/teams/user';
|
||||||
import { EntityLineage } from '../../generated/type/entityLineage';
|
import { EntityLineage } from '../../generated/type/entityLineage';
|
||||||
@ -147,7 +148,8 @@ const PipelineDetailsPage = () => {
|
|||||||
url: serviceRes.data.name
|
url: serviceRes.data.name
|
||||||
? getServiceDetailsPath(
|
? getServiceDetailsPath(
|
||||||
serviceRes.data.name,
|
serviceRes.data.name,
|
||||||
serviceRes.data.serviceType
|
serviceRes.data.serviceType,
|
||||||
|
ServiceCategory.PIPELINE_SERVICES
|
||||||
)
|
)
|
||||||
: '',
|
: '',
|
||||||
imgSrc: serviceRes.data.serviceType
|
imgSrc: serviceRes.data.serviceType
|
||||||
|
@ -20,6 +20,7 @@ import {
|
|||||||
getTopicDetailsPath,
|
getTopicDetailsPath,
|
||||||
} from '../../constants/constants';
|
} from '../../constants/constants';
|
||||||
import { EntityType } from '../../enums/entity.enum';
|
import { EntityType } from '../../enums/entity.enum';
|
||||||
|
import { ServiceCategory } from '../../enums/service.enum';
|
||||||
import { Topic } from '../../generated/entity/data/topic';
|
import { Topic } from '../../generated/entity/data/topic';
|
||||||
import { User } from '../../generated/entity/teams/user';
|
import { User } from '../../generated/entity/teams/user';
|
||||||
import useToastContext from '../../hooks/useToastContext';
|
import useToastContext from '../../hooks/useToastContext';
|
||||||
@ -143,7 +144,8 @@ const TopicDetailsPage: FunctionComponent = () => {
|
|||||||
url: serviceRes.data.name
|
url: serviceRes.data.name
|
||||||
? getServiceDetailsPath(
|
? getServiceDetailsPath(
|
||||||
serviceRes.data.name,
|
serviceRes.data.name,
|
||||||
serviceRes.data.serviceType
|
serviceRes.data.serviceType,
|
||||||
|
ServiceCategory.MESSAGING_SERVICES
|
||||||
)
|
)
|
||||||
: '',
|
: '',
|
||||||
imgSrc: serviceRes.data.serviceType
|
imgSrc: serviceRes.data.serviceType
|
||||||
|
@ -48,6 +48,7 @@ import {
|
|||||||
pagingObject,
|
pagingObject,
|
||||||
TITLE_FOR_NON_ADMIN_ACTION,
|
TITLE_FOR_NON_ADMIN_ACTION,
|
||||||
} from '../../constants/constants';
|
} from '../../constants/constants';
|
||||||
|
import { ServiceCategory } from '../../enums/service.enum';
|
||||||
import { Database } from '../../generated/entity/data/database';
|
import { Database } from '../../generated/entity/data/database';
|
||||||
import { Table } from '../../generated/entity/data/table';
|
import { Table } from '../../generated/entity/data/table';
|
||||||
import useToastContext from '../../hooks/useToastContext';
|
import useToastContext from '../../hooks/useToastContext';
|
||||||
@ -125,7 +126,8 @@ const DatabaseDetails: FunctionComponent = () => {
|
|||||||
url: resService.data.name
|
url: resService.data.name
|
||||||
? getServiceDetailsPath(
|
? getServiceDetailsPath(
|
||||||
resService.data.name,
|
resService.data.name,
|
||||||
resService.data.serviceType
|
resService.data.serviceType,
|
||||||
|
ServiceCategory.DATABASE_SERVICES
|
||||||
)
|
)
|
||||||
: '',
|
: '',
|
||||||
imgSrc: resService.data.serviceType
|
imgSrc: resService.data.serviceType
|
||||||
|
@ -70,9 +70,12 @@ type ServiceDataObj = { name: string } & Partial<DatabaseService> &
|
|||||||
Partial<PipelineService>;
|
Partial<PipelineService>;
|
||||||
|
|
||||||
const ServicePage: FunctionComponent = () => {
|
const ServicePage: FunctionComponent = () => {
|
||||||
const { serviceFQN, serviceType } = useParams() as Record<string, string>;
|
const { serviceFQN, serviceType, serviceCategory } = useParams() as Record<
|
||||||
|
string,
|
||||||
|
string
|
||||||
|
>;
|
||||||
const [serviceName, setServiceName] = useState(
|
const [serviceName, setServiceName] = useState(
|
||||||
getServiceCategoryFromType(serviceType)
|
serviceCategory || getServiceCategoryFromType(serviceType)
|
||||||
);
|
);
|
||||||
const [slashedTableName, setSlashedTableName] = useState<
|
const [slashedTableName, setSlashedTableName] = useState<
|
||||||
TitleBreadcrumbProps['titleLinks']
|
TitleBreadcrumbProps['titleLinks']
|
||||||
@ -578,8 +581,8 @@ const ServicePage: FunctionComponent = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setServiceName(getServiceCategoryFromType(serviceType));
|
setServiceName(serviceCategory || getServiceCategoryFromType(serviceType));
|
||||||
}, [serviceType]);
|
}, [serviceCategory, serviceType]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getServiceByFQN(serviceName, serviceFQN).then(
|
getServiceByFQN(serviceName, serviceFQN).then(
|
||||||
|
@ -468,7 +468,8 @@ const ServicesPage = () => {
|
|||||||
<Link
|
<Link
|
||||||
to={getServiceDetailsPath(
|
to={getServiceDetailsPath(
|
||||||
service.name,
|
service.name,
|
||||||
service.serviceType || ''
|
service.serviceType || '',
|
||||||
|
serviceName
|
||||||
)}>
|
)}>
|
||||||
<button>
|
<button>
|
||||||
<h6
|
<h6
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { isNil } from 'lodash';
|
import { isNil } from 'lodash';
|
||||||
|
import { Bucket } from 'Models';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import TableProfilerGraph from '../components/TableProfiler/TableProfilerGraph.component';
|
import TableProfilerGraph from '../components/TableProfiler/TableProfilerGraph.component';
|
||||||
import {
|
import {
|
||||||
@ -7,6 +8,7 @@ import {
|
|||||||
getTeamDetailsPath,
|
getTeamDetailsPath,
|
||||||
} from '../constants/constants';
|
} from '../constants/constants';
|
||||||
import { EntityType } from '../enums/entity.enum';
|
import { EntityType } from '../enums/entity.enum';
|
||||||
|
import { ServiceCategory } from '../enums/service.enum';
|
||||||
import { Dashboard } from '../generated/entity/data/dashboard';
|
import { Dashboard } from '../generated/entity/data/dashboard';
|
||||||
import { Pipeline } from '../generated/entity/data/pipeline';
|
import { Pipeline } from '../generated/entity/data/pipeline';
|
||||||
import { Table } from '../generated/entity/data/table';
|
import { Table } from '../generated/entity/data/table';
|
||||||
@ -79,7 +81,11 @@ export const getEntityOverview = (
|
|||||||
{
|
{
|
||||||
name: 'Service',
|
name: 'Service',
|
||||||
value: service,
|
value: service,
|
||||||
url: getServiceDetailsPath(service, serviceType),
|
url: getServiceDetailsPath(
|
||||||
|
service,
|
||||||
|
serviceType,
|
||||||
|
ServiceCategory.DATABASE_SERVICES
|
||||||
|
),
|
||||||
isLink: true,
|
isLink: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -166,7 +172,11 @@ export const getEntityOverview = (
|
|||||||
{
|
{
|
||||||
name: 'Service',
|
name: 'Service',
|
||||||
value: service?.name as string,
|
value: service?.name as string,
|
||||||
url: getServiceDetailsPath(service?.name as string, serviceType),
|
url: getServiceDetailsPath(
|
||||||
|
service?.name as string,
|
||||||
|
serviceType,
|
||||||
|
ServiceCategory.PIPELINE_SERVICES
|
||||||
|
),
|
||||||
isLink: true,
|
isLink: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -200,3 +210,37 @@ export const getEntityOverview = (
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Note: This method is enhanced from "getEntityCountByService" of ServiceUtils.ts
|
||||||
|
export const getEntityCountByType = (buckets: Array<Bucket>) => {
|
||||||
|
const entityCounts = {
|
||||||
|
tableCount: 0,
|
||||||
|
topicCount: 0,
|
||||||
|
dashboardCount: 0,
|
||||||
|
pipelineCount: 0,
|
||||||
|
};
|
||||||
|
buckets?.forEach((bucket) => {
|
||||||
|
switch (bucket.key) {
|
||||||
|
case EntityType.TABLE:
|
||||||
|
entityCounts.tableCount += bucket.doc_count;
|
||||||
|
|
||||||
|
break;
|
||||||
|
case EntityType.TOPIC:
|
||||||
|
entityCounts.topicCount += bucket.doc_count;
|
||||||
|
|
||||||
|
break;
|
||||||
|
case EntityType.DASHBOARD:
|
||||||
|
entityCounts.dashboardCount += bucket.doc_count;
|
||||||
|
|
||||||
|
break;
|
||||||
|
case EntityType.PIPELINE:
|
||||||
|
entityCounts.pipelineCount += bucket.doc_count;
|
||||||
|
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return entityCounts;
|
||||||
|
};
|
||||||
|
@ -6,9 +6,11 @@ import {
|
|||||||
AIRFLOW,
|
AIRFLOW,
|
||||||
ATHENA,
|
ATHENA,
|
||||||
BIGQUERY,
|
BIGQUERY,
|
||||||
|
GLUE,
|
||||||
HIVE,
|
HIVE,
|
||||||
KAFKA,
|
KAFKA,
|
||||||
LOOKER,
|
LOOKER,
|
||||||
|
MARIADB,
|
||||||
MSSQL,
|
MSSQL,
|
||||||
MYSQL,
|
MYSQL,
|
||||||
ORACLE,
|
ORACLE,
|
||||||
@ -24,6 +26,7 @@ import {
|
|||||||
SUPERSET,
|
SUPERSET,
|
||||||
TABLEAU,
|
TABLEAU,
|
||||||
TRINO,
|
TRINO,
|
||||||
|
VERTICA,
|
||||||
} from '../constants/services.const';
|
} from '../constants/services.const';
|
||||||
import {
|
import {
|
||||||
DashboardServiceType,
|
DashboardServiceType,
|
||||||
@ -69,6 +72,15 @@ export const serviceTypeLogo = (type: string) => {
|
|||||||
case DatabaseServiceType.TRINO:
|
case DatabaseServiceType.TRINO:
|
||||||
return TRINO;
|
return TRINO;
|
||||||
|
|
||||||
|
case DatabaseServiceType.GLUE:
|
||||||
|
return GLUE;
|
||||||
|
|
||||||
|
case DatabaseServiceType.MARIADB:
|
||||||
|
return MARIADB;
|
||||||
|
|
||||||
|
case DatabaseServiceType.VERTICA:
|
||||||
|
return VERTICA;
|
||||||
|
|
||||||
case MessagingServiceType.KAFKA:
|
case MessagingServiceType.KAFKA:
|
||||||
return KAFKA;
|
return KAFKA;
|
||||||
|
|
||||||
@ -194,6 +206,7 @@ export const getServiceCategoryFromType = (
|
|||||||
return serviceCategory;
|
return serviceCategory;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Note: This method is deprecated by "getEntityCountByType" of EntityUtils.ts
|
||||||
export const getEntityCountByService = (buckets: Array<Bucket>) => {
|
export const getEntityCountByService = (buckets: Array<Bucket>) => {
|
||||||
const entityCounts = {
|
const entityCounts = {
|
||||||
tableCount: 0,
|
tableCount: 0,
|
||||||
@ -212,6 +225,9 @@ export const getEntityCountByService = (buckets: Array<Bucket>) => {
|
|||||||
case DatabaseServiceType.POSTGRES:
|
case DatabaseServiceType.POSTGRES:
|
||||||
case DatabaseServiceType.PRESTO:
|
case DatabaseServiceType.PRESTO:
|
||||||
case DatabaseServiceType.TRINO:
|
case DatabaseServiceType.TRINO:
|
||||||
|
case DatabaseServiceType.GLUE:
|
||||||
|
case DatabaseServiceType.MARIADB:
|
||||||
|
case DatabaseServiceType.VERTICA:
|
||||||
case DatabaseServiceType.REDSHIFT:
|
case DatabaseServiceType.REDSHIFT:
|
||||||
case DatabaseServiceType.SNOWFLAKE:
|
case DatabaseServiceType.SNOWFLAKE:
|
||||||
entityCounts.tableCount += bucket.doc_count;
|
entityCounts.tableCount += bucket.doc_count;
|
||||||
@ -295,6 +311,11 @@ export const getIngestionTypeList = (
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case DatabaseServiceType.VERTICA:
|
||||||
|
ingestionType = [IngestionType.VERTICA];
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user