- {t('label.tag-plural')}
+ {isGlossaryType ? t('label.glossary-term') : t('label.tag-plural')}
- {editable && selectedTags.length > 0 && (
+ {permission && !isEmpty(tags?.[tagType]) && (
}
size="small"
type="text"
@@ -425,8 +401,8 @@ const TagsContainerV1 = ({
)}
- {getRequestTagsElements()}
- {getThreadElements()}
+ {requestTagElement}
+ {conversationThreadElement}
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Tag/TagsContainerV1/TagsTree.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Tag/TagsContainerV1/TagsTree.component.tsx
new file mode 100644
index 00000000000..59eeeac9238
--- /dev/null
+++ b/openmetadata-ui/src/main/resources/ui/src/components/Tag/TagsContainerV1/TagsTree.component.tsx
@@ -0,0 +1,47 @@
+/*
+ * 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 { CloseOutlined } from '@ant-design/icons';
+import { TreeSelect } from 'antd';
+import classNames from 'classnames';
+import React from 'react';
+import { TagsTreeComponentProps } from './TagsContainerV1.interface';
+
+const TagTree = ({
+ defaultValue,
+ placeholder,
+ treeData,
+ onChange,
+}: TagsTreeComponentProps) => {
+ return (
+
+ }
+ showCheckedStrategy={TreeSelect.SHOW_ALL}
+ treeData={treeData}
+ treeNodeFilterProp="title"
+ onChange={onChange}
+ />
+ );
+};
+
+export default TagTree;
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/TopicDetails/TopicDetails.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/TopicDetails/TopicDetails.component.tsx
index 393b80e7e64..ed193918919 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/TopicDetails/TopicDetails.component.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/TopicDetails/TopicDetails.component.tsx
@@ -11,7 +11,7 @@
* limitations under the License.
*/
-import { Card, Col, Row, Tabs } from 'antd';
+import { Card, Col, Row, Space, Tabs } from 'antd';
import { AxiosError } from 'axios';
import ActivityFeedProvider, {
useActivityFeedProvider,
@@ -30,12 +30,12 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useHistory, useParams } from 'react-router-dom';
import { restoreTopic } from 'rest/topicsAPI';
-import { getEntityName } from 'utils/EntityUtils';
+import { getEntityName, getEntityThreadLink } from 'utils/EntityUtils';
import { EntityField } from '../../constants/Feeds.constants';
import { EntityTabs, EntityType } from '../../enums/entity.enum';
import { Topic } from '../../generated/entity/data/topic';
import { ThreadType } from '../../generated/entity/feed/thread';
-import { LabelType, State } from '../../generated/type/tagLabel';
+import { LabelType, State, TagSource } from '../../generated/type/tagLabel';
import { getCurrentUserId, refreshPage } from '../../utils/CommonUtils';
import { getEntityFieldThreadCounts } from '../../utils/FeedUtils';
import { DEFAULT_ENTITY_PERMISSION } from '../../utils/PermissionsUtils';
@@ -307,18 +307,33 @@ const TopicDetails: React.FC
= ({
className="entity-tag-right-panel-container"
data-testid="entity-right-panel"
flex="320px">
-
+
+
+
+
+
),
diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/ContainerPage/ContainerPage.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/ContainerPage/ContainerPage.tsx
index d15e4a3d34a..313862cb035 100644
--- a/openmetadata-ui/src/main/resources/ui/src/pages/ContainerPage/ContainerPage.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/pages/ContainerPage/ContainerPage.tsx
@@ -10,7 +10,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import { Card, Col, Row, Tabs } from 'antd';
+import { Card, Col, Row, Space, Tabs } from 'antd';
import AppState from 'AppState';
import { AxiosError } from 'axios';
import ActivityFeedProvider, {
@@ -77,7 +77,11 @@ import {
refreshPage,
sortTagsCaseInsensitive,
} from 'utils/CommonUtils';
-import { getEntityLineage, getEntityName } from 'utils/EntityUtils';
+import {
+ getEntityLineage,
+ getEntityName,
+ getEntityThreadLink,
+} from 'utils/EntityUtils';
import { getEntityFieldThreadCounts } from 'utils/FeedUtils';
import { DEFAULT_ENTITY_PERMISSION } from 'utils/PermissionsUtils';
import { getLineageViewPath } from 'utils/RouterUtils';
@@ -623,18 +627,28 @@ const ContainerPage = () => {
className="entity-tag-right-panel-container"
data-testid="entity-right-panel"
flex="320px">
-
+
+
+
+
),
diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/TableDetailsPageV1/TableDetailsPageV1.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/TableDetailsPageV1/TableDetailsPageV1.tsx
index 36405f39a8d..967be321517 100644
--- a/openmetadata-ui/src/main/resources/ui/src/pages/TableDetailsPageV1/TableDetailsPageV1.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/pages/TableDetailsPageV1/TableDetailsPageV1.tsx
@@ -10,7 +10,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import { Card, Col, Divider, Row, Tabs } from 'antd';
+import { Card, Col, Divider, Row, Space, Tabs } from 'antd';
import { AxiosError } from 'axios';
import ActivityFeedProvider, {
useActivityFeedProvider,
@@ -46,7 +46,7 @@ import { compare } from 'fast-json-patch';
import { CreateThread } from 'generated/api/feed/createThread';
import { JoinedWith, Table } from 'generated/entity/data/table';
import { ThreadType } from 'generated/entity/feed/thread';
-import { LabelType, State, TagLabel } from 'generated/type/tagLabel';
+import { LabelType, State, TagLabel, TagSource } from 'generated/type/tagLabel';
import { EntityFieldThreadCount } from 'interface/feed.interface';
import { isEmpty, isEqual } from 'lodash';
import { EntityTags } from 'Models';
@@ -71,7 +71,7 @@ import {
sortTagsCaseInsensitive,
} from 'utils/CommonUtils';
import { defaultFields } from 'utils/DatasetDetailsUtils';
-import { getEntityName } from 'utils/EntityUtils';
+import { getEntityName, getEntityThreadLink } from 'utils/EntityUtils';
import { getEntityFieldThreadCounts } from 'utils/FeedUtils';
import { DEFAULT_ENTITY_PERMISSION } from 'utils/PermissionsUtils';
import { createQueryFilter } from 'utils/Query/QueryUtils';
@@ -448,19 +448,30 @@ const TableDetailsPageV1 = () => {
>
) : null}
-
+
+
+
+
+
+
),
diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/EntityUtils.tsx b/openmetadata-ui/src/main/resources/ui/src/utils/EntityUtils.tsx
index 9b0d088675a..d3f4ff5f313 100644
--- a/openmetadata-ui/src/main/resources/ui/src/utils/EntityUtils.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/utils/EntityUtils.tsx
@@ -27,6 +27,7 @@ import {
SearchedDataProps,
SourceType,
} from 'components/searched-data/SearchedData.interface';
+import { EntityField } from 'constants/Feeds.constants';
import { ExplorePageTabs } from 'enums/Explore.enum';
import { Container } from 'generated/entity/data/container';
import { DashboardDataModel } from 'generated/entity/data/dashboardDataModel';
@@ -34,6 +35,7 @@ import { GlossaryTerm } from 'generated/entity/data/glossaryTerm';
import { Mlmodel } from 'generated/entity/data/mlmodel';
import { Topic } from 'generated/entity/data/topic';
import i18next from 'i18next';
+import { EntityFieldThreadCount } from 'interface/feed.interface';
import { get, isEmpty, isNil, isUndefined, lowerCase, startCase } from 'lodash';
import { Bucket, EntityDetailUnion } from 'Models';
import React, { Fragment } from 'react';
@@ -74,6 +76,7 @@ import {
getPartialNameFromTableFQN,
getTableFQNFromColumnFQN,
} from './CommonUtils';
+import { getEntityFieldThreadCounts } from './FeedUtils';
import Fqn from './Fqn';
import { getGlossaryPath } from './RouterUtils';
import {
@@ -1064,3 +1067,14 @@ export const getEntityLinkFromType = (
return '';
}
};
+
+export const getEntityThreadLink = (
+ entityFieldThreadCount: EntityFieldThreadCount[]
+) => {
+ const thread = getEntityFieldThreadCounts(
+ EntityField.TAGS,
+ entityFieldThreadCount
+ );
+
+ return thread[0]?.entityLink;
+};
diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/GlossaryUtils.ts b/openmetadata-ui/src/main/resources/ui/src/utils/GlossaryUtils.ts
index e6e00ff68b5..03cfbf78b49 100644
--- a/openmetadata-ui/src/main/resources/ui/src/utils/GlossaryUtils.ts
+++ b/openmetadata-ui/src/main/resources/ui/src/utils/GlossaryUtils.ts
@@ -15,7 +15,7 @@ import { AxiosError } from 'axios';
import { ModifiedGlossaryTerm } from 'components/Glossary/GlossaryTermTab/GlossaryTermTab.interface';
import {
GlossaryTermDetailsProps,
- GlossaryTermNodeProps,
+ HierarchyTagsProps,
} from 'components/Tag/TagsContainerV1/TagsContainerV1.interface';
import { isUndefined, omit } from 'lodash';
import { ListGlossaryTermsParams } from 'rest/glossaryAPI';
@@ -224,9 +224,9 @@ export const formatRelatedTermOptions = (
export const getGlossaryTermHierarchy = (
data: GlossaryTermDetailsProps[]
-): GlossaryTermNodeProps[] => {
- const nodes: Record = {};
- const tree: GlossaryTermNodeProps[] = [];
+): HierarchyTagsProps[] => {
+ const nodes: Record = {};
+ const tree: HierarchyTagsProps[] = [];
data.forEach((obj) => {
if (obj.fqn) {