{
const history = useHistory();
const [form] = useForm();
- const { entityType, entityFQN } = useParams<{ [key: string]: string }>();
+ const { entityType, fqn: entityFQN } =
+ useParams<{ fqn: string; entityType: EntityType }>();
const queryParams = new URLSearchParams(location.search);
const field = queryParams.get('field');
@@ -96,7 +97,7 @@ const UpdateTag = () => {
return getColumnObject(
column[0],
getEntityColumnsDetails(entityType, entityData),
- entityType as EntityType,
+ entityType,
chartData
);
}, [field, entityData, chartData, entityType]);
@@ -146,7 +147,7 @@ const UpdateTag = () => {
);
history.push(
getEntityDetailLink(
- entityType as EntityType,
+ entityType,
entityType === EntityType.TABLE
? entityFQN
: getDecodedFqn(entityFQN),
@@ -160,7 +161,7 @@ const UpdateTag = () => {
useEffect(() => {
fetchEntityDetail(
- entityType as EntityType,
+ entityType,
entityFQN as string,
setEntityData,
setChartData
@@ -202,7 +203,7 @@ const UpdateTag = () => {
();
+ const { fqn: testCaseFQN } = useParams<{ fqn: string }>();
const { t } = useTranslation();
const [testCaseData, setTestCaseData] = useState();
diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/TestSuiteDetailsPage/TestSuiteDetailsPage.component.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/TestSuiteDetailsPage/TestSuiteDetailsPage.component.tsx
index 1ec214755f2..718af69921b 100644
--- a/openmetadata-ui/src/main/resources/ui/src/pages/TestSuiteDetailsPage/TestSuiteDetailsPage.component.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/pages/TestSuiteDetailsPage/TestSuiteDetailsPage.component.tsx
@@ -58,7 +58,7 @@ import './TestSuiteDetailsPage.styles.less';
const TestSuiteDetailsPage = () => {
const { t } = useTranslation();
const { getEntityPermissionByFqn } = usePermissionProvider();
- const { testSuiteFQN } = useParams>();
+ const { fqn: testSuiteFQN } = useParams<{ fqn: string }>();
const { isAdminUser } = useAuth();
const history = useHistory();
const { isAuthDisabled } = useAuthContext();
diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/TestSuiteDetailsPage/TestSuiteDetailsPage.test.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/TestSuiteDetailsPage/TestSuiteDetailsPage.test.tsx
index 7ba7dd27a08..550e61798d9 100644
--- a/openmetadata-ui/src/main/resources/ui/src/pages/TestSuiteDetailsPage/TestSuiteDetailsPage.test.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/pages/TestSuiteDetailsPage/TestSuiteDetailsPage.test.tsx
@@ -67,9 +67,7 @@ jest.mock('hooks/authHooks', () => {
jest.mock('react-router-dom', () => {
return {
useHistory: jest.fn().mockImplementation(() => ({ push: jest.fn() })),
- useParams: jest
- .fn()
- .mockImplementation(() => ({ testSuiteFQN: 'testSuiteFQN' })),
+ useParams: jest.fn().mockImplementation(() => ({ fqn: 'testSuiteFQN' })),
};
});
jest.mock('rest/testAPI', () => {
diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/TestSuiteIngestionPage/TestSuiteIngestionPage.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/TestSuiteIngestionPage/TestSuiteIngestionPage.tsx
index 157f6e6c360..552f55cc3ac 100644
--- a/openmetadata-ui/src/main/resources/ui/src/pages/TestSuiteIngestionPage/TestSuiteIngestionPage.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/pages/TestSuiteIngestionPage/TestSuiteIngestionPage.tsx
@@ -34,7 +34,8 @@ import { getDataQualityPagePath } from '../../utils/RouterUtils';
import { showErrorToast } from '../../utils/ToastUtils';
const TestSuiteIngestionPage = () => {
- const { testSuiteFQN, ingestionFQN } = useParams>();
+ const { fqn: testSuiteFQN, ingestionFQN } =
+ useParams<{ fqn: string; ingestionFQN: string }>();
const { t } = useTranslation();
const history = useHistory();
diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/TopicDetails/TopicDetailsPage.component.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/TopicDetails/TopicDetailsPage.component.tsx
index 48b01dba93e..39031173325 100644
--- a/openmetadata-ui/src/main/resources/ui/src/pages/TopicDetails/TopicDetailsPage.component.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/pages/TopicDetails/TopicDetailsPage.component.tsx
@@ -61,7 +61,7 @@ const TopicDetailsPage: FunctionComponent = () => {
const history = useHistory();
const { getEntityPermissionByFqn } = usePermissionProvider();
- const { topicFQN } = useParams<{ topicFQN: string }>();
+ const { fqn: topicFQN } = useParams<{ fqn: string }>();
const [topicDetails, setTopicDetails] = useState({} as Topic);
const [isLoading, setLoading] = useState(true);
const [isError, setIsError] = useState(false);
@@ -128,7 +128,6 @@ const TopicDetailsPage: FunctionComponent = () => {
TabSpecificField.OWNER,
TabSpecificField.FOLLOWERS,
TabSpecificField.TAGS,
- TabSpecificField.EXTENSION,
TabSpecificField.DOMAIN,
TabSpecificField.DATA_PRODUCTS,
TabSpecificField.VOTES,
@@ -237,7 +236,6 @@ const TopicDetailsPage: FunctionComponent = () => {
TabSpecificField.OWNER,
TabSpecificField.FOLLOWERS,
TabSpecificField.TAGS,
- TabSpecificField.EXTENSION,
TabSpecificField.VOTES,
]);
setTopicDetails(details);
diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/UserPage/UserPage.component.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/UserPage/UserPage.component.tsx
index 816c0676ec4..babbcd58a19 100644
--- a/openmetadata-ui/src/main/resources/ui/src/pages/UserPage/UserPage.component.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/pages/UserPage/UserPage.component.tsx
@@ -43,8 +43,8 @@ import { UserAssetsDataType } from './UserPage.interface';
const UserPage = () => {
const history = useHistory();
const { t } = useTranslation();
- const { username, tab = UserProfileTab.ACTIVITY } =
- useParams<{ [key: string]: string }>();
+ const { fqn: username, tab = UserProfileTab.ACTIVITY } =
+ useParams<{ fqn: string; tab: UserProfileTab }>();
const [isLoading, setIsLoading] = useState(true);
const [userData, setUserData] = useState({} as User);
const [isError, setIsError] = useState(false);
diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/teams/TeamsPage.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/teams/TeamsPage.tsx
index 69ae4de7edb..e7bfcbf205b 100644
--- a/openmetadata-ui/src/main/resources/ui/src/pages/teams/TeamsPage.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/pages/teams/TeamsPage.tsx
@@ -68,7 +68,7 @@ const TeamsPage = () => {
const { getEntityPermissionByFqn } = usePermissionProvider();
const { isAdminUser } = useAuth();
const { isAuthDisabled } = useAuthContext();
- const { fqn } = useParams<{ [key: string]: string }>();
+ const { fqn } = useParams<{ fqn: string }>();
const [currentFqn, setCurrentFqn] = useState('');
const [allTeam, setAllTeam] = useState([]);
const [selectedTeam, setSelectedTeam] = useState({} as Team);
diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/CommonUtils.tsx b/openmetadata-ui/src/main/resources/ui/src/utils/CommonUtils.tsx
index 1464d61e895..246e97415f9 100644
--- a/openmetadata-ui/src/main/resources/ui/src/utils/CommonUtils.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/utils/CommonUtils.tsx
@@ -846,7 +846,7 @@ export const getEntityDetailLink = (
break;
- case EntityType.USER_NAME:
+ case EntityType.USER:
path = getUserPath(fqn, tab, subTab);
break;
diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/CustomProperties/CustomProperty.utils.ts b/openmetadata-ui/src/main/resources/ui/src/utils/CustomProperties/CustomProperty.utils.ts
new file mode 100644
index 00000000000..c376b35692c
--- /dev/null
+++ b/openmetadata-ui/src/main/resources/ui/src/utils/CustomProperties/CustomProperty.utils.ts
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2023 Collate.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import {
+ ExtentionEntities,
+ ExtentionEntitiesKeys,
+} from 'components/common/CustomPropertyTable/CustomPropertyTable.interface';
+import { EntityType, TabSpecificField } from 'enums/entity.enum';
+import { getDashboardByFqn } from 'rest/dashboardAPI';
+import {
+ getDatabaseDetailsByFQN,
+ getDatabaseSchemaDetailsByFQN,
+} from 'rest/databaseAPI';
+import { getGlossaryTermByFQN } from 'rest/glossaryAPI';
+import { getMlModelByFQN } from 'rest/mlModelAPI';
+import { getPipelineByFqn } from 'rest/pipelineAPI';
+import { getSearchIndexDetailsByFQN } from 'rest/SearchIndexAPI';
+import { getContainerByFQN } from 'rest/storageAPI';
+import { getStoredProceduresDetailsByFQN } from 'rest/storedProceduresAPI';
+import { getTableDetailsByFQN } from 'rest/tableAPI';
+import { getTopicByFqn } from 'rest/topicsAPI';
+
+export const getEntityExtentionDetailsFromEntityType = <
+ T extends ExtentionEntitiesKeys
+>(
+ type: T,
+ fqn: string
+): Promise | void => {
+ switch (type) {
+ case EntityType.TABLE:
+ return getTableDetailsByFQN(fqn, TabSpecificField.EXTENSION);
+ case EntityType.TOPIC:
+ return getTopicByFqn(fqn, TabSpecificField.EXTENSION);
+ case EntityType.DASHBOARD:
+ return getDashboardByFqn(fqn, TabSpecificField.EXTENSION);
+ case EntityType.PIPELINE:
+ return getPipelineByFqn(fqn, TabSpecificField.EXTENSION);
+ case EntityType.MLMODEL:
+ return getMlModelByFQN(fqn, TabSpecificField.EXTENSION);
+ case EntityType.CONTAINER:
+ return getContainerByFQN(fqn, TabSpecificField.EXTENSION);
+ case EntityType.SEARCH_INDEX:
+ return getSearchIndexDetailsByFQN(fqn, TabSpecificField.EXTENSION);
+ case EntityType.STORED_PROCEDURE:
+ return getStoredProceduresDetailsByFQN(fqn, TabSpecificField.EXTENSION);
+ case EntityType.GLOSSARY_TERM:
+ return getGlossaryTermByFQN(fqn, TabSpecificField.EXTENSION);
+ case EntityType.DATABASE:
+ return getDatabaseDetailsByFQN(fqn, TabSpecificField.EXTENSION);
+ case EntityType.DATABASE_SCHEMA:
+ return getDatabaseSchemaDetailsByFQN(fqn, TabSpecificField.EXTENSION);
+ default:
+ // eslint-disable-next-line no-console
+ console.error(`Custom properties for Entity: ${type} not supported yet.`);
+ }
+};
diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/DashboardDetailsUtils.ts b/openmetadata-ui/src/main/resources/ui/src/utils/DashboardDetailsUtils.ts
index bae7c552509..db8ef499ec0 100644
--- a/openmetadata-ui/src/main/resources/ui/src/utils/DashboardDetailsUtils.ts
+++ b/openmetadata-ui/src/main/resources/ui/src/utils/DashboardDetailsUtils.ts
@@ -18,7 +18,7 @@ import { TabSpecificField } from '../enums/entity.enum';
import { Dashboard } from '../generated/entity/data/dashboard';
import { sortTagsCaseInsensitive } from './CommonUtils';
-export const defaultFields = `${TabSpecificField.DOMAIN},${TabSpecificField.OWNER}, ${TabSpecificField.FOLLOWERS}, ${TabSpecificField.TAGS}, ${TabSpecificField.CHARTS},${TabSpecificField.EXTENSION},
+export const defaultFields = `${TabSpecificField.DOMAIN},${TabSpecificField.OWNER}, ${TabSpecificField.FOLLOWERS}, ${TabSpecificField.TAGS}, ${TabSpecificField.CHARTS},
${TabSpecificField.VOTES},${TabSpecificField.DATA_PRODUCTS}`;
export const sortTagsForCharts = (charts: ChartType[]) => {
diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/DatasetDetailsUtils.ts b/openmetadata-ui/src/main/resources/ui/src/utils/DatasetDetailsUtils.ts
index 9411c271479..bfff6032ce7 100644
--- a/openmetadata-ui/src/main/resources/ui/src/utils/DatasetDetailsUtils.ts
+++ b/openmetadata-ui/src/main/resources/ui/src/utils/DatasetDetailsUtils.ts
@@ -14,4 +14,4 @@
import { TabSpecificField } from '../enums/entity.enum';
// eslint-disable-next-line max-len
-export const defaultFields = `${TabSpecificField.COLUMNS},${TabSpecificField.FOLLOWERS},${TabSpecificField.JOINS},${TabSpecificField.TAGS},${TabSpecificField.OWNER},${TabSpecificField.DATAMODEL},${TabSpecificField.TABLE_CONSTRAINTS},${TabSpecificField.EXTENSION},${TabSpecificField.VIEW_DEFINITION},${TabSpecificField.DOMAIN},${TabSpecificField.DATA_PRODUCTS},${TabSpecificField.VOTES}`;
+export const defaultFields = `${TabSpecificField.COLUMNS},${TabSpecificField.FOLLOWERS},${TabSpecificField.JOINS},${TabSpecificField.TAGS},${TabSpecificField.OWNER},${TabSpecificField.DATAMODEL},${TabSpecificField.TABLE_CONSTRAINTS},${TabSpecificField.VIEW_DEFINITION},${TabSpecificField.DOMAIN},${TabSpecificField.DATA_PRODUCTS},${TabSpecificField.VOTES}`;
diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/EntityLineageUtils.test.tsx b/openmetadata-ui/src/main/resources/ui/src/utils/EntityLineageUtils.test.tsx
index 818381ec0c6..256a6f6bec9 100644
--- a/openmetadata-ui/src/main/resources/ui/src/utils/EntityLineageUtils.test.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/utils/EntityLineageUtils.test.tsx
@@ -58,7 +58,6 @@ import {
getEdgeStyle,
getEdgeType,
getEntityLineagePath,
- getParamByEntityType,
getRemovedNodeData,
getUpdatedEdge,
getUpdatedEdgeWithPipeline,
@@ -68,7 +67,7 @@ import {
isTracedEdge,
} from './EntityLineageUtils';
-describe.skip('Test EntityLineageUtils utility', () => {
+describe('Test EntityLineageUtils utility', () => {
it('findUpstreamDownStreamEdge function should work properly', () => {
const upstreamData = findUpstreamDownStreamEdge(
MOCK_LINEAGE_DATA.upstreamEdges,
@@ -313,22 +312,6 @@ describe.skip('Test EntityLineageUtils utility', () => {
expect(isColumnTracedFalsy).toBeFalsy();
});
- it('returns the correct parameter for table entity types - getParamByEntityType', () => {
- expect(getParamByEntityType(EntityType.TABLE)).toEqual('datasetFQN');
- });
-
- it('returns the correct parameter for other entity types - getParamByEntityType', () => {
- expect(getParamByEntityType(EntityType.TOPIC)).toEqual('topicFQN');
- expect(getParamByEntityType(EntityType.PIPELINE)).toEqual('pipelineFQN');
- expect(getParamByEntityType(EntityType.MLMODEL)).toEqual('mlModelFqn');
- expect(getParamByEntityType(EntityType.DASHBOARD)).toEqual('dashboardFQN');
- expect(getParamByEntityType(EntityType.DATABASE)).toEqual('databaseFQN');
- expect(getParamByEntityType(EntityType.DATABASE_SCHEMA)).toEqual(
- 'databaseSchemaFQN'
- );
- expect(getParamByEntityType(EntityType.ALERT)).toEqual('entityFQN');
- });
-
it('should return the correct lineage path for the given entity type and FQN', () => {
expect(getEntityLineagePath(EntityType.TABLE, 'myTable')).toEqual(
getTableTabPath('myTable', 'lineage')
@@ -345,7 +328,6 @@ describe.skip('Test EntityLineageUtils utility', () => {
expect(getEntityLineagePath(EntityType.MLMODEL, 'myModel')).toEqual(
getMlModelPath('myModel', 'lineage')
);
- expect(getEntityLineagePath(EntityType.TABLE, 'myDataset')).toEqual('');
});
it('getChildMap should return valid map object', () => {
@@ -356,7 +338,7 @@ describe.skip('Test EntityLineageUtils utility', () => {
const expectedStyle = {
opacity: 1,
strokeWidth: 2,
- stroke: '#B02AAC',
+ stroke: '#2196f3',
};
expect(getEdgeStyle(true)).toEqual(expectedStyle);
diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/EntityLineageUtils.tsx b/openmetadata-ui/src/main/resources/ui/src/utils/EntityLineageUtils.tsx
index 4afec2b2a94..3c89ac7c697 100644
--- a/openmetadata-ui/src/main/resources/ui/src/utils/EntityLineageUtils.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/utils/EntityLineageUtils.tsx
@@ -1313,33 +1313,6 @@ export const removeLineageHandler = async (data: EdgeData): Promise => {
}
};
-export const getParamByEntityType = (entityType: EntityType): string => {
- switch (entityType) {
- case EntityType.TABLE:
- return 'datasetFQN';
- case EntityType.TOPIC:
- return 'topicFQN';
- case EntityType.PIPELINE:
- return 'pipelineFQN';
- case EntityType.MLMODEL:
- return 'mlModelFqn';
- case EntityType.DASHBOARD:
- return 'dashboardFQN';
- case EntityType.SEARCH_INDEX:
- return 'searchIndexFQN';
- case EntityType.DATABASE:
- return 'databaseFQN';
- case EntityType.DATABASE_SCHEMA:
- return 'databaseSchemaFQN';
- case EntityType.DASHBOARD_DATA_MODEL:
- return 'dashboardDataModelFQN';
- case EntityType.STORED_PROCEDURE:
- return 'storedProcedureFQN';
- default:
- return 'entityFQN';
- }
-};
-
export const getEntityLineagePath = (
entityType: EntityType,
entityFQN: string
diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/EntityVersionUtils.tsx b/openmetadata-ui/src/main/resources/ui/src/utils/EntityVersionUtils.tsx
index 729366d7137..67ea7e1387b 100644
--- a/openmetadata-ui/src/main/resources/ui/src/utils/EntityVersionUtils.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/utils/EntityVersionUtils.tsx
@@ -13,7 +13,10 @@
import { Space, Typography } from 'antd';
import { ReactComponent as IconTeamsGrey } from 'assets/svg/teams-grey.svg';
-import { EntityDetails } from 'components/common/CustomPropertyTable/CustomPropertyTable.interface';
+import {
+ ExtentionEntities,
+ ExtentionEntitiesKeys,
+} from 'components/common/CustomPropertyTable/CustomPropertyTable.interface';
import ProfilePicture from 'components/common/ProfilePicture/ProfilePicture';
import { FQN_SEPARATOR_CHAR } from 'constants/char.constants';
import { getTeamAndUserDetailsPath, getUserPath } from 'constants/constants';
@@ -719,7 +722,7 @@ export function getColumnsDataWithVersionChanges<
}
export const getUpdatedExtensionDiffFields = (
- entityDetails: EntityDetails,
+ entityDetails: ExtentionEntities[ExtentionEntitiesKeys],
extensionDiff: EntityDiffProps
) => {
const extensionObj = entityDetails.extension;
diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/GlobalSettingsUtils.tsx b/openmetadata-ui/src/main/resources/ui/src/utils/GlobalSettingsUtils.tsx
index d53c1703b72..4861a55ed12 100644
--- a/openmetadata-ui/src/main/resources/ui/src/utils/GlobalSettingsUtils.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/utils/GlobalSettingsUtils.tsx
@@ -14,6 +14,30 @@
import { SearchOutlined } from '@ant-design/icons';
import { Badge } from 'antd';
import { ItemType } from 'antd/lib/menu/hooks/useItems';
+import { ReactComponent as AdminIcon } from 'assets/svg/admin.svg';
+import { ReactComponent as AllActivityIcon } from 'assets/svg/all-activity.svg';
+import { ReactComponent as BotIcon } from 'assets/svg/bot-profile.svg';
+import { ReactComponent as DashboardIcon } from 'assets/svg/dashboard-grey.svg';
+import { ReactComponent as DataInsightIcon } from 'assets/svg/data-insight.svg';
+import { ReactComponent as ElasticSearchIcon } from 'assets/svg/elasticsearch.svg';
+import { ReactComponent as EmailSettingsIcon } from 'assets/svg/email-settings.svg';
+import { ReactComponent as GlossaryIcon } from 'assets/svg/glossary.svg';
+import { ReactComponent as BellIcon } from 'assets/svg/ic-alert-bell.svg';
+import { ReactComponent as CustomLogoIcon } from 'assets/svg/ic-custom-logo.svg';
+import { ReactComponent as DataInsightReportIcon } from 'assets/svg/ic-data-insight-report.svg';
+import { ReactComponent as DatabaseIcon } from 'assets/svg/ic-database.svg';
+import { ReactComponent as SchemaIcon } from 'assets/svg/ic-schema.svg';
+import { ReactComponent as StorageIcon } from 'assets/svg/ic-storage.svg';
+import { ReactComponent as StoredProcedureIcon } from 'assets/svg/ic-stored-procedure.svg';
+import { ReactComponent as RolesIcon } from 'assets/svg/icon-role-grey.svg';
+import { ReactComponent as OMLogo } from 'assets/svg/metadata.svg';
+import { ReactComponent as MlModelIcon } from 'assets/svg/mlmodal.svg';
+import { ReactComponent as PipelineIcon } from 'assets/svg/pipeline-grey.svg';
+import { ReactComponent as PoliciesIcon } from 'assets/svg/policies.svg';
+import { ReactComponent as TableIcon } from 'assets/svg/table-grey.svg';
+import { ReactComponent as TeamsIcon } from 'assets/svg/teams-grey.svg';
+import { ReactComponent as TopicIcon } from 'assets/svg/topic-grey.svg';
+import { ReactComponent as UsersIcon } from 'assets/svg/user.svg';
import classNames from 'classnames';
import {
ResourceEntity,
@@ -23,28 +47,7 @@ import { GlobalSettingOptions } from 'constants/GlobalSettings.constants';
import { EntityType } from 'enums/entity.enum';
import i18next from 'i18next';
import React, { ReactNode } from 'react';
-import { ReactComponent as AdminIcon } from '../../src/assets/svg/admin.svg';
-import { ReactComponent as AllActivityIcon } from '../../src/assets/svg/all-activity.svg';
-import { ReactComponent as BotIcon } from '../../src/assets/svg/bot-profile.svg';
-import { ReactComponent as DashboardIcon } from '../../src/assets/svg/dashboard-grey.svg';
-import { ReactComponent as DataInsightIcon } from '../../src/assets/svg/data-insight.svg';
-import { ReactComponent as ElasticSearchIcon } from '../../src/assets/svg/elasticsearch.svg';
-import { ReactComponent as EmailSettingsIcon } from '../../src/assets/svg/email-settings.svg';
-import { ReactComponent as BellIcon } from '../../src/assets/svg/ic-alert-bell.svg';
-import { ReactComponent as DataInsightReportIcon } from '../../src/assets/svg/ic-data-insight-report.svg';
-import { ReactComponent as RolesIcon } from '../../src/assets/svg/icon-role-grey.svg';
-import { ReactComponent as OMLogo } from '../../src/assets/svg/metadata.svg';
-import { ReactComponent as MlModelIcon } from '../../src/assets/svg/mlmodal.svg';
-import { ReactComponent as PipelineIcon } from '../../src/assets/svg/pipeline-grey.svg';
-import { ReactComponent as PoliciesIcon } from '../../src/assets/svg/policies.svg';
-import { ReactComponent as TableIcon } from '../../src/assets/svg/table-grey.svg';
-import { ReactComponent as TeamsIcon } from '../../src/assets/svg/teams-grey.svg';
-import { ReactComponent as TopicIcon } from '../../src/assets/svg/topic-grey.svg';
-import { ReactComponent as UsersIcon } from '../../src/assets/svg/user.svg';
-import { ReactComponent as CustomLogoIcon } from '../assets/svg/ic-custom-logo.svg';
-import { ReactComponent as StorageIcon } from '../assets/svg/ic-storage.svg';
-import { ReactComponent as StoredProcedureIcon } from '../assets/svg/ic-stored-procedure.svg';
-import { userPermissions } from '../utils/PermissionsUtils';
+import { userPermissions } from 'utils/PermissionsUtils';
export interface MenuListItem {
label: string;
@@ -269,6 +272,24 @@ export const getGlobalSettingsMenuWithPermission = (
key: 'customAttributes.storedProcedure',
icon: ,
},
+ {
+ label: i18next.t('label.glossary-term'),
+ isProtected: Boolean(isAdminUser),
+ key: 'customAttributes.glossaryTerm',
+ icon: ,
+ },
+ {
+ label: i18next.t('label.database'),
+ isProtected: Boolean(isAdminUser),
+ key: 'customAttributes.database',
+ icon: ,
+ },
+ {
+ label: i18next.t('label.database-schema'),
+ isProtected: Boolean(isAdminUser),
+ key: 'customAttributes.databaseSchema',
+ icon: ,
+ },
],
},
{
@@ -388,6 +409,12 @@ export const getSettingOptionByEntityType = (entityType: EntityType) => {
return GlobalSettingOptions.MLMODELS;
case EntityType.CONTAINER:
return GlobalSettingOptions.CONTAINERS;
+ case EntityType.DATABASE:
+ return GlobalSettingOptions.DATABASE;
+ case EntityType.DATABASE_SCHEMA:
+ return GlobalSettingOptions.DATABASE_SCHEMA;
+ case EntityType.GLOSSARY_TERM:
+ return GlobalSettingOptions.GLOSSARY_TERM;
case EntityType.TABLE:
default:
diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/MlModelDetailsUtils.ts b/openmetadata-ui/src/main/resources/ui/src/utils/MlModelDetailsUtils.ts
index 1a2db588aec..2fa6ba71955 100644
--- a/openmetadata-ui/src/main/resources/ui/src/utils/MlModelDetailsUtils.ts
+++ b/openmetadata-ui/src/main/resources/ui/src/utils/MlModelDetailsUtils.ts
@@ -14,4 +14,4 @@
import { TabSpecificField } from '../enums/entity.enum';
export const defaultFields = `${TabSpecificField.FOLLOWERS}, ${TabSpecificField.TAGS}, ${TabSpecificField.DOMAIN},
-${TabSpecificField.OWNER}, ${TabSpecificField.DASHBOARD} ,${TabSpecificField.EXTENSION},${TabSpecificField.VOTES}`;
+${TabSpecificField.OWNER}, ${TabSpecificField.DASHBOARD} ,${TabSpecificField.VOTES}`;
diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/PipelineDetailsUtils.ts b/openmetadata-ui/src/main/resources/ui/src/utils/PipelineDetailsUtils.ts
index 523aa56ab85..4509c18c671 100644
--- a/openmetadata-ui/src/main/resources/ui/src/utils/PipelineDetailsUtils.ts
+++ b/openmetadata-ui/src/main/resources/ui/src/utils/PipelineDetailsUtils.ts
@@ -22,7 +22,7 @@ import { sortTagsCaseInsensitive } from './CommonUtils';
import { Icons } from './SvgUtils';
export const defaultFields = `${TabSpecificField.FOLLOWERS}, ${TabSpecificField.TAGS}, ${TabSpecificField.OWNER},
-${TabSpecificField.TASKS}, ${TabSpecificField.PIPELINE_STATUS},${TabSpecificField.EXTENSION}, ${TabSpecificField.DOMAIN},${TabSpecificField.VOTES}`;
+${TabSpecificField.TASKS}, ${TabSpecificField.PIPELINE_STATUS}, ${TabSpecificField.DOMAIN},${TabSpecificField.VOTES}`;
export const getTaskExecStatus = (taskName: string, tasks: TaskStatus[]) => {
return tasks.find((task) => task.name === taskName)?.executionStatus || '';
diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/RouterUtils.ts b/openmetadata-ui/src/main/resources/ui/src/utils/RouterUtils.ts
index f85dbe7cf06..8a1f2db8fc0 100644
--- a/openmetadata-ui/src/main/resources/ui/src/utils/RouterUtils.ts
+++ b/openmetadata-ui/src/main/resources/ui/src/utils/RouterUtils.ts
@@ -23,24 +23,15 @@ import {
PLACEHOLDER_ACTION,
PLACEHOLDER_DASHBOARD_TYPE,
PLACEHOLDER_ENTITY_TYPE_FQN,
- PLACEHOLDER_GLOSSARY_NAME,
- PLACEHOLDER_GLOSSARY_TERMS_FQN,
- PLACEHOLDER_ROUTE_DATABASE_FQN,
- PLACEHOLDER_ROUTE_DATABASE_SCHEMA_FQN,
PLACEHOLDER_ROUTE_FQN,
PLACEHOLDER_ROUTE_INGESTION_FQN,
PLACEHOLDER_ROUTE_INGESTION_TYPE,
PLACEHOLDER_ROUTE_QUERY_ID,
PLACEHOLDER_ROUTE_SERVICE_CAT,
- PLACEHOLDER_ROUTE_SERVICE_FQN,
PLACEHOLDER_ROUTE_TAB,
- PLACEHOLDER_ROUTE_TABLE_FQN,
- PLACEHOLDER_ROUTE_TEST_CASE_FQN,
PLACEHOLDER_ROUTE_VERSION,
PLACEHOLDER_RULE_NAME,
PLACEHOLDER_SETTING_CATEGORY,
- PLACEHOLDER_TAG_NAME,
- PLACEHOLDER_TEST_SUITE_FQN,
ROUTES,
} from '../constants/constants';
import {
@@ -86,7 +77,7 @@ export const getEditConnectionPath = (
let path = ROUTES.EDIT_SERVICE_CONNECTION;
path = path
.replace(PLACEHOLDER_ROUTE_SERVICE_CAT, serviceCategory)
- .replace(PLACEHOLDER_ROUTE_SERVICE_FQN, serviceFQN)
+ .replace(PLACEHOLDER_ROUTE_FQN, serviceFQN)
.replace(PLACEHOLDER_ROUTE_TAB, 'connection');
return path;
@@ -99,7 +90,7 @@ export const getPathByServiceFQN = (
let path = ROUTES.SERVICE_WITH_TAB;
path = path
.replace(PLACEHOLDER_ROUTE_SERVICE_CAT, serviceCategory)
- .replace(PLACEHOLDER_ROUTE_SERVICE_FQN, serviceFQN)
+ .replace(PLACEHOLDER_ROUTE_FQN, serviceFQN)
.replace(PLACEHOLDER_ROUTE_TAB, 'connection');
return path;
@@ -113,7 +104,7 @@ export const getAddIngestionPath = (
let path = ROUTES.ADD_INGESTION;
path = path
.replace(PLACEHOLDER_ROUTE_SERVICE_CAT, serviceCategory)
- .replace(PLACEHOLDER_ROUTE_SERVICE_FQN, serviceFQN)
+ .replace(PLACEHOLDER_ROUTE_FQN, serviceFQN)
.replace(PLACEHOLDER_ROUTE_INGESTION_TYPE, ingestionType);
return path;
@@ -128,7 +119,7 @@ export const getEditIngestionPath = (
let path = ROUTES.EDIT_INGESTION;
path = path
.replace(PLACEHOLDER_ROUTE_SERVICE_CAT, serviceCategory)
- .replace(PLACEHOLDER_ROUTE_SERVICE_FQN, serviceFQN)
+ .replace(PLACEHOLDER_ROUTE_FQN, serviceFQN)
.replace(PLACEHOLDER_ROUTE_INGESTION_FQN, ingestionFQN)
.replace(PLACEHOLDER_ROUTE_INGESTION_TYPE, ingestionType);
@@ -173,21 +164,7 @@ export const getGlossaryPath = (fqn?: string) => {
let path = ROUTES.GLOSSARY;
if (fqn) {
path = ROUTES.GLOSSARY_DETAILS;
- path = path.replace(PLACEHOLDER_GLOSSARY_NAME, encodeURIComponent(fqn));
- }
-
- return path;
-};
-
-export const getGlossaryTermsPath = (
- glossaryName: string,
- glossaryTerm = ''
-) => {
- let path = glossaryTerm ? ROUTES.GLOSSARY_TERMS : ROUTES.GLOSSARY_DETAILS;
- path = path.replace(PLACEHOLDER_GLOSSARY_NAME, glossaryName);
-
- if (glossaryTerm) {
- path = path.replace(PLACEHOLDER_GLOSSARY_TERMS_FQN, glossaryTerm);
+ path = path.replace(PLACEHOLDER_ROUTE_FQN, encodeURIComponent(fqn));
}
return path;
@@ -334,7 +311,7 @@ export const getTagPath = (fqn?: string) => {
let path = ROUTES.TAGS;
if (fqn) {
path = ROUTES.TAG_DETAILS;
- path = path.replace(PLACEHOLDER_TAG_NAME, getEncodedFqn(fqn));
+ path = path.replace(PLACEHOLDER_ROUTE_FQN, getEncodedFqn(fqn));
}
return path;
@@ -355,7 +332,7 @@ export const getAddDataQualityTableTestPath = (
export const getTestSuitePath = (testSuiteName: string) => {
let path = ROUTES.TEST_SUITES_WITH_FQN;
- path = path.replace(PLACEHOLDER_TEST_SUITE_FQN, testSuiteName);
+ path = path.replace(PLACEHOLDER_ROUTE_FQN, testSuiteName);
return path;
};
@@ -367,7 +344,7 @@ export const getTestSuiteIngestionPath = (
let path = ingestionFQN
? ROUTES.TEST_SUITES_EDIT_INGESTION
: ROUTES.TEST_SUITES_ADD_INGESTION;
- path = path.replace(PLACEHOLDER_TEST_SUITE_FQN, testSuiteName);
+ path = path.replace(PLACEHOLDER_ROUTE_FQN, testSuiteName);
if (ingestionFQN) {
path = path.replace(PLACEHOLDER_ROUTE_INGESTION_FQN, ingestionFQN);
@@ -436,7 +413,7 @@ export const getGlossaryPathWithAction = (
let path = ROUTES.GLOSSARY_DETAILS_WITH_ACTION;
path = path
- .replace(PLACEHOLDER_GLOSSARY_NAME, fqn)
+ .replace(PLACEHOLDER_ROUTE_FQN, fqn)
.replace(PLACEHOLDER_ACTION, action);
return path;
@@ -446,7 +423,7 @@ export const getQueryPath = (entityFqn: string, queryId: string) => {
let path = ROUTES.QUERY_FULL_SCREEN_VIEW;
path = path
- .replace(PLACEHOLDER_ROUTE_TABLE_FQN, entityFqn)
+ .replace(PLACEHOLDER_ROUTE_FQN, entityFqn)
.replace(PLACEHOLDER_ROUTE_QUERY_ID, queryId);
return path;
@@ -454,7 +431,7 @@ export const getQueryPath = (entityFqn: string, queryId: string) => {
export const getAddQueryPath = (entityFqn: string) => {
let path = ROUTES.ADD_QUERY;
- path = path.replace(PLACEHOLDER_ROUTE_TABLE_FQN, entityFqn);
+ path = path.replace(PLACEHOLDER_ROUTE_FQN, entityFqn);
return path;
};
@@ -486,7 +463,7 @@ export const getGlossaryVersionsPath = (
) => {
let path = ROUTES.GLOSSARY_VERSION;
path = path
- .replace(PLACEHOLDER_GLOSSARY_NAME, glossaryName)
+ .replace(PLACEHOLDER_ROUTE_FQN, glossaryName)
.replace(PLACEHOLDER_ROUTE_VERSION, version);
return path;
@@ -501,7 +478,7 @@ export const getGlossaryTermsVersionsPath = (
? ROUTES.GLOSSARY_TERMS_VERSION_TAB
: ROUTES.GLOSSARY_TERMS_VERSION;
path = path
- .replace(PLACEHOLDER_GLOSSARY_NAME, encodeURIComponent(glossaryTermsFQN))
+ .replace(PLACEHOLDER_ROUTE_FQN, encodeURIComponent(glossaryTermsFQN))
.replace(PLACEHOLDER_ROUTE_VERSION, version);
if (tab) {
@@ -514,7 +491,7 @@ export const getGlossaryTermsVersionsPath = (
export const getTestCaseDetailsPath = (testCaseFQN: string) => {
let path = ROUTES.TEST_CASE_DETAILS;
- path = path.replace(PLACEHOLDER_ROUTE_TEST_CASE_FQN, testCaseFQN);
+ path = path.replace(PLACEHOLDER_ROUTE_FQN, testCaseFQN);
return path;
};
@@ -538,7 +515,7 @@ export const getServiceVersionPath = (
path = path
.replace(PLACEHOLDER_ROUTE_SERVICE_CAT, serviceCategory)
- .replace(PLACEHOLDER_ROUTE_SERVICE_FQN, serviceFQN)
+ .replace(PLACEHOLDER_ROUTE_FQN, serviceFQN)
.replace(PLACEHOLDER_ROUTE_VERSION, version);
return path;
@@ -551,7 +528,7 @@ export const getDatabaseVersionPath = (
let path = ROUTES.DATABASE_VERSION;
path = path
- .replace(PLACEHOLDER_ROUTE_DATABASE_FQN, databaseFQN)
+ .replace(PLACEHOLDER_ROUTE_FQN, databaseFQN)
.replace(PLACEHOLDER_ROUTE_VERSION, version);
return path;
@@ -564,7 +541,7 @@ export const getDatabaseSchemaVersionPath = (
let path = ROUTES.SCHEMA_VERSION;
path = path
- .replace(PLACEHOLDER_ROUTE_DATABASE_SCHEMA_FQN, schemaFQN)
+ .replace(PLACEHOLDER_ROUTE_FQN, schemaFQN)
.replace(PLACEHOLDER_ROUTE_VERSION, version);
return path;
@@ -572,7 +549,7 @@ export const getDatabaseSchemaVersionPath = (
export const getClassificationDetailsPath = (classificationFQN: string) => {
let path = ROUTES.TAG_DETAILS;
- path = path.replace(PLACEHOLDER_TAG_NAME, classificationFQN);
+ path = path.replace(PLACEHOLDER_ROUTE_FQN, classificationFQN);
return path;
};
@@ -583,7 +560,7 @@ export const getClassificationVersionsPath = (
) => {
let path = ROUTES.TAG_VERSION;
path = path
- .replace(PLACEHOLDER_TAG_NAME, classificationFQN)
+ .replace(PLACEHOLDER_ROUTE_FQN, classificationFQN)
.replace(PLACEHOLDER_ROUTE_VERSION, version);
return path;
diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/SearchIndexUtils.tsx b/openmetadata-ui/src/main/resources/ui/src/utils/SearchIndexUtils.tsx
index 56f0fa0e72f..42bcf407c0d 100644
--- a/openmetadata-ui/src/main/resources/ui/src/utils/SearchIndexUtils.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/utils/SearchIndexUtils.tsx
@@ -12,7 +12,7 @@
*/
import {
- PLACEHOLDER_ROUTE_SEARCH_INDEX_FQN,
+ PLACEHOLDER_ROUTE_FQN,
PLACEHOLDER_ROUTE_SUB_TAB,
PLACEHOLDER_ROUTE_TAB,
ROUTES,
@@ -22,7 +22,7 @@ import { SearchIndexField } from 'generated/entity/data/searchIndex';
import { uniqueId } from 'lodash';
import { sortTagsCaseInsensitive } from './CommonUtils';
-export const defaultFields = `${TabSpecificField.FIELDS},${TabSpecificField.EXTENSION},${TabSpecificField.FOLLOWERS},${TabSpecificField.TAGS},${TabSpecificField.OWNER},${TabSpecificField.DOMAIN}`;
+export const defaultFields = `${TabSpecificField.FIELDS},${TabSpecificField.FOLLOWERS},${TabSpecificField.TAGS},${TabSpecificField.OWNER},${TabSpecificField.DOMAIN}`;
export const makeRow = (column: SearchIndexField) => {
return {
@@ -48,7 +48,7 @@ export const makeData = (
export const getSearchIndexDetailsPath = (searchIndexFQN: string) => {
let path = ROUTES.SEARCH_INDEX_DETAILS;
- path = path.replace(PLACEHOLDER_ROUTE_SEARCH_INDEX_FQN, searchIndexFQN);
+ path = path.replace(PLACEHOLDER_ROUTE_FQN, searchIndexFQN);
return path;
};
@@ -65,7 +65,7 @@ export const getSearchIndexTabPath = (
path = path.replace(PLACEHOLDER_ROUTE_SUB_TAB, subTab);
}
path = path
- .replace(PLACEHOLDER_ROUTE_SEARCH_INDEX_FQN, searchIndexFQN)
+ .replace(PLACEHOLDER_ROUTE_FQN, searchIndexFQN)
.replace(PLACEHOLDER_ROUTE_TAB, tab);
return path;
diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/StoredProceduresUtils.tsx b/openmetadata-ui/src/main/resources/ui/src/utils/StoredProceduresUtils.tsx
index 5bd80b669a1..d3f88b848a8 100644
--- a/openmetadata-ui/src/main/resources/ui/src/utils/StoredProceduresUtils.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/utils/StoredProceduresUtils.tsx
@@ -13,4 +13,4 @@
import { TabSpecificField } from 'enums/entity.enum';
export const STORED_PROCEDURE_DEFAULT_FIELDS = `${TabSpecificField.OWNER}, ${TabSpecificField.FOLLOWERS},
-${TabSpecificField.TAGS}, ${TabSpecificField.EXTENSION}, ${TabSpecificField.DOMAIN}, ${TabSpecificField.VOTES}`;
+${TabSpecificField.TAGS}, ${TabSpecificField.DOMAIN}, ${TabSpecificField.VOTES}`;
diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/TasksUtils.ts b/openmetadata-ui/src/main/resources/ui/src/utils/TasksUtils.ts
index 8915cc9f1a9..574e30ac4a3 100644
--- a/openmetadata-ui/src/main/resources/ui/src/utils/TasksUtils.ts
+++ b/openmetadata-ui/src/main/resources/ui/src/utils/TasksUtils.ts
@@ -48,8 +48,8 @@ import {
getDatabaseDetailsPath,
getDatabaseSchemaDetailsPath,
getServiceDetailsPath,
- PLACEHOLDER_ROUTE_ENTITY_FQN,
PLACEHOLDER_ROUTE_ENTITY_TYPE,
+ PLACEHOLDER_ROUTE_FQN,
ROUTES,
} from '../constants/constants';
import {
@@ -89,7 +89,7 @@ export const getRequestDescriptionPath = (
let pathname = ROUTES.REQUEST_DESCRIPTION;
pathname = pathname
.replace(PLACEHOLDER_ROUTE_ENTITY_TYPE, entityType)
- .replace(PLACEHOLDER_ROUTE_ENTITY_FQN, entityFQN);
+ .replace(PLACEHOLDER_ROUTE_FQN, entityFQN);
const searchParams = new URLSearchParams();
if (!isUndefined(field) && !isUndefined(value)) {
@@ -109,7 +109,7 @@ export const getRequestTagsPath = (
let pathname = ROUTES.REQUEST_TAGS;
pathname = pathname
.replace(PLACEHOLDER_ROUTE_ENTITY_TYPE, entityType)
- .replace(PLACEHOLDER_ROUTE_ENTITY_FQN, entityFQN);
+ .replace(PLACEHOLDER_ROUTE_FQN, entityFQN);
const searchParams = new URLSearchParams();
if (!isUndefined(field) && !isUndefined(value)) {
@@ -129,7 +129,7 @@ export const getUpdateDescriptionPath = (
let pathname = ROUTES.UPDATE_DESCRIPTION;
pathname = pathname
.replace(PLACEHOLDER_ROUTE_ENTITY_TYPE, entityType)
- .replace(PLACEHOLDER_ROUTE_ENTITY_FQN, entityFQN);
+ .replace(PLACEHOLDER_ROUTE_FQN, entityFQN);
const searchParams = new URLSearchParams();
if (!isUndefined(field) && !isUndefined(value)) {
@@ -149,7 +149,7 @@ export const getUpdateTagsPath = (
let pathname = ROUTES.UPDATE_TAGS;
pathname = pathname
.replace(PLACEHOLDER_ROUTE_ENTITY_TYPE, entityType)
- .replace(PLACEHOLDER_ROUTE_ENTITY_FQN, entityFQN);
+ .replace(PLACEHOLDER_ROUTE_FQN, entityFQN);
const searchParams = new URLSearchParams();
if (!isUndefined(field) && !isUndefined(value)) {