fix asset service icon, support some search index value, and fix ingestion encoded issue (#13576)

This commit is contained in:
Ashish Gupta 2023-10-16 18:49:34 +05:30 committed by GitHub
parent d6be186958
commit 063590d54f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 1 deletions

View File

@ -19,6 +19,7 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import ErrorPlaceHolderIngestion from '../../components/common/error-with-placeholder/ErrorPlaceHolderIngestion'; import ErrorPlaceHolderIngestion from '../../components/common/error-with-placeholder/ErrorPlaceHolderIngestion';
import { IngestionPipeline } from '../../generated/entity/services/ingestionPipelines/ingestionPipeline'; import { IngestionPipeline } from '../../generated/entity/services/ingestionPipelines/ingestionPipeline';
import { getEncodedFqn } from '../../utils/StringsUtils';
import { showErrorToast } from '../../utils/ToastUtils'; import { showErrorToast } from '../../utils/ToastUtils';
import Searchbar from '../common/searchbar/Searchbar'; import Searchbar from '../common/searchbar/Searchbar';
import EntityDeleteModal from '../Modals/EntityDeleteModal/EntityDeleteModal'; import EntityDeleteModal from '../Modals/EntityDeleteModal/EntityDeleteModal';
@ -85,7 +86,10 @@ const Ingestion: React.FC<IngestionProps> = ({
const fetchIngestionPipelinesPermission = async () => { const fetchIngestionPipelinesPermission = async () => {
try { try {
const promises = ingestionList.map((item) => const promises = ingestionList.map((item) =>
getEntityPermissionByFqn(ResourceEntity.INGESTION_PIPELINE, item.name) getEntityPermissionByFqn(
ResourceEntity.INGESTION_PIPELINE,
getEncodedFqn(item.name)
)
); );
const response = await Promise.allSettled(promises); const response = await Promise.allSettled(promises);

View File

@ -41,6 +41,8 @@
"dashboardService", "dashboardService",
"pipelineService", "pipelineService",
"mlmodelService", "mlmodelService",
"storageService",
"metadataService",
"searchService", "searchService",
"entityReportData", "entityReportData",
"webAnalyticEntityViewReportData", "webAnalyticEntityViewReportData",
@ -75,6 +77,8 @@
"dashboardService", "dashboardService",
"pipelineService", "pipelineService",
"mlmodelService", "mlmodelService",
"storageService",
"metadataService",
"searchService", "searchService",
"entityReportData", "entityReportData",
"webAnalyticEntityViewReportData", "webAnalyticEntityViewReportData",

View File

@ -321,26 +321,31 @@ export const getEntityIcon = (indexType: string) => {
switch (indexType) { switch (indexType) {
case SearchIndex.TOPIC: case SearchIndex.TOPIC:
case EntityType.TOPIC: case EntityType.TOPIC:
case EntityType.MESSAGING_SERVICE:
case SearchIndex.MESSAGING_SERVICE: case SearchIndex.MESSAGING_SERVICE:
return <TopicIcon />; return <TopicIcon />;
case SearchIndex.DASHBOARD: case SearchIndex.DASHBOARD:
case EntityType.DASHBOARD: case EntityType.DASHBOARD:
case EntityType.DASHBOARD_SERVICE:
case SearchIndex.DASHBOARD_SERVICE: case SearchIndex.DASHBOARD_SERVICE:
return <DashboardIcon />; return <DashboardIcon />;
case SearchIndex.MLMODEL: case SearchIndex.MLMODEL:
case EntityType.MLMODEL: case EntityType.MLMODEL:
case EntityType.MLMODEL_SERVICE:
case SearchIndex.ML_MODEL_SERVICE: case SearchIndex.ML_MODEL_SERVICE:
return <MlModelIcon />; return <MlModelIcon />;
case SearchIndex.PIPELINE: case SearchIndex.PIPELINE:
case EntityType.PIPELINE: case EntityType.PIPELINE:
case EntityType.PIPELINE_SERVICE:
case SearchIndex.PIPELINE_SERVICE: case SearchIndex.PIPELINE_SERVICE:
return <PipelineIcon />; return <PipelineIcon />;
case SearchIndex.CONTAINER: case SearchIndex.CONTAINER:
case EntityType.CONTAINER: case EntityType.CONTAINER:
case EntityType.STORAGE_SERVICE:
case SearchIndex.STORAGE_SERVICE: case SearchIndex.STORAGE_SERVICE:
return <ContainerIcon />; return <ContainerIcon />;