mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-10-07 06:46:35 +00:00
Fix glossary tab and chart icon issue for persona (#22793)
(cherry picked from commit 51b826b06ba27734fe81c9d0ca4a16fc7faefd92)
This commit is contained in:
parent
e95aa048c4
commit
c39d949ccd
@ -83,7 +83,7 @@ const GlossaryTermsV1 = ({
|
|||||||
isTabExpanded,
|
isTabExpanded,
|
||||||
toggleTabExpanded,
|
toggleTabExpanded,
|
||||||
}: GlossaryTermsV1Props) => {
|
}: GlossaryTermsV1Props) => {
|
||||||
const { tab, version } = useRequiredParams<{
|
const { tab: activeTab, version } = useRequiredParams<{
|
||||||
tab: EntityTabs;
|
tab: EntityTabs;
|
||||||
version: string;
|
version: string;
|
||||||
}>();
|
}>();
|
||||||
@ -109,10 +109,6 @@ const GlossaryTermsV1 = ({
|
|||||||
: MOCK_GLOSSARY_NO_PERMISSIONS;
|
: MOCK_GLOSSARY_NO_PERMISSIONS;
|
||||||
}, [glossaryTerm, permissions]);
|
}, [glossaryTerm, permissions]);
|
||||||
|
|
||||||
const activeTab = useMemo(() => {
|
|
||||||
return tab ?? EntityTabs.OVERVIEW;
|
|
||||||
}, [tab]);
|
|
||||||
|
|
||||||
const activeTabHandler = (tab: string) => {
|
const activeTabHandler = (tab: string) => {
|
||||||
navigate(
|
navigate(
|
||||||
{
|
{
|
||||||
@ -162,8 +158,8 @@ const GlossaryTermsV1 = ({
|
|||||||
const handleAssetSave = useCallback(() => {
|
const handleAssetSave = useCallback(() => {
|
||||||
fetchGlossaryTermAssets();
|
fetchGlossaryTermAssets();
|
||||||
assetTabRef.current?.refreshAssets();
|
assetTabRef.current?.refreshAssets();
|
||||||
tab !== 'assets' && activeTabHandler('assets');
|
activeTab !== 'assets' && activeTabHandler('assets');
|
||||||
}, [assetTabRef, tab]);
|
}, [assetTabRef, activeTab]);
|
||||||
|
|
||||||
const onExtensionUpdate = useCallback(
|
const onExtensionUpdate = useCallback(
|
||||||
async (updatedTable: GlossaryTerm) => {
|
async (updatedTable: GlossaryTerm) => {
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
import { camelCase, map, startCase } from 'lodash';
|
import { camelCase, map, startCase } from 'lodash';
|
||||||
import { ReactComponent as APICollectionIcon } from '../../assets/svg/api-collection-colored.svg';
|
import { ReactComponent as APICollectionIcon } from '../../assets/svg/api-collection-colored.svg';
|
||||||
import { ReactComponent as APIEndpointIcon } from '../../assets/svg/api-endpoints-colored.svg';
|
import { ReactComponent as APIEndpointIcon } from '../../assets/svg/api-endpoints-colored.svg';
|
||||||
|
import { ReactComponent as ChartIcon } from '../../assets/svg/chart-colored.svg';
|
||||||
import { ReactComponent as DashboardIcon } from '../../assets/svg/dashboard-colored-new.svg';
|
import { ReactComponent as DashboardIcon } from '../../assets/svg/dashboard-colored-new.svg';
|
||||||
import { ReactComponent as DashboardDataModelIcon } from '../../assets/svg/dashboard-data-models-colored.svg';
|
import { ReactComponent as DashboardDataModelIcon } from '../../assets/svg/dashboard-data-models-colored.svg';
|
||||||
import { ReactComponent as DataAssetsIcon } from '../../assets/svg/data-assets-colored-new.svg';
|
import { ReactComponent as DataAssetsIcon } from '../../assets/svg/data-assets-colored-new.svg';
|
||||||
@ -37,6 +38,7 @@ import i18n from '../i18next/LocalUtil';
|
|||||||
|
|
||||||
const ENTITY_ICONS: Record<string, SvgComponent> = {
|
const ENTITY_ICONS: Record<string, SvgComponent> = {
|
||||||
[PageType.Table]: TableIcon,
|
[PageType.Table]: TableIcon,
|
||||||
|
[PageType.Chart]: ChartIcon,
|
||||||
[PageType.Container]: StorageIcon,
|
[PageType.Container]: StorageIcon,
|
||||||
[PageType.Dashboard]: DashboardIcon,
|
[PageType.Dashboard]: DashboardIcon,
|
||||||
[PageType.DashboardDataModel]: DashboardDataModelIcon,
|
[PageType.DashboardDataModel]: DashboardDataModelIcon,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user