mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-27 18:36:08 +00:00
fix: Some Column Attributes aren't being displayed, even if populated (#10549)
* fixed issue Some Column Attributes aren't being displayed, even if populated #10451 * translation sync * fixed tags cypress * updated width of entity details page table
This commit is contained in:
parent
2f4a92a17b
commit
c1033b2362
@ -19,6 +19,7 @@ import { isUndefined, toString } from 'lodash';
|
||||
import { default as React, useCallback, useMemo, useState } from 'react';
|
||||
import { useHistory, useParams } from 'react-router-dom';
|
||||
import { createTestCase, createTestSuites } from 'rest/testAPI';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import {
|
||||
getDatabaseDetailsPath,
|
||||
getDatabaseSchemaDetailsPath,
|
||||
@ -36,7 +37,6 @@ import { TestCase } from '../../generated/tests/testCase';
|
||||
import { TestSuite } from '../../generated/tests/testSuite';
|
||||
import {
|
||||
getCurrentUserId,
|
||||
getEntityName,
|
||||
getPartialNameFromTableFQN,
|
||||
} from '../../utils/CommonUtils';
|
||||
import { getTestSuitePath } from '../../utils/RouterUtils';
|
||||
|
@ -22,6 +22,7 @@ import {
|
||||
getAuthMechanismForBotUser,
|
||||
getRoles,
|
||||
} from 'rest/userAPI';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { TERM_ADMIN } from '../../constants/constants';
|
||||
import {
|
||||
GlobalSettingOptions,
|
||||
@ -32,7 +33,6 @@ import {
|
||||
AuthenticationMechanism,
|
||||
AuthType,
|
||||
} from '../../generated/entity/teams/user';
|
||||
import { getEntityName } from '../../utils/CommonUtils';
|
||||
import { getSettingPath } from '../../utils/RouterUtils';
|
||||
import SVGIcons, { Icons } from '../../utils/SvgUtils';
|
||||
import { showErrorToast } from '../../utils/ToastUtils';
|
||||
|
@ -20,6 +20,7 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { getBots } from 'rest/botsAPI';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import {
|
||||
getBotsPath,
|
||||
INITIAL_PAGING_VALUE,
|
||||
@ -32,7 +33,6 @@ import { Bot, ProviderType } from '../../generated/entity/bot';
|
||||
import { Include } from '../../generated/type/include';
|
||||
import { Paging } from '../../generated/type/paging';
|
||||
import { useAuth } from '../../hooks/authHooks';
|
||||
import { getEntityName } from '../../utils/CommonUtils';
|
||||
import SVGIcons, { Icons } from '../../utils/SvgUtils';
|
||||
import { showErrorToast } from '../../utils/ToastUtils';
|
||||
import DeleteWidgetModal from '../common/DeleteWidget/DeleteWidgetModal';
|
||||
|
@ -18,8 +18,8 @@ import { EntityReference } from 'generated/type/entityReference';
|
||||
import React, { FC, useMemo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { getEntityName } from 'utils/CommonUtils';
|
||||
import { getContainerDetailPath } from 'utils/ContainerDetailUtils';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
|
||||
interface ContainerChildrenProps {
|
||||
childrenList: Container['children'];
|
||||
|
@ -33,7 +33,7 @@ import {
|
||||
|
||||
import { ReactComponent as EditIcon } from 'assets/svg/ic-edit.svg';
|
||||
import { ModalWithMarkdownEditor } from 'components/Modals/ModalWithMarkdownEditor/ModalWithMarkdownEditor';
|
||||
import { getEntityName } from 'utils/CommonUtils';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
|
||||
const ContainerDataModel: FC<ContainerDataModelProps> = ({
|
||||
dataModel,
|
||||
|
@ -16,11 +16,11 @@ import { LOADING_STATE, OPERATION } from 'enums/common.enum';
|
||||
import { isEmpty } from 'lodash';
|
||||
import React, { FC, Fragment, useEffect, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { ReactComponent as IconDelete } from '../../assets/svg/ic-delete.svg';
|
||||
import { ReactComponent as IconEdit } from '../../assets/svg/ic-edit.svg';
|
||||
import { NO_PERMISSION_FOR_ACTION } from '../../constants/HelperTextUtil';
|
||||
import { CustomProperty } from '../../generated/entity/type';
|
||||
import { getEntityName } from '../../utils/CommonUtils';
|
||||
import RichTextEditorPreviewer from '../common/rich-text-editor/RichTextEditorPreviewer';
|
||||
import ConfirmationModal from '../Modals/ConfirmationModal/ConfirmationModal';
|
||||
import { ModalWithMarkdownEditor } from '../Modals/ModalWithMarkdownEditor/ModalWithMarkdownEditor';
|
||||
@ -84,6 +84,7 @@ export const CustomPropertyTable: FC<CustomPropertyTableProp> = ({
|
||||
title: t('label.name'),
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
render: (_, record) => getEntityName(record),
|
||||
},
|
||||
{
|
||||
title: t('label.type'),
|
||||
|
@ -28,6 +28,7 @@ import React, {
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Link, useHistory } from 'react-router-dom';
|
||||
import { restoreDashboard } from 'rest/dashboardAPI';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { FQN_SEPARATOR_CHAR } from '../../constants/char.constants';
|
||||
import { EntityField } from '../../constants/Feeds.constants';
|
||||
import { observerOptions } from '../../constants/Mydata.constants';
|
||||
@ -42,7 +43,6 @@ import { LabelType, State, TagLabel } from '../../generated/type/tagLabel';
|
||||
import { useInfiniteScroll } from '../../hooks/useInfiniteScroll';
|
||||
import {
|
||||
getCurrentUserId,
|
||||
getEntityName,
|
||||
getEntityPlaceHolder,
|
||||
getOwnerValue,
|
||||
refreshPage,
|
||||
|
@ -20,6 +20,7 @@ import { ExtraInfo } from 'Models';
|
||||
import React, { FC, useEffect, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { FQN_SEPARATOR_CHAR } from '../../constants/char.constants';
|
||||
import { EntityField } from '../../constants/Feeds.constants';
|
||||
import { OwnerType } from '../../enums/user.enum';
|
||||
@ -221,7 +222,7 @@ const DashboardVersion: FC<DashboardVersionProp> = ({
|
||||
render: (text, record) => (
|
||||
<Link target="_blank" to={{ pathname: text }}>
|
||||
<Space>
|
||||
<span>{record.displayName}</span>
|
||||
<span>{getEntityName(record)}</span>
|
||||
<SVGIcons
|
||||
alt="external-link"
|
||||
className="tw-align-middle"
|
||||
|
@ -18,6 +18,7 @@ import { useTranslation } from 'react-i18next';
|
||||
import { Link, useParams } from 'react-router-dom';
|
||||
import { getAggregateChartData } from 'rest/DataInsightAPI';
|
||||
import { getTeamByName } from 'rest/teamsAPI';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { getUserPath } from '../../constants/constants';
|
||||
import {
|
||||
ENTITIES_CHARTS,
|
||||
@ -34,7 +35,6 @@ import {
|
||||
ChartFilter,
|
||||
DataInsightTabs,
|
||||
} from '../../interface/data-insight.interface';
|
||||
import { getEntityName } from '../../utils/CommonUtils';
|
||||
import {
|
||||
getEntitiesChartSummary,
|
||||
getWebChartSummary,
|
||||
|
@ -26,6 +26,7 @@ import React, {
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { restoreTable } from 'rest/tableAPI';
|
||||
import { getEntityId, getEntityName } from 'utils/EntityUtils';
|
||||
import { FQN_SEPARATOR_CHAR } from '../../constants/char.constants';
|
||||
import { ROUTES } from '../../constants/constants';
|
||||
import { EntityField } from '../../constants/Feeds.constants';
|
||||
@ -47,8 +48,6 @@ import { LabelType, State } from '../../generated/type/tagLabel';
|
||||
import { useInfiniteScroll } from '../../hooks/useInfiniteScroll';
|
||||
import {
|
||||
getCurrentUserId,
|
||||
getEntityId,
|
||||
getEntityName,
|
||||
getEntityPlaceHolder,
|
||||
getOwnerValue,
|
||||
getPartialNameFromTableFQN,
|
||||
|
@ -18,8 +18,9 @@ import React, { useEffect, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { Node } from 'reactflow';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { CSMode } from '../../enums/codemirror.enum';
|
||||
import { getEntityName, getNameFromFQN } from '../../utils/CommonUtils';
|
||||
import { getNameFromFQN } from '../../utils/CommonUtils';
|
||||
import { getEntityLink } from '../../utils/TableUtils';
|
||||
import RichTextEditorPreviewer from '../common/rich-text-editor/RichTextEditorPreviewer';
|
||||
import Loader from '../Loader/Loader';
|
||||
|
@ -15,8 +15,8 @@ import { Button, Modal, Select } from 'antd';
|
||||
import { t } from 'i18next';
|
||||
import { isUndefined } from 'lodash';
|
||||
import React from 'react';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { EntityReference } from '../../generated/api/services/createPipelineService';
|
||||
import { getEntityName } from '../../utils/CommonUtils';
|
||||
|
||||
interface AddPipeLineModalType {
|
||||
showAddPipelineModal: boolean;
|
||||
|
@ -24,6 +24,7 @@ import React, {
|
||||
} from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useReactFlow } from 'reactflow';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { NO_PERMISSION_FOR_ACTION } from '../../constants/HelperTextUtil';
|
||||
import {
|
||||
MAX_ZOOM_VALUE,
|
||||
@ -32,7 +33,6 @@ import {
|
||||
ZOOM_SLIDER_STEP,
|
||||
ZOOM_TRANSITION_DURATION,
|
||||
} from '../../constants/Lineage.constants';
|
||||
import { getEntityName } from '../../utils/CommonUtils';
|
||||
import { getLoadingStatusValue } from '../../utils/EntityLineageUtils';
|
||||
import SVGIcons, { Icons } from '../../utils/SvgUtils';
|
||||
import { ControlProps } from './EntityLineage.interface';
|
||||
|
@ -49,6 +49,7 @@ import ReactFlow, {
|
||||
} from 'reactflow';
|
||||
import { searchData } from 'rest/miscAPI';
|
||||
import { getTableDetails } from 'rest/tableAPI';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { PAGE_SIZE } from '../../constants/constants';
|
||||
import {
|
||||
ELEMENT_DELETE_STATE,
|
||||
@ -70,7 +71,6 @@ import {
|
||||
} from '../../generated/type/entityLineage';
|
||||
import { EntityReference } from '../../generated/type/entityReference';
|
||||
import { withLoader } from '../../hoc/withLoader';
|
||||
import { getEntityName } from '../../utils/CommonUtils';
|
||||
import {
|
||||
createNewEdge,
|
||||
dragHandle,
|
||||
|
@ -14,8 +14,8 @@
|
||||
import { Button, Card, Typography } from 'antd';
|
||||
import React, { Fragment, FunctionComponent } from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { EntityReference } from '../../generated/type/entityReference';
|
||||
import { getEntityName } from '../../utils/CommonUtils';
|
||||
import { getEntityIcon, getEntityLink } from '../../utils/TableUtils';
|
||||
import EntityListSkeleton from '../Skeleton/MyData/EntityListSkeleton/EntityListSkeleton.component';
|
||||
import './entity.less';
|
||||
|
@ -38,6 +38,7 @@ import { EntityFieldThreads } from '../../interface/feed.interface';
|
||||
import { getPartialNameFromTableFQN } from '../../utils/CommonUtils';
|
||||
import {
|
||||
ENTITY_LINK_SEPARATOR,
|
||||
getEntityName,
|
||||
getFrequentlyJoinedColumns,
|
||||
} from '../../utils/EntityUtils';
|
||||
import { getFieldThreadElement } from '../../utils/FeedElementUtils';
|
||||
@ -612,14 +613,14 @@ const EntityTable = ({
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
accessor: 'name',
|
||||
width: 300,
|
||||
width: 220,
|
||||
render: (name: Column['name'], record: Column) => (
|
||||
<Space
|
||||
align="start"
|
||||
className="w-max-90 vertical-align-inherit"
|
||||
size={2}>
|
||||
{prepareConstraintIcon(name, record.constraint, tableConstraints)}
|
||||
<span className="break-word">{name}</span>
|
||||
<span className="break-word">{getEntityName(record)}</span>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
@ -632,6 +633,30 @@ const EntityTable = ({
|
||||
width: 220,
|
||||
render: renderDataTypeDisplay,
|
||||
},
|
||||
{
|
||||
title: t('label.scale'),
|
||||
dataIndex: 'scale',
|
||||
key: 'scale',
|
||||
accessor: 'scale',
|
||||
width: 80,
|
||||
render: (scale: number) => scale || '--',
|
||||
},
|
||||
{
|
||||
title: t('label.precision'),
|
||||
dataIndex: 'precision',
|
||||
key: 'precision',
|
||||
accessor: 'precision',
|
||||
width: 80,
|
||||
render: (precision: number) => precision || '--',
|
||||
},
|
||||
{
|
||||
title: t('label.ordinal-position'),
|
||||
dataIndex: 'ordinalPosition',
|
||||
key: 'ordinalPosition',
|
||||
accessor: 'ordinalPosition',
|
||||
width: 80,
|
||||
render: (ordinalPosition: number) => ordinalPosition || '--',
|
||||
},
|
||||
{
|
||||
title: t('label.description'),
|
||||
dataIndex: 'description',
|
||||
|
@ -26,7 +26,7 @@ import { cloneDeep, debounce, includes, isEqual } from 'lodash';
|
||||
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { getEntityName } from 'utils/CommonUtils';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { getOwnerList } from 'utils/ManageUtils';
|
||||
import SVGIcons, { Icons } from 'utils/SvgUtils';
|
||||
import {
|
||||
|
@ -30,7 +30,7 @@ import React, { useEffect, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Link, useHistory, useParams } from 'react-router-dom';
|
||||
import { getGlossaryTerms, ListGlossaryTermsParams } from 'rest/glossaryAPI';
|
||||
import { getEntityName } from 'utils/CommonUtils';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import {
|
||||
createGlossaryTermTree,
|
||||
getRootLevelGlossaryTerm,
|
||||
|
@ -21,6 +21,7 @@ import { isEmpty, isNil, lowerCase, startCase } from 'lodash';
|
||||
import React, { Fragment, useEffect, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { PAGE_SIZE } from '../../constants/constants';
|
||||
import { WORKFLOWS_METADATA_DOCS } from '../../constants/docs.constants';
|
||||
import { PIPELINE_TYPE_LOCALIZATION } from '../../constants/Ingestions.constant';
|
||||
@ -420,7 +421,7 @@ const Ingestion: React.FC<IngestionProps> = ({
|
||||
title: t('label.name'),
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
render: (text) =>
|
||||
render: (text, record) =>
|
||||
airflowEndpoint ? (
|
||||
<Tooltip
|
||||
title={
|
||||
@ -438,7 +439,7 @@ const Ingestion: React.FC<IngestionProps> = ({
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
type="link">
|
||||
{text}
|
||||
{getEntityName(record)}
|
||||
<SVGIcons
|
||||
alt="external-link"
|
||||
className="tw-align-middle tw-ml-1"
|
||||
@ -448,7 +449,7 @@ const Ingestion: React.FC<IngestionProps> = ({
|
||||
</Button>
|
||||
</Tooltip>
|
||||
) : (
|
||||
text
|
||||
getEntityName(record)
|
||||
),
|
||||
},
|
||||
{
|
||||
|
@ -30,6 +30,7 @@ import React, {
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { restoreMlmodel } from 'rest/mlModelAPI';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import AppState from '../../AppState';
|
||||
import { FQN_SEPARATOR_CHAR } from '../../constants/char.constants';
|
||||
import {
|
||||
@ -50,7 +51,6 @@ import { LabelType, State, TagLabel } from '../../generated/type/tagLabel';
|
||||
import { useInfiniteScroll } from '../../hooks/useInfiniteScroll';
|
||||
import {
|
||||
getEmptyPlaceholder,
|
||||
getEntityName,
|
||||
getEntityPlaceHolder,
|
||||
getOwnerValue,
|
||||
refreshPage,
|
||||
|
@ -58,13 +58,12 @@ import { EntityFieldThreadCount } from '../../interface/feed.interface';
|
||||
import {
|
||||
getCountBadge,
|
||||
getCurrentUserId,
|
||||
getEntityName,
|
||||
getEntityPlaceHolder,
|
||||
getFeedCounts,
|
||||
getOwnerValue,
|
||||
refreshPage,
|
||||
} from '../../utils/CommonUtils';
|
||||
import { getEntityFeedLink } from '../../utils/EntityUtils';
|
||||
import { getEntityFeedLink, getEntityName } from '../../utils/EntityUtils';
|
||||
import {
|
||||
deletePost,
|
||||
getEntityFieldThreadCounts,
|
||||
@ -567,9 +566,9 @@ const PipelineDetails = ({
|
||||
key: t('label.name'),
|
||||
dataIndex: 'name',
|
||||
title: t('label.name'),
|
||||
render: (name, record) => (
|
||||
render: (_, record) => (
|
||||
<Link target="_blank" to={{ pathname: record.taskUrl }}>
|
||||
<span>{name}</span>
|
||||
<span>{getEntityName(record)}</span>
|
||||
<SVGIcons
|
||||
alt="external-link"
|
||||
className="align-middle m-l-xs"
|
||||
|
@ -20,6 +20,7 @@ import { isUndefined } from 'lodash';
|
||||
import { ExtraInfo } from 'Models';
|
||||
import React, { FC, useEffect, useMemo, useState } from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { FQN_SEPARATOR_CHAR } from '../../constants/char.constants';
|
||||
import { EntityField } from '../../constants/Feeds.constants';
|
||||
import { OwnerType } from '../../enums/user.enum';
|
||||
@ -223,10 +224,10 @@ const PipelineVersion: FC<PipelineVersionProp> = ({
|
||||
}),
|
||||
dataIndex: 'displayName',
|
||||
key: 'displayName',
|
||||
render: (text, record) => (
|
||||
render: (_, record) => (
|
||||
<Link target="_blank" to={{ pathname: record.taskUrl }}>
|
||||
<Space>
|
||||
<span>{text}</span>
|
||||
<span>{getEntityName(record)}</span>
|
||||
<SVGIcons
|
||||
alt="external-link"
|
||||
className="tw-align-middle"
|
||||
|
@ -31,6 +31,7 @@ import React, { useEffect, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useHistory, useParams } from 'react-router-dom';
|
||||
import { addFollower, removeFollower } from 'rest/tableAPI';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { FQN_SEPARATOR_CHAR } from '../../constants/char.constants';
|
||||
import {
|
||||
getDatabaseDetailsPath,
|
||||
@ -52,7 +53,6 @@ import { LabelType, State } from '../../generated/type/tagLabel';
|
||||
import jsonData from '../../jsons/en';
|
||||
import {
|
||||
getCurrentUserId,
|
||||
getEntityName,
|
||||
getEntityPlaceHolder,
|
||||
getNameFromFQN,
|
||||
getPartialNameFromTableFQN,
|
||||
|
@ -18,6 +18,7 @@ import { isEmpty, isUndefined } from 'lodash';
|
||||
import React, { useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { ReactComponent as IconDelete } from '../../../assets/svg/ic-delete.svg';
|
||||
import { ReactComponent as IconEdit } from '../../../assets/svg/ic-edit.svg';
|
||||
|
||||
@ -25,7 +26,7 @@ import { getTableTabPath } from '../../../constants/constants';
|
||||
import { NO_PERMISSION_FOR_ACTION } from '../../../constants/HelperTextUtil';
|
||||
import { TestCase, TestCaseResult } from '../../../generated/tests/testCase';
|
||||
import { useAuth } from '../../../hooks/authHooks';
|
||||
import { getEntityName, getNameFromFQN } from '../../../utils/CommonUtils';
|
||||
import { getNameFromFQN } from '../../../utils/CommonUtils';
|
||||
import { getTestSuitePath } from '../../../utils/RouterUtils';
|
||||
import { getDecodedFqn } from '../../../utils/StringsUtils';
|
||||
import {
|
||||
@ -92,9 +93,9 @@ const DataQualityTab: React.FC<DataQualityTabProps> = ({
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
width: 320,
|
||||
render: (name: string) => (
|
||||
render: (name: string, record) => (
|
||||
<Typography.Text className="break-word" data-testid={name}>
|
||||
{name}
|
||||
{getEntityName(record)}
|
||||
</Typography.Text>
|
||||
),
|
||||
},
|
||||
|
@ -17,6 +17,7 @@ import { isEmpty } from 'lodash';
|
||||
import React, { Fragment, useCallback, useMemo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Link, useHistory } from 'react-router-dom';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import {
|
||||
getServiceDetailsPath,
|
||||
SERVICE_VIEW_CAP,
|
||||
@ -29,11 +30,7 @@ import { ServiceCategory } from '../../enums/service.enum';
|
||||
import { Operation } from '../../generated/entity/policies/policy';
|
||||
import { Paging } from '../../generated/type/paging';
|
||||
import { ServicesType } from '../../interface/service.interface';
|
||||
import {
|
||||
getEntityName,
|
||||
getServiceLogo,
|
||||
showPagination,
|
||||
} from '../../utils/CommonUtils';
|
||||
import { getServiceLogo, showPagination } from '../../utils/CommonUtils';
|
||||
import { checkPermission } from '../../utils/PermissionsUtils';
|
||||
import { getAddServicePath } from '../../utils/RouterUtils';
|
||||
import {
|
||||
|
@ -19,10 +19,10 @@ import ReactFlow, {
|
||||
useEdgesState,
|
||||
useNodesState,
|
||||
} from 'reactflow';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { EntityLineageNodeType } from '../../enums/entity.enum';
|
||||
import { PipelineStatus, Task } from '../../generated/entity/data/pipeline';
|
||||
import { EntityReference } from '../../generated/type/entityReference';
|
||||
import { getEntityName, replaceSpaceWith_ } from '../../utils/CommonUtils';
|
||||
import { replaceSpaceWith_ } from '../../utils/CommonUtils';
|
||||
import { getLayoutedElements, onLoad } from '../../utils/EntityLineageUtils';
|
||||
import { getTaskExecStatus } from '../../utils/PipelineDetailsUtils';
|
||||
import TaskNode from './TaskNode';
|
||||
@ -76,7 +76,7 @@ const TasksDAGView = ({ tasks, selectedExec }: Props) => {
|
||||
id: replaceSpaceWith_(task.name),
|
||||
type: getNodeType(task),
|
||||
data: {
|
||||
label: getEntityName(task as EntityReference),
|
||||
label: getEntityName(task),
|
||||
},
|
||||
position: { x: 0, y: 0 },
|
||||
isConnectable: false,
|
||||
|
@ -16,10 +16,10 @@ import Table, { ColumnsType } from 'antd/lib/table';
|
||||
import React, { useMemo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { NO_PERMISSION_FOR_ACTION } from '../../constants/HelperTextUtil';
|
||||
import { EntityType } from '../../enums/entity.enum';
|
||||
import { EntityReference } from '../../generated/type/entityReference';
|
||||
import { getEntityName } from '../../utils/CommonUtils';
|
||||
import {
|
||||
getPolicyWithFqnPath,
|
||||
getRoleWithFqnPath,
|
||||
|
@ -66,12 +66,8 @@ import {
|
||||
PlaceholderProps,
|
||||
TeamDetailsProp,
|
||||
} from '../../interface/teamsAndUsers.interface';
|
||||
import {
|
||||
getEntityName,
|
||||
getTierFromEntityInfo,
|
||||
hasEditAccess,
|
||||
} from '../../utils/CommonUtils';
|
||||
import { filterEntityAssets } from '../../utils/EntityUtils';
|
||||
import { getTierFromEntityInfo, hasEditAccess } from '../../utils/CommonUtils';
|
||||
import { filterEntityAssets, getEntityName } from '../../utils/EntityUtils';
|
||||
import {
|
||||
checkPermission,
|
||||
DEFAULT_ENTITY_PERMISSION,
|
||||
|
@ -46,7 +46,7 @@ jest.mock('rest/teamsAPI', () => ({
|
||||
.mockImplementation(() => Promise.resolve(MOCK_CURRENT_TEAM)),
|
||||
}));
|
||||
|
||||
jest.mock('../../utils/CommonUtils', () => ({
|
||||
jest.mock('utils/EntityUtils', () => ({
|
||||
getEntityName: jest.fn().mockReturnValue('entityName'),
|
||||
}));
|
||||
|
||||
|
@ -23,9 +23,10 @@ import { HTML5Backend } from 'react-dnd-html5-backend';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { getTeamByName, updateTeam } from 'rest/teamsAPI';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { TABLE_CONSTANTS } from '../../constants/Teams.constants';
|
||||
import { Team } from '../../generated/entity/teams/team';
|
||||
import { getEntityName, Transi18next } from '../../utils/CommonUtils';
|
||||
import { Transi18next } from '../../utils/CommonUtils';
|
||||
import { getTeamsWithFqnPath } from '../../utils/RouterUtils';
|
||||
import { getTableExpandableConfig } from '../../utils/TableUtils';
|
||||
import { getMovedTeamData } from '../../utils/TeamUtils';
|
||||
|
@ -15,8 +15,8 @@ import { TreeSelect } from 'antd';
|
||||
import { t } from 'i18next';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { getTeamsHierarchy } from 'rest/teamsAPI';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { TeamHierarchy } from '../../generated/entity/teams/teamHierarchy';
|
||||
import { getEntityName } from '../../utils/CommonUtils';
|
||||
import SVGIcons from '../../utils/SvgUtils';
|
||||
import { showErrorToast } from '../../utils/ToastUtils';
|
||||
|
||||
|
@ -27,6 +27,7 @@ import {
|
||||
triggerIngestionPipelineById,
|
||||
} from 'rest/ingestionPipelineAPI';
|
||||
import { fetchAirflowConfig } from 'rest/miscAPI';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { Operation } from '../../generated/entity/policies/policy';
|
||||
import { IngestionPipeline } from '../../generated/entity/services/ingestionPipelines/ingestionPipeline';
|
||||
import { useAirflowStatus } from '../../hooks/useAirflowStatus';
|
||||
@ -310,11 +311,13 @@ const TestSuitePipelineTab = () => {
|
||||
title: t('label.name'),
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
render: (name: string) => {
|
||||
render: (_, record) => {
|
||||
const FieldName = getEntityName(record);
|
||||
|
||||
return (
|
||||
<Tooltip
|
||||
title={
|
||||
viewPermission ? name : t('message.no-permission-to-view')
|
||||
viewPermission ? FieldName : t('message.no-permission-to-view')
|
||||
}>
|
||||
<Button type="link">
|
||||
<a
|
||||
@ -323,7 +326,7 @@ const TestSuitePipelineTab = () => {
|
||||
href={`${airFlowEndPoint}`}
|
||||
rel="noopener noreferrer"
|
||||
target="_blank">
|
||||
{name}
|
||||
{FieldName}
|
||||
<SVGIcons
|
||||
alt="external-link"
|
||||
className="tw-align-middle tw-ml-1"
|
||||
|
@ -19,6 +19,7 @@ import React, { RefObject, useCallback, useEffect, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { restoreTopic } from 'rest/topicsAPI';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { FQN_SEPARATOR_CHAR } from '../../constants/char.constants';
|
||||
import { EntityField } from '../../constants/Feeds.constants';
|
||||
import { observerOptions } from '../../constants/Mydata.constants';
|
||||
@ -32,7 +33,6 @@ import { LabelType, State } from '../../generated/type/tagLabel';
|
||||
import { useInfiniteScroll } from '../../hooks/useInfiniteScroll';
|
||||
import {
|
||||
getCurrentUserId,
|
||||
getEntityName,
|
||||
getEntityPlaceHolder,
|
||||
getOwnerValue,
|
||||
refreshPage,
|
||||
|
@ -32,8 +32,8 @@ import { cloneDeep, isEmpty, isUndefined } from 'lodash';
|
||||
import { EntityTags, TagOption } from 'Models';
|
||||
import React, { FC, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { Field } from '../../../generated/entity/data/topic';
|
||||
import { getEntityName } from '../../../utils/CommonUtils';
|
||||
import SVGIcons from '../../../utils/SvgUtils';
|
||||
import { getTableExpandableConfig } from '../../../utils/TableUtils';
|
||||
import { fetchTagsAndGlossaryTerms } from '../../../utils/TagsUtils';
|
||||
|
@ -20,6 +20,7 @@ import React, { FC, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { updateUser } from 'rest/userAPI';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { PAGE_SIZE_MEDIUM, ROUTES } from '../../constants/constants';
|
||||
import { ADMIN_ONLY_ACTION } from '../../constants/HelperTextUtil';
|
||||
import { PAGE_HEADERS } from '../../constants/PageHeaders.constant';
|
||||
@ -27,7 +28,6 @@ import { CreateUser } from '../../generated/api/teams/createUser';
|
||||
import { User } from '../../generated/entity/teams/user';
|
||||
import { Paging } from '../../generated/type/paging';
|
||||
import { useAuth } from '../../hooks/authHooks';
|
||||
import { getEntityName } from '../../utils/CommonUtils';
|
||||
import SVGIcons, { Icons } from '../../utils/SvgUtils';
|
||||
import { showErrorToast, showSuccessToast } from '../../utils/ToastUtils';
|
||||
import DeleteWidgetModal from '../common/DeleteWidget/DeleteWidgetModal';
|
||||
|
@ -37,6 +37,7 @@ import { useHistory, useLocation } from 'react-router-dom';
|
||||
import { changePassword } from 'rest/auth-API';
|
||||
import { getRoles } from 'rest/rolesAPIV1';
|
||||
import { getTeams } from 'rest/teamsAPI';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import {
|
||||
getUserPath,
|
||||
PAGE_SIZE,
|
||||
@ -63,7 +64,6 @@ import { Paging } from '../../generated/type/paging';
|
||||
import { useInfiniteScroll } from '../../hooks/useInfiniteScroll';
|
||||
import jsonData from '../../jsons/en';
|
||||
import {
|
||||
getEntityName,
|
||||
getNonDeletedTeams,
|
||||
getTierFromEntityInfo,
|
||||
} from '../../utils/CommonUtils';
|
||||
|
@ -17,10 +17,10 @@ import { t } from 'i18next';
|
||||
import { isEmpty, isUndefined, uniqueId } from 'lodash';
|
||||
import React from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { getUserPath } from '../../constants/constants';
|
||||
import { User } from '../../generated/entity/teams/user';
|
||||
import { EntityReference } from '../../generated/type/entityReference';
|
||||
import { getEntityName } from '../../utils/CommonUtils';
|
||||
import { LIST_CAP } from '../../utils/PermissionsUtils';
|
||||
import {
|
||||
getRoleWithFqnPath,
|
||||
|
@ -23,6 +23,7 @@ import { Link, useHistory, useLocation } from 'react-router-dom';
|
||||
import { toast } from 'react-toastify';
|
||||
import { getVersion } from 'rest/miscAPI';
|
||||
import { extractDetailsFromToken } from 'utils/AuthProvider.util';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import appState from '../../AppState';
|
||||
import { ReactComponent as IconAPI } from '../../assets/svg/api.svg';
|
||||
import { ReactComponent as IconDoc } from '../../assets/svg/doc.svg';
|
||||
@ -45,7 +46,6 @@ import { useAuth } from '../../hooks/authHooks';
|
||||
import jsonData from '../../jsons/en';
|
||||
import {
|
||||
addToRecentSearched,
|
||||
getEntityName,
|
||||
getNonDeletedTeams,
|
||||
} from '../../utils/CommonUtils';
|
||||
import SVGIcons, { Icons } from '../../utils/SvgUtils';
|
||||
|
@ -18,6 +18,7 @@ import Loader from 'components/Loader/Loader';
|
||||
import { isEmpty } from 'lodash';
|
||||
import React, { FC, useEffect, useMemo, useState } from 'react';
|
||||
import { getTypeByFQN } from 'rest/metadataTypeAPI';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { CustomProperty, Type } from '../../../generated/entity/type';
|
||||
import { showErrorToast } from '../../../utils/ToastUtils';
|
||||
import ErrorPlaceHolder from '../error-with-placeholder/ErrorPlaceHolder';
|
||||
@ -63,6 +64,7 @@ export const CustomPropertyTable: FC<CustomPropertyProps> = ({
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
width: '50%',
|
||||
render: (_, record) => getEntityName(record),
|
||||
},
|
||||
{
|
||||
title: 'Value',
|
||||
|
@ -15,7 +15,7 @@ import { Card, Typography } from 'antd';
|
||||
import { isEmpty } from 'lodash';
|
||||
import React, { Fragment } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { getEntityName } from '../../../utils/CommonUtils';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import SVGIcons, { Icons } from '../../../utils/SvgUtils';
|
||||
import { InheritedRolesCardProps } from './InheritedRolesCard.interface';
|
||||
import './InheritedRolesCard.style.less';
|
||||
|
@ -16,12 +16,12 @@ import { debounce, isEqual, lowerCase } from 'lodash';
|
||||
import { LoadingState } from 'Models';
|
||||
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { getGroupTypeTeams } from 'rest/userAPI';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { default as AppState, default as appState } from '../../../AppState';
|
||||
import { WILD_CARD_CHAR } from '../../../constants/char.constants';
|
||||
import { Table } from '../../../generated/entity/data/table';
|
||||
import { EntityReference } from '../../../generated/type/entityReference';
|
||||
import { useAuth } from '../../../hooks/authHooks';
|
||||
import { getEntityName } from '../../../utils/CommonUtils';
|
||||
import { getOwnerList } from '../../../utils/ManageUtils';
|
||||
import { showErrorToast } from '../../../utils/ToastUtils';
|
||||
import {
|
||||
|
@ -27,6 +27,7 @@ import { getMlModelByFQN } from 'rest/mlModelAPI';
|
||||
import { getPipelineByFqn } from 'rest/pipelineAPI';
|
||||
import { getTableDetailsByFQN } from 'rest/tableAPI';
|
||||
import { getTopicByFqn } from 'rest/topicsAPI';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import AppState from '../../../AppState';
|
||||
import { FQN_SEPARATOR_CHAR } from '../../../constants/char.constants';
|
||||
import { EntityType } from '../../../enums/entity.enum';
|
||||
@ -38,7 +39,6 @@ import { Pipeline } from '../../../generated/entity/data/pipeline';
|
||||
import { Table } from '../../../generated/entity/data/table';
|
||||
import { Topic } from '../../../generated/entity/data/topic';
|
||||
import { TagSource } from '../../../generated/type/tagLabel';
|
||||
import { getEntityName } from '../../../utils/CommonUtils';
|
||||
import SVGIcons from '../../../utils/SvgUtils';
|
||||
import {
|
||||
getEntityLink,
|
||||
|
@ -23,11 +23,12 @@ import React, {
|
||||
} from 'react';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { getUserByName } from 'rest/userAPI';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import AppState from '../../../AppState';
|
||||
import { getUserPath, TERM_ADMIN } from '../../../constants/constants';
|
||||
import { User } from '../../../generated/entity/teams/user';
|
||||
import { EntityReference } from '../../../generated/type/entityReference';
|
||||
import { getEntityName, getNonDeletedTeams } from '../../../utils/CommonUtils';
|
||||
import { getNonDeletedTeams } from '../../../utils/CommonUtils';
|
||||
import SVGIcons, { Icons } from '../../../utils/SvgUtils';
|
||||
import Loader from '../../Loader/Loader';
|
||||
import ProfilePicture from '../ProfilePicture/ProfilePicture';
|
||||
|
@ -15,9 +15,9 @@ import classNames from 'classnames';
|
||||
import { observer } from 'mobx-react';
|
||||
import { ImageShape } from 'Models';
|
||||
import React, { useMemo } from 'react';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import AppState from '../../../AppState';
|
||||
import { EntityReference, User } from '../../../generated/entity/teams/user';
|
||||
import { getEntityName } from '../../../utils/CommonUtils';
|
||||
import { userPermissions } from '../../../utils/PermissionsUtils';
|
||||
import { getUserProfilePic } from '../../../utils/UserDataUtils';
|
||||
import Loader from '../../Loader/Loader';
|
||||
|
@ -16,9 +16,9 @@ import { Button, Card, Select, Space } from 'antd';
|
||||
import { isArray, isNil, toLower } from 'lodash';
|
||||
import React, { useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { TERM_ADMIN } from '../../../constants/constants';
|
||||
import { useAuth } from '../../../hooks/authHooks';
|
||||
import { getEntityName } from '../../../utils/CommonUtils';
|
||||
import SVGIcons from '../../../utils/SvgUtils';
|
||||
import { useAuthContext } from '../../authentication/auth-provider/AuthProvider';
|
||||
import RolesElement from '../RolesElement/RolesElement.component';
|
||||
|
@ -15,8 +15,8 @@ import { Typography } from 'antd';
|
||||
import { isEmpty } from 'lodash';
|
||||
import React, { Fragment } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { TERM_ADMIN } from '../../../constants/constants';
|
||||
import { getEntityName } from '../../../utils/CommonUtils';
|
||||
import SVGIcons, { Icons } from '../../../utils/SvgUtils';
|
||||
import { RolesElementProps } from './RolesElement.interface';
|
||||
import './RolesElement.styles.less';
|
||||
|
@ -15,7 +15,7 @@ import { Col, Modal, Row, Typography } from 'antd';
|
||||
import { t } from 'i18next';
|
||||
import UserCard from 'pages/teams/UserCard';
|
||||
import React, { useState } from 'react';
|
||||
import { getEntityName } from '../../../utils/CommonUtils';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import Searchbar from '../searchbar/Searchbar';
|
||||
import { FollowersModalProps } from './FollowersModal.interface';
|
||||
|
||||
|
@ -18,6 +18,7 @@ import { ExtraInfo } from 'Models';
|
||||
import React, { useMemo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useLocation, useParams } from 'react-router-dom';
|
||||
import { getEntityId, getEntityName } from 'utils/EntityUtils';
|
||||
import AppState from '../../../AppState';
|
||||
import { FQN_SEPARATOR_CHAR } from '../../../constants/char.constants';
|
||||
import { ROUTES } from '../../../constants/constants';
|
||||
@ -27,8 +28,6 @@ import { CurrentTourPageType } from '../../../enums/tour.enum';
|
||||
import { OwnerType } from '../../../enums/user.enum';
|
||||
import { EntityReference } from '../../../generated/entity/type';
|
||||
import {
|
||||
getEntityId,
|
||||
getEntityName,
|
||||
getEntityPlaceHolder,
|
||||
getOwnerValue,
|
||||
} from '../../../utils/CommonUtils';
|
||||
|
@ -24,6 +24,7 @@ import { ExtraInfo } from 'Models';
|
||||
import React, { FunctionComponent, useMemo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Link, useLocation } from 'react-router-dom';
|
||||
import { getEntityId, getEntityName } from 'utils/EntityUtils';
|
||||
import i18n from 'utils/i18next/LocalUtil';
|
||||
import AppState from '../../../AppState';
|
||||
import { FQN_SEPARATOR_CHAR } from '../../../constants/char.constants';
|
||||
@ -36,8 +37,6 @@ import { TableType } from '../../../generated/entity/data/table';
|
||||
import { EntityReference } from '../../../generated/type/entityReference';
|
||||
import { TagLabel } from '../../../generated/type/tagLabel';
|
||||
import {
|
||||
getEntityId,
|
||||
getEntityName,
|
||||
getEntityPlaceHolder,
|
||||
getNameFromFQN,
|
||||
getOwnerValue,
|
||||
|
@ -504,6 +504,7 @@
|
||||
"operation-plural": "Operations",
|
||||
"option": "Option",
|
||||
"or-lowercase": "or",
|
||||
"ordinal-position": "Ordinal Position",
|
||||
"org-url": "OrgUrl",
|
||||
"override-current-owner": "Override Current Owner",
|
||||
"owned-lowercase": "owned",
|
||||
@ -545,6 +546,7 @@
|
||||
"policy-name": "Policy Name",
|
||||
"policy-plural": "Policies",
|
||||
"posted-on-lowercase": "posted on",
|
||||
"precision": "Precision",
|
||||
"press": "Press",
|
||||
"preview": "Preview",
|
||||
"preview-data": "Preview data",
|
||||
@ -632,6 +634,7 @@
|
||||
"sample-data": "Sample Data",
|
||||
"saturday": "Saturday",
|
||||
"save": "Save",
|
||||
"scale": "Scale",
|
||||
"schedule": "Schedule",
|
||||
"schedule-for-ingestion": "Schedule for Ingestion",
|
||||
"schedule-interval": "Schedule Interval",
|
||||
|
@ -504,6 +504,7 @@
|
||||
"operation-plural": "Operations",
|
||||
"option": "Option",
|
||||
"or-lowercase": "ou",
|
||||
"ordinal-position": "Ordinal Position",
|
||||
"org-url": "OrgUrl",
|
||||
"override-current-owner": "Override Current Owner",
|
||||
"owned-lowercase": "owned",
|
||||
@ -545,6 +546,7 @@
|
||||
"policy-name": "Nom de Police",
|
||||
"policy-plural": "Polices",
|
||||
"posted-on-lowercase": "posted on",
|
||||
"precision": "Precision",
|
||||
"press": "Press",
|
||||
"preview": "Preview",
|
||||
"preview-data": "Preview data",
|
||||
@ -632,6 +634,7 @@
|
||||
"sample-data": "Echantillon de Données",
|
||||
"saturday": "Saturday",
|
||||
"save": "Sauvegarder",
|
||||
"scale": "Scale",
|
||||
"schedule": "Horaire",
|
||||
"schedule-for-ingestion": "Schedule for Ingestion",
|
||||
"schedule-interval": "Programmer l'Exécution",
|
||||
|
@ -504,6 +504,7 @@
|
||||
"operation-plural": "Operations",
|
||||
"option": "Option",
|
||||
"or-lowercase": "or",
|
||||
"ordinal-position": "Ordinal Position",
|
||||
"org-url": "OrgUrl",
|
||||
"override-current-owner": "Override Current Owner",
|
||||
"owned-lowercase": "owned",
|
||||
@ -545,6 +546,7 @@
|
||||
"policy-name": "策略名",
|
||||
"policy-plural": "策略",
|
||||
"posted-on-lowercase": "posted on",
|
||||
"precision": "Precision",
|
||||
"press": "Press",
|
||||
"preview": "Preview",
|
||||
"preview-data": "Preview data",
|
||||
@ -632,6 +634,7 @@
|
||||
"sample-data": "Sample Data",
|
||||
"saturday": "Saturday",
|
||||
"save": "保存",
|
||||
"scale": "Scale",
|
||||
"schedule": "Schedule",
|
||||
"schedule-for-ingestion": "Schedule for Ingestion",
|
||||
"schedule-interval": "Schedule Interval",
|
||||
|
@ -45,7 +45,7 @@ import {
|
||||
updateAlert,
|
||||
} from 'rest/alertsAPI';
|
||||
import { getSuggestions } from 'rest/miscAPI';
|
||||
import { getEntityName } from 'utils/CommonUtils';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { searchFormattedUsersAndTeams } from 'utils/UserDataUtils';
|
||||
import {
|
||||
GlobalSettingOptions,
|
||||
|
@ -19,6 +19,7 @@ import React, { useEffect, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useParams } from 'react-router-dom';
|
||||
import { getAlertActionForAlerts, getAlertsFromId } from 'rest/alertsAPI';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import {
|
||||
GlobalSettingOptions,
|
||||
GlobalSettingsMenuCategory,
|
||||
@ -26,7 +27,6 @@ import {
|
||||
import { EntityType } from '../../enums/entity.enum';
|
||||
import { AlertAction } from '../../generated/alerts/alertAction';
|
||||
import { AlertFilterRule, Alerts } from '../../generated/alerts/alerts';
|
||||
import { getEntityName } from '../../utils/CommonUtils';
|
||||
import { getSettingPath } from '../../utils/RouterUtils';
|
||||
import { showErrorToast } from '../../utils/ToastUtils';
|
||||
|
||||
|
@ -18,9 +18,9 @@ import { noop, trim } from 'lodash';
|
||||
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { getAlertActionForAlerts, getAlertsFromName } from 'rest/alertsAPI';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { AlertAction } from '../../generated/alerts/alertAction';
|
||||
import { AlertFilterRule, Alerts } from '../../generated/alerts/alerts';
|
||||
import { getEntityName } from '../../utils/CommonUtils';
|
||||
import { showErrorToast } from '../../utils/ToastUtils';
|
||||
|
||||
const AlertsActivityFeedPage = () => {
|
||||
|
@ -20,6 +20,7 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { getAllAlerts } from 'rest/alertsAPI';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { PAGE_SIZE_MEDIUM } from '../../constants/constants';
|
||||
import {
|
||||
GlobalSettingOptions,
|
||||
@ -81,8 +82,8 @@ const AlertsPage = () => {
|
||||
dataIndex: 'name',
|
||||
width: '200px',
|
||||
key: 'name',
|
||||
render: (name: string, record: Alerts) => {
|
||||
return <Link to={`alert/${record.id}`}>{name}</Link>;
|
||||
render: (_: string, record: Alerts) => {
|
||||
return <Link to={`alert/${record.id}`}>{getEntityName(record)}</Link>;
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -65,13 +65,12 @@ import {
|
||||
import {
|
||||
getCurrentUserId,
|
||||
getEntityMissingError,
|
||||
getEntityName,
|
||||
getEntityPlaceHolder,
|
||||
getOwnerValue,
|
||||
refreshPage,
|
||||
} from 'utils/CommonUtils';
|
||||
import { getContainerDetailPath } from 'utils/ContainerDetailUtils';
|
||||
import { getEntityLineage } from 'utils/EntityUtils';
|
||||
import { getEntityLineage, getEntityName } from 'utils/EntityUtils';
|
||||
import { DEFAULT_ENTITY_PERMISSION } from 'utils/PermissionsUtils';
|
||||
import { getLineageViewPath } from 'utils/RouterUtils';
|
||||
import { serviceTypeLogo } from 'utils/ServiceUtils';
|
||||
|
@ -66,7 +66,6 @@ import {
|
||||
addToRecentViewed,
|
||||
getCurrentUserId,
|
||||
getEntityMissingError,
|
||||
getEntityName,
|
||||
getFeedCounts,
|
||||
} from '../../utils/CommonUtils';
|
||||
import {
|
||||
@ -76,7 +75,11 @@ import {
|
||||
getCurrentDashboardTab,
|
||||
sortTagsForCharts,
|
||||
} from '../../utils/DashboardDetailsUtils';
|
||||
import { getEntityFeedLink, getEntityLineage } from '../../utils/EntityUtils';
|
||||
import {
|
||||
getEntityFeedLink,
|
||||
getEntityLineage,
|
||||
getEntityName,
|
||||
} from '../../utils/EntityUtils';
|
||||
import { deletePost, updateThreadData } from '../../utils/FeedUtils';
|
||||
import { DEFAULT_ENTITY_PERMISSION } from '../../utils/PermissionsUtils';
|
||||
import { serviceTypeLogo } from '../../utils/ServiceUtils';
|
||||
|
@ -22,6 +22,7 @@ import React, { useEffect, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Link, useHistory } from 'react-router-dom';
|
||||
import { getListKPIs } from 'rest/KpiAPI';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import {
|
||||
getKpiPath,
|
||||
INITIAL_PAGING_VALUE,
|
||||
@ -32,7 +33,6 @@ import { EntityType } from '../../enums/entity.enum';
|
||||
import { Kpi, KpiTargetType } from '../../generated/dataInsight/kpi/kpi';
|
||||
import { Paging } from '../../generated/type/paging';
|
||||
import { useAuth } from '../../hooks/authHooks';
|
||||
import { getEntityName } from '../../utils/CommonUtils';
|
||||
import SVGIcons, { Icons } from '../../utils/SvgUtils';
|
||||
import { formatDateTime } from '../../utils/TimeUtils';
|
||||
|
||||
|
@ -82,17 +82,14 @@ import { Paging } from '../../generated/type/paging';
|
||||
import { useInfiniteScroll } from '../../hooks/useInfiniteScroll';
|
||||
import { EntityFieldThreadCount } from '../../interface/feed.interface';
|
||||
import jsonData from '../../jsons/en';
|
||||
import {
|
||||
getEntityName,
|
||||
getPartialNameFromTableFQN,
|
||||
} from '../../utils/CommonUtils';
|
||||
import { getPartialNameFromTableFQN } from '../../utils/CommonUtils';
|
||||
import {
|
||||
databaseSchemaDetailsTabs,
|
||||
getCurrentDatabaseSchemaDetailsTab,
|
||||
getQueryStringForSchemaTables,
|
||||
getTablesFromSearchResponse,
|
||||
} from '../../utils/DatabaseSchemaDetailsUtils';
|
||||
import { getEntityFeedLink } from '../../utils/EntityUtils';
|
||||
import { getEntityFeedLink, getEntityName } from '../../utils/EntityUtils';
|
||||
import {
|
||||
deletePost,
|
||||
getEntityFieldThreadCounts,
|
||||
|
@ -78,7 +78,6 @@ import {
|
||||
addToRecentViewed,
|
||||
getCurrentUserId,
|
||||
getEntityMissingError,
|
||||
getEntityName,
|
||||
getFeedCounts,
|
||||
getFields,
|
||||
getPartialNameFromTableFQN,
|
||||
@ -88,7 +87,11 @@ import {
|
||||
defaultFields,
|
||||
getCurrentDatasetTab,
|
||||
} from '../../utils/DatasetDetailsUtils';
|
||||
import { getEntityFeedLink, getEntityLineage } from '../../utils/EntityUtils';
|
||||
import {
|
||||
getEntityFeedLink,
|
||||
getEntityLineage,
|
||||
getEntityName,
|
||||
} from '../../utils/EntityUtils';
|
||||
import { deletePost, updateThreadData } from '../../utils/FeedUtils';
|
||||
import { DEFAULT_ENTITY_PERMISSION } from '../../utils/PermissionsUtils';
|
||||
import { serviceTypeLogo } from '../../utils/ServiceUtils';
|
||||
|
@ -26,13 +26,14 @@ import React, { useEffect, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useParams } from 'react-router-dom';
|
||||
import { getServiceByFQN, updateService } from 'rest/serviceAPI';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { GlobalSettingsMenuCategory } from '../../constants/GlobalSettings.constants';
|
||||
import { addServiceGuide } from '../../constants/service-guide.constant';
|
||||
import { OPENMETADATA } from '../../constants/Services.constant';
|
||||
import { ServiceCategory } from '../../enums/service.enum';
|
||||
import { ConfigData, ServicesType } from '../../interface/service.interface';
|
||||
import jsonData from '../../jsons/en';
|
||||
import { getEntityMissingError, getEntityName } from '../../utils/CommonUtils';
|
||||
import { getEntityMissingError } from '../../utils/CommonUtils';
|
||||
import { getPathByServiceFQN, getSettingPath } from '../../utils/RouterUtils';
|
||||
import {
|
||||
getServiceRouteFromServiceType,
|
||||
|
@ -48,6 +48,7 @@ import {
|
||||
getTopicVersion,
|
||||
getTopicVersions,
|
||||
} from 'rest/topicsAPI';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { FQN_SEPARATOR_CHAR } from '../../constants/char.constants';
|
||||
import {
|
||||
getDashboardDetailsPath,
|
||||
@ -69,7 +70,6 @@ import { Topic } from '../../generated/entity/data/topic';
|
||||
import { EntityHistory } from '../../generated/type/entityHistory';
|
||||
import { TagLabel } from '../../generated/type/tagLabel';
|
||||
import {
|
||||
getEntityName,
|
||||
getPartialNameFromFQN,
|
||||
getPartialNameFromTableFQN,
|
||||
} from '../../utils/CommonUtils';
|
||||
|
@ -55,11 +55,8 @@ import { Topic } from '../../generated/entity/data/topic';
|
||||
import { EntityLineage } from '../../generated/type/entityLineage';
|
||||
import { EntityReference } from '../../generated/type/entityReference';
|
||||
import jsonData from '../../jsons/en';
|
||||
import {
|
||||
getEntityName,
|
||||
getPartialNameFromTableFQN,
|
||||
} from '../../utils/CommonUtils';
|
||||
import { getEntityLineage } from '../../utils/EntityUtils';
|
||||
import { getPartialNameFromTableFQN } from '../../utils/CommonUtils';
|
||||
import { getEntityLineage, getEntityName } from '../../utils/EntityUtils';
|
||||
import { serviceTypeLogo } from '../../utils/ServiceUtils';
|
||||
import { showErrorToast } from '../../utils/ToastUtils';
|
||||
// css import
|
||||
|
@ -56,9 +56,8 @@ import {
|
||||
addToRecentViewed,
|
||||
getCurrentUserId,
|
||||
getEntityMissingError,
|
||||
getEntityName,
|
||||
} from '../../utils/CommonUtils';
|
||||
import { getEntityLineage } from '../../utils/EntityUtils';
|
||||
import { getEntityLineage, getEntityName } from '../../utils/EntityUtils';
|
||||
import { DEFAULT_ENTITY_PERMISSION } from '../../utils/PermissionsUtils';
|
||||
import { defaultFields } from '../../utils/PipelineDetailsUtils';
|
||||
import { serviceTypeLogo } from '../../utils/ServiceUtils';
|
||||
|
@ -21,10 +21,10 @@ import React, { useEffect, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useHistory, useParams } from 'react-router-dom';
|
||||
import { getPolicyByName, patchPolicy } from 'rest/rolesAPIV1';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { GlobalSettingOptions } from '../../../constants/GlobalSettings.constants';
|
||||
import { Effect, Rule } from '../../../generated/api/policies/createPolicy';
|
||||
import { Policy } from '../../../generated/entity/policies/policy';
|
||||
import { getEntityName } from '../../../utils/CommonUtils';
|
||||
import {
|
||||
getPath,
|
||||
getPolicyWithFqnPath,
|
||||
|
@ -21,10 +21,10 @@ import React, { useEffect, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useHistory, useParams } from 'react-router-dom';
|
||||
import { getPolicyByName, patchPolicy } from 'rest/rolesAPIV1';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { GlobalSettingOptions } from '../../../constants/GlobalSettings.constants';
|
||||
import { Effect, Rule } from '../../../generated/api/policies/createPolicy';
|
||||
import { Policy } from '../../../generated/entity/policies/policy';
|
||||
import { getEntityName } from '../../../utils/CommonUtils';
|
||||
import {
|
||||
getPath,
|
||||
getPolicyWithFqnPath,
|
||||
|
@ -48,6 +48,7 @@ import {
|
||||
patchRole,
|
||||
} from 'rest/rolesAPIV1';
|
||||
import { getTeamByName, patchTeamDetail } from 'rest/teamsAPI';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import {
|
||||
GlobalSettingOptions,
|
||||
GlobalSettingsMenuCategory,
|
||||
@ -56,7 +57,6 @@ import { EntityType } from '../../../enums/entity.enum';
|
||||
import { Rule } from '../../../generated/api/policies/createPolicy';
|
||||
import { Policy } from '../../../generated/entity/policies/policy';
|
||||
import { EntityReference } from '../../../generated/type/entityReference';
|
||||
import { getEntityName } from '../../../utils/CommonUtils';
|
||||
import { DEFAULT_ENTITY_PERMISSION } from '../../../utils/PermissionsUtils';
|
||||
import {
|
||||
getAddPolicyRulePath,
|
||||
|
@ -17,8 +17,8 @@ import RichTextEditorPreviewer from 'components/common/rich-text-editor/RichText
|
||||
import React, { useMemo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { EntityReference } from '../../../generated/type/entityReference';
|
||||
import { getEntityName } from '../../../utils/CommonUtils';
|
||||
import {
|
||||
getRoleWithFqnPath,
|
||||
getTeamsWithFqnPath,
|
||||
|
@ -21,6 +21,7 @@ import { isEmpty, isUndefined, uniqueId } from 'lodash';
|
||||
import React, { FC, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import {
|
||||
NO_PERMISSION_FOR_ACTION,
|
||||
NO_PERMISSION_TO_VIEW,
|
||||
@ -28,7 +29,6 @@ import {
|
||||
import { EntityType } from '../../../enums/entity.enum';
|
||||
import { Operation, Policy } from '../../../generated/entity/policies/policy';
|
||||
import { Paging } from '../../../generated/type/paging';
|
||||
import { getEntityName } from '../../../utils/CommonUtils';
|
||||
import {
|
||||
checkPermission,
|
||||
LIST_CAP,
|
||||
|
@ -20,11 +20,11 @@ import Loader from 'components/Loader/Loader';
|
||||
import React, { FC, useEffect, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { getPolicies, getRoles } from 'rest/rolesAPIV1';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { EntityType } from '../../../enums/entity.enum';
|
||||
import { Policy } from '../../../generated/entity/policies/policy';
|
||||
import { Role } from '../../../generated/entity/teams/role';
|
||||
import { EntityReference } from '../../../generated/type/entityReference';
|
||||
import { getEntityName } from '../../../utils/CommonUtils';
|
||||
import { showErrorToast } from '../../../utils/ToastUtils';
|
||||
import './AddAttributeModal.less';
|
||||
|
||||
|
@ -30,6 +30,7 @@ import { useHistory, useParams } from 'react-router-dom';
|
||||
import { getRoleByName, patchRole } from 'rest/rolesAPIV1';
|
||||
import { getTeamByName, patchTeamDetail } from 'rest/teamsAPI';
|
||||
import { getUserByName, updateUserDetail } from 'rest/userAPI';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import {
|
||||
GlobalSettingOptions,
|
||||
GlobalSettingsMenuCategory,
|
||||
@ -37,7 +38,6 @@ import {
|
||||
import { EntityType } from '../../../enums/entity.enum';
|
||||
import { Role } from '../../../generated/entity/teams/role';
|
||||
import { EntityReference } from '../../../generated/type/entityReference';
|
||||
import { getEntityName } from '../../../utils/CommonUtils';
|
||||
import { DEFAULT_ENTITY_PERMISSION } from '../../../utils/PermissionsUtils';
|
||||
import { getSettingPath } from '../../../utils/RouterUtils';
|
||||
import { showErrorToast } from '../../../utils/ToastUtils';
|
||||
|
@ -17,9 +17,9 @@ import RichTextEditorPreviewer from 'components/common/rich-text-editor/RichText
|
||||
import React, { useMemo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { getUserPath } from '../../../constants/constants';
|
||||
import { EntityReference } from '../../../generated/type/entityReference';
|
||||
import { getEntityName } from '../../../utils/CommonUtils';
|
||||
import {
|
||||
getPolicyWithFqnPath,
|
||||
getTeamsWithFqnPath,
|
||||
|
@ -34,7 +34,7 @@ jest.mock('components/common/rich-text-editor/RichTextEditorPreviewer', () =>
|
||||
jest.fn().mockReturnValue(<div data-testid="previewer">Previewer</div>)
|
||||
);
|
||||
|
||||
jest.mock('../../../utils/CommonUtils', () => ({
|
||||
jest.mock('utils/EntityUtils', () => ({
|
||||
getEntityName: jest.fn().mockReturnValue('data'),
|
||||
}));
|
||||
|
||||
|
@ -21,6 +21,7 @@ import { isEmpty, isUndefined, uniqueId } from 'lodash';
|
||||
import React, { FC, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import {
|
||||
NO_PERMISSION_FOR_ACTION,
|
||||
NO_PERMISSION_TO_VIEW,
|
||||
@ -29,7 +30,6 @@ import { EntityType } from '../../../enums/entity.enum';
|
||||
import { Operation } from '../../../generated/entity/policies/policy';
|
||||
import { Role } from '../../../generated/entity/teams/role';
|
||||
import { Paging } from '../../../generated/type/paging';
|
||||
import { getEntityName } from '../../../utils/CommonUtils';
|
||||
import {
|
||||
checkPermission,
|
||||
LIST_CAP,
|
||||
|
@ -41,10 +41,10 @@ import {
|
||||
} from '../../../generated/api/feed/createThread';
|
||||
import { Table } from '../../../generated/entity/data/table';
|
||||
import { ThreadType } from '../../../generated/entity/feed/thread';
|
||||
import { getEntityName } from '../../../utils/CommonUtils';
|
||||
import {
|
||||
ENTITY_LINK_SEPARATOR,
|
||||
getEntityFeedLink,
|
||||
getEntityName,
|
||||
} from '../../../utils/EntityUtils';
|
||||
import { getTagsWithoutTier, getTierTags } from '../../../utils/TableUtils';
|
||||
import {
|
||||
|
@ -34,10 +34,10 @@ import {
|
||||
import { Table } from '../../../generated/entity/data/table';
|
||||
import { ThreadType } from '../../../generated/entity/feed/thread';
|
||||
import { TagLabel } from '../../../generated/type/tagLabel';
|
||||
import { getEntityName } from '../../../utils/CommonUtils';
|
||||
import {
|
||||
ENTITY_LINK_SEPARATOR,
|
||||
getEntityFeedLink,
|
||||
getEntityName,
|
||||
} from '../../../utils/EntityUtils';
|
||||
import { getTagsWithoutTier, getTierTags } from '../../../utils/TableUtils';
|
||||
import {
|
||||
|
@ -39,10 +39,10 @@ import {
|
||||
ThreadType,
|
||||
} from '../../../generated/api/feed/createThread';
|
||||
import { Table } from '../../../generated/entity/data/table';
|
||||
import { getEntityName } from '../../../utils/CommonUtils';
|
||||
import {
|
||||
ENTITY_LINK_SEPARATOR,
|
||||
getEntityFeedLink,
|
||||
getEntityName,
|
||||
} from '../../../utils/EntityUtils';
|
||||
import { getTagsWithoutTier, getTierTags } from '../../../utils/TableUtils';
|
||||
import {
|
||||
|
@ -34,10 +34,10 @@ import {
|
||||
import { Table } from '../../../generated/entity/data/table';
|
||||
import { ThreadType } from '../../../generated/entity/feed/thread';
|
||||
import { TagLabel } from '../../../generated/type/tagLabel';
|
||||
import { getEntityName } from '../../../utils/CommonUtils';
|
||||
import {
|
||||
ENTITY_LINK_SEPARATOR,
|
||||
getEntityFeedLink,
|
||||
getEntityName,
|
||||
} from '../../../utils/EntityUtils';
|
||||
import { getTagsWithoutTier, getTierTags } from '../../../utils/TableUtils';
|
||||
import {
|
||||
|
@ -15,8 +15,8 @@ import ProfilePicture from 'components/common/ProfilePicture/ProfilePicture';
|
||||
import { EntityTags } from 'Models';
|
||||
import React, { useMemo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { FQN_SEPARATOR_CHAR } from '../../../constants/char.constants';
|
||||
import { getEntityName } from '../../../utils/CommonUtils';
|
||||
import { getTagsWithoutTier, getTierTags } from '../../../utils/TableUtils';
|
||||
import { EntityData } from '../TasksPage.interface';
|
||||
|
||||
|
@ -39,6 +39,7 @@ import {
|
||||
restoreTestSuite,
|
||||
updateTestSuiteById,
|
||||
} from 'rest/testAPI';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import {
|
||||
getTeamAndUserDetailsPath,
|
||||
INITIAL_PAGING_VALUE,
|
||||
@ -54,7 +55,7 @@ import { TestSuite } from '../../generated/tests/testSuite';
|
||||
import { Include } from '../../generated/type/include';
|
||||
import { Paging } from '../../generated/type/paging';
|
||||
import jsonData from '../../jsons/en';
|
||||
import { getEntityName, getEntityPlaceHolder } from '../../utils/CommonUtils';
|
||||
import { getEntityPlaceHolder } from '../../utils/CommonUtils';
|
||||
import { DEFAULT_ENTITY_PERMISSION } from '../../utils/PermissionsUtils';
|
||||
import { showErrorToast, showSuccessToast } from '../../utils/ToastUtils';
|
||||
import './TestSuiteDetailsPage.styles.less';
|
||||
|
@ -37,6 +37,7 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Link, useHistory } from 'react-router-dom';
|
||||
import { getListTestSuites } from 'rest/testAPI';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { checkPermission } from 'utils/PermissionsUtils';
|
||||
import {
|
||||
INITIAL_PAGING_VALUE,
|
||||
@ -51,7 +52,7 @@ import { Operation } from '../../generated/entity/policies/policy';
|
||||
import { TestSuite } from '../../generated/tests/testSuite';
|
||||
import { Include } from '../../generated/type/include';
|
||||
import { Paging } from '../../generated/type/paging';
|
||||
import { getEntityName, pluralize } from '../../utils/CommonUtils';
|
||||
import { pluralize } from '../../utils/CommonUtils';
|
||||
import { getTestSuitePath } from '../../utils/RouterUtils';
|
||||
|
||||
const TestSuitePage = () => {
|
||||
@ -106,7 +107,7 @@ const TestSuitePage = () => {
|
||||
<Link
|
||||
data-testid={`test-suite-${record.name}`}
|
||||
to={getTestSuitePath(record.name)}>
|
||||
{record.name}
|
||||
{getEntityName(record)}
|
||||
</Link>
|
||||
),
|
||||
},
|
||||
|
@ -66,10 +66,13 @@ import {
|
||||
addToRecentViewed,
|
||||
getCurrentUserId,
|
||||
getEntityMissingError,
|
||||
getEntityName,
|
||||
getFeedCounts,
|
||||
} from '../../utils/CommonUtils';
|
||||
import { getEntityFeedLink, getEntityLineage } from '../../utils/EntityUtils';
|
||||
import {
|
||||
getEntityFeedLink,
|
||||
getEntityLineage,
|
||||
getEntityName,
|
||||
} from '../../utils/EntityUtils';
|
||||
import { deletePost, updateThreadData } from '../../utils/FeedUtils';
|
||||
import { DEFAULT_ENTITY_PERMISSION } from '../../utils/PermissionsUtils';
|
||||
import { serviceTypeLogo } from '../../utils/ServiceUtils';
|
||||
|
@ -85,12 +85,11 @@ import { Paging } from '../../generated/type/paging';
|
||||
import { useInfiniteScroll } from '../../hooks/useInfiniteScroll';
|
||||
import { EntityFieldThreadCount } from '../../interface/feed.interface';
|
||||
import jsonData from '../../jsons/en';
|
||||
import { getEntityName } from '../../utils/CommonUtils';
|
||||
import {
|
||||
databaseDetailsTabs,
|
||||
getCurrentDatabaseDetailsTab,
|
||||
} from '../../utils/DatabaseDetailsUtils';
|
||||
import { getEntityFeedLink } from '../../utils/EntityUtils';
|
||||
import { getEntityFeedLink, getEntityName } from '../../utils/EntityUtils';
|
||||
import {
|
||||
deletePost,
|
||||
getEntityFieldThreadCounts,
|
||||
@ -628,14 +627,14 @@ const DatabaseDetails: FunctionComponent = () => {
|
||||
title: t('label.schema-name'),
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
render: (text: string, record: DatabaseSchema) => (
|
||||
render: (_, record: DatabaseSchema) => (
|
||||
<Link
|
||||
to={
|
||||
record.fullyQualifiedName
|
||||
? getDatabaseSchemaDetailsPath(record.fullyQualifiedName)
|
||||
: ''
|
||||
}>
|
||||
{text}
|
||||
{getEntityName(record)}
|
||||
</Link>
|
||||
),
|
||||
},
|
||||
|
@ -58,6 +58,7 @@ import {
|
||||
updateService,
|
||||
} from 'rest/serviceAPI';
|
||||
import { getTopics } from 'rest/topicsAPI';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import {
|
||||
getServiceDetailsPath,
|
||||
getTeamAndUserDetailsPath,
|
||||
@ -83,11 +84,10 @@ import { DashboardConnection } from '../../generated/entity/services/dashboardSe
|
||||
import { DatabaseService } from '../../generated/entity/services/databaseService';
|
||||
import { IngestionPipeline } from '../../generated/entity/services/ingestionPipelines/ingestionPipeline';
|
||||
import { MetadataServiceType } from '../../generated/entity/services/metadataService';
|
||||
import { EntityReference } from '../../generated/type/entityReference';
|
||||
import { Paging } from '../../generated/type/paging';
|
||||
import { useAirflowStatus } from '../../hooks/useAirflowStatus';
|
||||
import { ConfigData, ServicesType } from '../../interface/service.interface';
|
||||
import { getEntityMissingError, getEntityName } from '../../utils/CommonUtils';
|
||||
import { getEntityMissingError } from '../../utils/CommonUtils';
|
||||
import { DEFAULT_ENTITY_PERMISSION } from '../../utils/PermissionsUtils';
|
||||
import { getEditConnectionPath, getSettingPath } from '../../utils/RouterUtils';
|
||||
import {
|
||||
@ -972,12 +972,10 @@ const ServicePage: FunctionComponent = () => {
|
||||
title: firstColumn,
|
||||
dataIndex: 'displayName',
|
||||
key: 'displayName',
|
||||
render: (text: string, record: ServicePageData) => {
|
||||
render: (_, record: ServicePageData) => {
|
||||
return (
|
||||
<Link to={getLinkForFqn(record.fullyQualifiedName || '')}>
|
||||
{isUndefined(text)
|
||||
? getEntityName(record as unknown as EntityReference)
|
||||
: text}
|
||||
{getEntityName(record)}
|
||||
</Link>
|
||||
);
|
||||
},
|
||||
|
@ -60,6 +60,7 @@ import {
|
||||
patchClassification,
|
||||
patchTag,
|
||||
} from 'rest/tagAPI';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { ReactComponent as PlusIcon } from '../../assets/svg/plus-primary.svg';
|
||||
import {
|
||||
getExplorePath,
|
||||
@ -79,7 +80,6 @@ import {
|
||||
getActiveCatClass,
|
||||
getCountBadge,
|
||||
getEntityDeleteMessage,
|
||||
getEntityName,
|
||||
isUrlFriendlyName,
|
||||
} from '../../utils/CommonUtils';
|
||||
import {
|
||||
@ -710,88 +710,92 @@ const TagsPage = () => {
|
||||
);
|
||||
};
|
||||
|
||||
const tableColumn: ColumnsType<Tag> = useMemo(
|
||||
() => [
|
||||
{
|
||||
title: t('label.name'),
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
},
|
||||
{
|
||||
title: t('label.description'),
|
||||
dataIndex: 'description',
|
||||
key: 'description',
|
||||
render: (text: string, record: Tag) => (
|
||||
<div className="tw-group tableBody-cell">
|
||||
<div className="cursor-pointer d-flex">
|
||||
<div>
|
||||
{text ? (
|
||||
<RichTextEditorPreviewer markdown={text} />
|
||||
const tableColumn = useMemo(
|
||||
() =>
|
||||
[
|
||||
{
|
||||
title: t('label.name'),
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
render: (_, record: Tag) => getEntityName(record),
|
||||
},
|
||||
{
|
||||
title: t('label.description'),
|
||||
dataIndex: 'description',
|
||||
key: 'description',
|
||||
render: (text: string, record: Tag) => (
|
||||
<div className="tw-group tableBody-cell">
|
||||
<div className="cursor-pointer d-flex">
|
||||
<div>
|
||||
{text ? (
|
||||
<RichTextEditorPreviewer markdown={text} />
|
||||
) : (
|
||||
<span className="tw-no-description">
|
||||
{t('label.no-entity', {
|
||||
entity: t('label.description'),
|
||||
})}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{(classificationPermissions.EditDescription ||
|
||||
classificationPermissions.EditAll) && (
|
||||
<button
|
||||
className="tw-self-start tw-w-8 tw-h-auto tw-opacity-0 tw-ml-1 group-hover:tw-opacity-100 focus:tw-outline-none"
|
||||
onClick={() => {
|
||||
setIsEditTag(true);
|
||||
setEditTag(record);
|
||||
}}>
|
||||
<SVGIcons
|
||||
alt="edit"
|
||||
data-testid="editTagDescription"
|
||||
icon="icon-edit"
|
||||
title="Edit"
|
||||
width="16px"
|
||||
/>
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
<div className="tw-mt-1" data-testid="usage">
|
||||
<span className="tw-text-grey-muted tw-mr-1">
|
||||
{`${t('label.usage')}:`}
|
||||
</span>
|
||||
{record.usageCount ? (
|
||||
<Link
|
||||
className="link-text tw-align-middle"
|
||||
data-testid="usage-count"
|
||||
to={getUsageCountLink(record.fullyQualifiedName || '')}>
|
||||
{record.usageCount}
|
||||
</Link>
|
||||
) : (
|
||||
<span className="tw-no-description">
|
||||
{t('label.no-entity', {
|
||||
entity: t('label.description'),
|
||||
})}
|
||||
{t('label.not-used')}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{(classificationPermissions.EditDescription ||
|
||||
classificationPermissions.EditAll) && (
|
||||
<button
|
||||
className="tw-self-start tw-w-8 tw-h-auto tw-opacity-0 tw-ml-1 group-hover:tw-opacity-100 focus:tw-outline-none"
|
||||
onClick={() => {
|
||||
setIsEditTag(true);
|
||||
setEditTag(record);
|
||||
}}>
|
||||
<SVGIcons
|
||||
alt="edit"
|
||||
data-testid="editTagDescription"
|
||||
icon="icon-edit"
|
||||
title="Edit"
|
||||
width="16px"
|
||||
/>
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
<div className="tw-mt-1" data-testid="usage">
|
||||
<span className="tw-text-grey-muted tw-mr-1">
|
||||
{`${t('label.usage')}:`}
|
||||
</span>
|
||||
{record.usageCount ? (
|
||||
<Link
|
||||
className="link-text tw-align-middle"
|
||||
data-testid="usage-count"
|
||||
to={getUsageCountLink(record.fullyQualifiedName || '')}>
|
||||
{record.usageCount}
|
||||
</Link>
|
||||
) : (
|
||||
<span className="tw-no-description">{t('label.not-used')}</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: t('label.action-plural'),
|
||||
dataIndex: 'actions',
|
||||
key: 'actions',
|
||||
width: 120,
|
||||
align: 'center',
|
||||
render: (_, record: Tag) => (
|
||||
<button
|
||||
className="link-text"
|
||||
data-testid="delete-tag"
|
||||
disabled={
|
||||
record.provider === ProviderType.System ||
|
||||
!classificationPermissions.EditAll
|
||||
}
|
||||
onClick={() => handleActionDeleteTag(record)}>
|
||||
{getDeleteIcon(deleteTags, record.id)}
|
||||
</button>
|
||||
),
|
||||
},
|
||||
],
|
||||
),
|
||||
},
|
||||
{
|
||||
title: t('label.action-plural'),
|
||||
dataIndex: 'actions',
|
||||
key: 'actions',
|
||||
width: 120,
|
||||
align: 'center',
|
||||
render: (_, record: Tag) => (
|
||||
<button
|
||||
className="link-text"
|
||||
data-testid="delete-tag"
|
||||
disabled={
|
||||
record.provider === ProviderType.System ||
|
||||
!classificationPermissions.EditAll
|
||||
}
|
||||
onClick={() => handleActionDeleteTag(record)}>
|
||||
{getDeleteIcon(deleteTags, record.id)}
|
||||
</button>
|
||||
),
|
||||
},
|
||||
] as ColumnsType<Tag>,
|
||||
[
|
||||
currentClassification,
|
||||
classificationPermissions,
|
||||
|
@ -20,6 +20,7 @@ import React, { useEffect, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { searchData } from 'rest/miscAPI';
|
||||
import { getUsers } from 'rest/userAPI';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import {
|
||||
ADD_USER_CONTAINER_HEIGHT,
|
||||
PAGE_SIZE_MEDIUM,
|
||||
@ -34,7 +35,6 @@ import {
|
||||
import { Paging } from '../../generated/type/paging';
|
||||
import { SearchResponse } from '../../interface/search.interface';
|
||||
import { formatUsersResponse } from '../../utils/APIUtils';
|
||||
import { getEntityName } from '../../utils/CommonUtils';
|
||||
import { showErrorToast } from '../../utils/ToastUtils';
|
||||
import './AddUsersModal.less';
|
||||
import UserCard from './UserCard';
|
||||
|
@ -35,6 +35,7 @@ import {
|
||||
patchTeamDetail,
|
||||
} from 'rest/teamsAPI';
|
||||
import { getUsers, updateUserDetail } from 'rest/userAPI';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import AppState from '../../AppState';
|
||||
import {
|
||||
INITIAL_PAGING_VALUE,
|
||||
@ -57,7 +58,6 @@ import {
|
||||
formatUsersResponse,
|
||||
SearchEntityHits,
|
||||
} from '../../utils/APIUtils';
|
||||
import { getEntityName } from '../../utils/CommonUtils';
|
||||
import { DEFAULT_ENTITY_PERMISSION } from '../../utils/PermissionsUtils';
|
||||
import { getSettingPath, getTeamsWithFqnPath } from '../../utils/RouterUtils';
|
||||
import { showErrorToast, showSuccessToast } from '../../utils/ToastUtils';
|
||||
|
@ -23,7 +23,6 @@ import {
|
||||
} from 'components/common/CronEditor/CronEditor.constant';
|
||||
import ErrorPlaceHolder from 'components/common/error-with-placeholder/ErrorPlaceHolder';
|
||||
import Loader from 'components/Loader/Loader';
|
||||
import { Container } from 'generated/entity/data/container';
|
||||
import { t } from 'i18next';
|
||||
import {
|
||||
capitalize,
|
||||
@ -64,27 +63,12 @@ import {
|
||||
import { SIZE } from '../enums/common.enum';
|
||||
import { EntityType, FqnPart, TabSpecificField } from '../enums/entity.enum';
|
||||
import { FilterPatternEnum } from '../enums/filterPattern.enum';
|
||||
import { Field } from '../generated/api/data/createTopic';
|
||||
import { Kpi } from '../generated/dataInsight/kpi/kpi';
|
||||
import { Bot } from '../generated/entity/bot';
|
||||
import { Classification } from '../generated/entity/classification/classification';
|
||||
import { Dashboard } from '../generated/entity/data/dashboard';
|
||||
import { Database } from '../generated/entity/data/database';
|
||||
import { GlossaryTerm } from '../generated/entity/data/glossaryTerm';
|
||||
import { Pipeline } from '../generated/entity/data/pipeline';
|
||||
import { Column, Table } from '../generated/entity/data/table';
|
||||
import { Topic } from '../generated/entity/data/topic';
|
||||
import { Webhook } from '../generated/entity/events/webhook';
|
||||
import { ThreadTaskStatus, ThreadType } from '../generated/entity/feed/thread';
|
||||
import { Policy } from '../generated/entity/policies/policy';
|
||||
import { PipelineType } from '../generated/entity/services/ingestionPipelines/ingestionPipeline';
|
||||
import { Role } from '../generated/entity/teams/role';
|
||||
import { Team } from '../generated/entity/teams/team';
|
||||
import { EntityReference, User } from '../generated/entity/teams/user';
|
||||
import { EntityReference } from '../generated/entity/teams/user';
|
||||
import { Paging } from '../generated/type/paging';
|
||||
import { TagLabel } from '../generated/type/tagLabel';
|
||||
import { EntityFieldThreadCount } from '../interface/feed.interface';
|
||||
import { ServicesType } from '../interface/service.interface';
|
||||
import jsonData from '../jsons/en';
|
||||
import { getEntityFeedLink, getTitleCase } from './EntityUtils';
|
||||
import Fqn from './Fqn';
|
||||
@ -549,51 +533,6 @@ export const getEntityPlaceHolder = (value: string, isDeleted?: boolean) => {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Take entity reference as input and return name for entity
|
||||
* @param entity - entity reference
|
||||
* @returns - entity name
|
||||
*/
|
||||
export const getEntityName = (
|
||||
entity?:
|
||||
| EntityReference
|
||||
| ServicesType
|
||||
| User
|
||||
| Topic
|
||||
| Database
|
||||
| Dashboard
|
||||
| Table
|
||||
| Pipeline
|
||||
| Team
|
||||
| Policy
|
||||
| Role
|
||||
| GlossaryTerm
|
||||
| Webhook
|
||||
| Bot
|
||||
| Kpi
|
||||
| Classification
|
||||
| Field
|
||||
| Container
|
||||
| Column
|
||||
) => {
|
||||
return entity?.displayName || entity?.name || '';
|
||||
};
|
||||
|
||||
export const getEntityId = (
|
||||
entity?:
|
||||
| EntityReference
|
||||
| ServicesType
|
||||
| User
|
||||
| Topic
|
||||
| Database
|
||||
| Dashboard
|
||||
| Table
|
||||
| Pipeline
|
||||
| Team
|
||||
| Policy
|
||||
| Role
|
||||
) => entity?.id || '';
|
||||
|
||||
export const getEntityDeleteMessage = (entity: string, dependents: string) => {
|
||||
if (dependents) {
|
||||
return t('message.permanently-delete-metadata-and-dependents', {
|
||||
|
@ -67,12 +67,11 @@ import {
|
||||
} from '../generated/type/entityLineage';
|
||||
import { EntityReference } from '../generated/type/entityReference';
|
||||
import {
|
||||
getEntityName,
|
||||
getPartialNameFromFQN,
|
||||
getPartialNameFromTableFQN,
|
||||
prepareLabel,
|
||||
} from './CommonUtils';
|
||||
import { isLeafNode } from './EntityUtils';
|
||||
import { getEntityName, isLeafNode } from './EntityUtils';
|
||||
import { getEncodedFqn } from './StringsUtils';
|
||||
import SVGIcons from './SvgUtils';
|
||||
import { getEntityLink } from './TableUtils';
|
||||
|
@ -22,7 +22,7 @@ import { MlFeature } from '../generated/entity/data/mlmodel';
|
||||
import { Task } from '../generated/entity/data/pipeline';
|
||||
import { Column, TableConstraint } from '../generated/entity/data/table';
|
||||
import { Field } from '../generated/entity/data/topic';
|
||||
import { getEntityName } from './CommonUtils';
|
||||
import { getEntityName } from './EntityUtils';
|
||||
import SVGIcons from './SvgUtils';
|
||||
|
||||
const { Text } = Typography;
|
||||
|
@ -52,7 +52,6 @@ import { Edge, EntityLineage } from '../generated/type/entityLineage';
|
||||
import { EntityReference } from '../generated/type/entityUsage';
|
||||
import { TagLabel } from '../generated/type/tagLabel';
|
||||
import {
|
||||
getEntityName,
|
||||
getOwnerValue,
|
||||
getPartialNameFromTableFQN,
|
||||
getTableFQNFromColumnFQN,
|
||||
@ -69,6 +68,20 @@ export enum DRAWER_NAVIGATION_OPTIONS {
|
||||
lineage = 'Lineage',
|
||||
}
|
||||
|
||||
/**
|
||||
* Take entity reference as input and return name for entity
|
||||
* @param entity - entity reference
|
||||
* @returns - entity name
|
||||
*/
|
||||
export const getEntityName = (entity?: {
|
||||
name?: string;
|
||||
displayName?: string;
|
||||
}) => {
|
||||
return entity?.displayName || entity?.name || '';
|
||||
};
|
||||
|
||||
export const getEntityId = (entity?: { id?: string }) => entity?.id || '';
|
||||
|
||||
export const getEntityTags = (
|
||||
type: string,
|
||||
entityDetail: Table | Pipeline | Dashboard | Topic | Mlmodel
|
||||
|
@ -17,7 +17,7 @@ import { WILD_CARD_CHAR } from '../constants/char.constants';
|
||||
import { Team } from '../generated/entity/teams/team';
|
||||
import { User } from '../generated/entity/teams/user';
|
||||
import { EntityReference } from '../generated/type/entityUsage';
|
||||
import { getEntityName } from './CommonUtils';
|
||||
import { getEntityName } from './EntityUtils';
|
||||
|
||||
/**
|
||||
* @param listUsers - List of users
|
||||
|
@ -41,10 +41,11 @@ import { EntityType, FqnPart, TabSpecificField } from '../enums/entity.enum';
|
||||
import { ServiceCategory } from '../enums/service.enum';
|
||||
import { Column, Table } from '../generated/entity/data/table';
|
||||
import { TaskType } from '../generated/entity/feed/thread';
|
||||
import { getEntityName, getPartialNameFromTableFQN } from './CommonUtils';
|
||||
import { getPartialNameFromTableFQN } from './CommonUtils';
|
||||
import { defaultFields as DashboardFields } from './DashboardDetailsUtils';
|
||||
import { defaultFields as DatabaseSchemaFields } from './DatabaseSchemaDetailsUtils';
|
||||
import { defaultFields as TableFields } from './DatasetDetailsUtils';
|
||||
import { getEntityName } from './EntityUtils';
|
||||
import { defaultFields as MlModelFields } from './MlModelDetailsUtils';
|
||||
import { defaultFields as PipelineFields } from './PipelineDetailsUtils';
|
||||
import { serviceTypeLogo } from './ServiceUtils';
|
||||
|
Loading…
x
Reference in New Issue
Block a user