From e573d22a0b8857910a42e8524aa5ad291bb37fb7 Mon Sep 17 00:00:00 2001 From: Masterchen09 <13187726+Masterchen09@users.noreply.github.com> Date: Sat, 21 Jan 2023 01:08:02 +0100 Subject: [PATCH] refactor(ui): refactor capitalization of platform name and sub types --- datahub-web-react/public/meta-favicon.ico | Bin 242942 -> 0 bytes .../src/app/domain/DomainsList.tsx | 2 +- .../src/app/entity/chart/ChartEntity.tsx | 9 +++++---- .../app/entity/chart/preview/ChartPreview.tsx | 6 ++---- .../app/entity/container/ContainerEntity.tsx | 5 +++-- .../app/entity/container/preview/Preview.tsx | 5 +++-- .../app/entity/dashboard/DashboardEntity.tsx | 8 ++++---- .../dashboard/preview/DashboardPreview.tsx | 7 +++---- .../src/app/entity/dataFlow/DataFlowEntity.tsx | 9 +++++++-- .../app/entity/dataFlow/preview/Preview.tsx | 6 ++---- .../src/app/entity/dataJob/DataJobEntity.tsx | 9 +++++++-- .../src/app/entity/dataJob/preview/Preview.tsx | 4 +--- .../src/app/entity/dataset/DatasetEntity.tsx | 14 +++++++++----- .../src/app/entity/dataset/preview/Preview.tsx | 5 ++--- .../src/app/entity/group/GroupMembers.tsx | 4 ++-- .../app/entity/mlFeature/MLFeatureEntity.tsx | 2 +- .../app/entity/mlFeature/preview/Preview.tsx | 4 +++- .../mlFeatureTable/MLFeatureTableEntity.tsx | 5 +++-- .../profile/MLFeatureTableHeader.tsx | 7 +++++-- .../src/app/entity/mlModel/preview/Preview.tsx | 5 ++--- .../entity/mlModelGroup/preview/Preview.tsx | 6 ++---- .../entity/mlPrimaryKey/preview/Preview.tsx | 4 +++- .../styled/search/downloadAsCsvUtil.ts | 3 ++- .../containers/profile/header/EntityHeader.tsx | 8 +++----- .../PlatformContentContainer.tsx | 17 ++++++++--------- .../PlatformContent/PlatformContentView.tsx | 3 +-- .../Validations/DatasetAssertionsList.tsx | 14 ++++++++++++-- .../src/app/entity/shared/utils.ts | 3 ++- .../src/app/identity/user/SelectRole.tsx | 2 +- .../app/ingest/source/IngestionSourceList.tsx | 2 +- .../src/app/lineage/LineageEntityNode.tsx | 14 ++++++-------- .../__tests__/LineageEntityView.test.tsx | 2 +- .../lineage/__tests__/constructTree.test.ts | 2 +- .../app/lineage/manage/LineageEntityView.tsx | 7 ++++--- .../app/permissions/policy/ManagePolicies.tsx | 6 +++--- .../src/app/permissions/roles/ManageRoles.tsx | 2 +- .../renderer/component/EntityNameList.tsx | 11 +++++------ .../renderer/component/PlatformList.tsx | 7 ++++++- .../src/app/search/SearchFilterLabel.tsx | 12 ++++++++---- .../src/app/settings/AccessTokens.tsx | 4 ++-- .../cypress/integration/siblings/siblings.js | 4 ++-- 41 files changed, 139 insertions(+), 110 deletions(-) delete mode 100644 datahub-web-react/public/meta-favicon.ico diff --git a/datahub-web-react/public/meta-favicon.ico b/datahub-web-react/public/meta-favicon.ico deleted file mode 100644 index 1587e379073865767be6c13c239fd950d0f29f25..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 242942 zcmeHwcXSk2mcBRd*>Luc4QIp5Z@iN{GrOLho$*fCnVqo`IY$Ey1e3uAgH5(^0%LF{ zXOWQz5+INeNeBrLNgyGF5Xw2{EZyJzUiGW4ZUrRK)m`0Pk8`O~^{W@|yWf5H-52Va zXa0!)J(Kqg|NrbW1*iVxnSXlbnP+~)gvU3T@LYt=f1+G9{}WLKlNn47m>lpv4gmWm z{=Ki=%^I5=00&I`n{r@szCV*y=f>ZprUJ$loq^^9`5*9P+HJ>DvUWJ($>b6_l@Pnly~uX7kM6`{7WI!SWzlo zsmV@N%bmw%t1HZwNwvFHXCzzV22=5k3)I%!EaIrowRO|pb3KdV&QWV~6UT3(vV?1t z8yO_hvai2V9)-u?BlrsbY6I|IoAX%IEZSdDP{L3lo`5%O7F%{Q#C}UeL((2 z*CVZUxOtJZC<*46!CX!W4$#Vm$&3r6sOsu#ua&T-Sf^L zZP#XyA;^+K!Bn08K<_Gw&)M-cj?wO&iw@Z6ah8ausu$PzThn_{Mql zdH$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aEy!0B;RlNZw)-gNp7_Kz2*=1>98H(}1nq+amg zVJ4NZ9<9tP=CwLig#Fb$T)Wa~`}F1qE&j2l2LAo3sw&~m!}fe3gK_8?I|rSRp;+9pFd&31T{@y{Qmv>!nVLXKYWieeDlpW!uCM^SYIIL z{C$0WMHywhUR*s2{|)6S;`~2l9U%IDWeiZBe4rPsF<OR&;Lx%J@=gO8^U)e=|?~M5uHALn%1pbM@S3(HwgW=Oc!~=zkuh6 zBi9(oe17nQAE_IKzOtUr3n z;8FO;x&K8s*I9f368~fPI{|MJz87EylLMV`0ORP9BS+GxQKM`K&*0Ys{=&k-sJ6CN zO`@o%NciyJAGCi@{*CwH!^gTn?C}{se0ZmEU-cjk!1sVP{T-1OhxS#*Zymj(eTFzl zzpFg7@p0c#p4zBzqPrJ@?)3VjsbWbaDL2kYHhZT-Fm?* z^A(c=p2h)>!#^4beLdFxiupgx0WxKun@+F|%wTfB;7${|5H;XNJG3>Hl96`kl?0?2T z-xu9l$8#_(YURxvlLKDP0guFgTWd2F-uOi0162C|+{+6HYXr?;a=_$(;DATsA2lma zK4{zjvmKCib`oKafEi2dus@L2rU=3Nzg|5W?`G}{17*du5LlLICP1P448|BaOy z+}}?Tem^n(2mbjyfYSRt+oNsDiOB&E=0FASDKdk}0h0qJ2TTr_956Xxa=_$($pMoC sCI?Iom>e)UU~<6ZfXM-q111Md4wxJ;Ibd?Y { const handleDelete = (urn: string) => { removeFromListDomainsCache(client, urn, page, pageSize); - setTimeout(function () { + setTimeout(() => { refetch?.(); }, 2000); }; diff --git a/datahub-web-react/src/app/entity/chart/ChartEntity.tsx b/datahub-web-react/src/app/entity/chart/ChartEntity.tsx index 507b89f9a6a0a..efc3cc470b838 100644 --- a/datahub-web-react/src/app/entity/chart/ChartEntity.tsx +++ b/datahub-web-react/src/app/entity/chart/ChartEntity.tsx @@ -21,6 +21,7 @@ import { ChartStatsSummarySubHeader } from './profile/stats/ChartStatsSummarySub import { InputFieldsTab } from '../shared/tabs/Entity/InputFieldsTab'; import { ChartSnippet } from './ChartSnippet'; import { EmbedTab } from '../shared/tabs/Embed/EmbedTab'; +import { capitalizeFirstLetterOnly } from '../../shared/textUtil'; /** * Definition of the DataHub Chart entity. @@ -154,7 +155,7 @@ export class ChartEntity implements Entity { return ( { return ( { getLineageVizConfig = (entity: Chart) => { return { urn: entity.urn, - name: entity.properties?.name || '', + name: entity.properties?.name || entity.urn, type: EntityType.Chart, - icon: entity?.platform?.properties?.logoUrl || '', + icon: entity?.platform?.properties?.logoUrl || undefined, platform: entity?.platform, }; }; diff --git a/datahub-web-react/src/app/entity/chart/preview/ChartPreview.tsx b/datahub-web-react/src/app/entity/chart/preview/ChartPreview.tsx index 87e145a83c6b7..c74e0ac75661b 100644 --- a/datahub-web-react/src/app/entity/chart/preview/ChartPreview.tsx +++ b/datahub-web-react/src/app/entity/chart/preview/ChartPreview.tsx @@ -14,7 +14,6 @@ import { } from '../../../../types.generated'; import DefaultPreviewCard from '../../../preview/DefaultPreviewCard'; import { useEntityRegistry } from '../../../useEntityRegistry'; -import { capitalizeFirstLetter } from '../../../shared/textUtil'; import { IconStyleType } from '../../Entity'; import { ChartStatsSummary as ChartStatsSummaryView } from '../shared/ChartStatsSummary'; @@ -41,7 +40,7 @@ export const ChartPreview = ({ snippet, }: { urn: string; - platform: string; + platform?: string; platformInstanceId?: string; name?: string; description?: string | null; @@ -62,7 +61,6 @@ export const ChartPreview = ({ snippet?: React.ReactNode | null; }): JSX.Element => { const entityRegistry = useEntityRegistry(); - const capitalizedPlatform = capitalizeFirstLetter(platform); return ( { { { const entityRegistry = useEntityRegistry(); - const typeName = (subTypes?.typeNames?.length && subTypes?.typeNames[0]) || 'Container'; + const typeName = capitalizeFirstLetterOnly(subTypes?.typeNames?.[0]) || 'Container'; return ( { return ( { return ( { getLineageVizConfig = (entity: Dashboard) => { return { urn: entity.urn, - name: entity.properties?.name || '', + name: entity.properties?.name || entity.urn, type: EntityType.Dashboard, subtype: entity?.subTypes?.typeNames?.[0] || undefined, - icon: entity?.platform?.properties?.logoUrl || '', + icon: entity?.platform?.properties?.logoUrl || undefined, platform: entity?.platform, }; }; diff --git a/datahub-web-react/src/app/entity/dashboard/preview/DashboardPreview.tsx b/datahub-web-react/src/app/entity/dashboard/preview/DashboardPreview.tsx index 4abf28487be35..0261506dfc675 100644 --- a/datahub-web-react/src/app/entity/dashboard/preview/DashboardPreview.tsx +++ b/datahub-web-react/src/app/entity/dashboard/preview/DashboardPreview.tsx @@ -14,7 +14,7 @@ import { } from '../../../../types.generated'; import DefaultPreviewCard from '../../../preview/DefaultPreviewCard'; import { useEntityRegistry } from '../../../useEntityRegistry'; -import { capitalizeFirstLetter, capitalizeFirstLetterOnly } from '../../../shared/textUtil'; +import { capitalizeFirstLetterOnly } from '../../../shared/textUtil'; import { IconStyleType } from '../../Entity'; import { DashboardStatsSummary as DashboardStatsSummaryView } from '../shared/DashboardStatsSummary'; @@ -43,7 +43,7 @@ export const DashboardPreview = ({ snippet, }: { urn: string; - platform: string; + platform?: string; platformInstanceId?: string; name?: string; subtype?: string | null; @@ -66,7 +66,6 @@ export const DashboardPreview = ({ snippet?: React.ReactNode | null; }): JSX.Element => { const entityRegistry = useEntityRegistry(); - const capitalizedPlatform = capitalizeFirstLetter(platform); return ( { urn={data.urn} name={data.properties?.name || ''} description={data.editableProperties?.description || data.properties?.description} - platformName={data.platform.properties?.displayName || data.platform.name} + platformName={ + data?.platform?.properties?.displayName || capitalizeFirstLetterOnly(data?.platform?.name) + } platformLogo={data?.platform?.properties?.logoUrl || ''} owners={data.ownership?.owners} globalTags={data.globalTags} @@ -135,7 +138,9 @@ export class DataFlowEntity implements Entity { name={data.properties?.name || ''} platformInstanceId={data.dataPlatformInstance?.instanceId} description={data.editableProperties?.description || data.properties?.description || ''} - platformName={data.platform.properties?.displayName || data.platform.name} + platformName={ + data?.platform?.properties?.displayName || capitalizeFirstLetterOnly(data?.platform?.name) + } platformLogo={data?.platform?.properties?.logoUrl || ''} owners={data.ownership?.owners} globalTags={data.globalTags} diff --git a/datahub-web-react/src/app/entity/dataFlow/preview/Preview.tsx b/datahub-web-react/src/app/entity/dataFlow/preview/Preview.tsx index 6996b2ad04387..f26434e6826e4 100644 --- a/datahub-web-react/src/app/entity/dataFlow/preview/Preview.tsx +++ b/datahub-web-react/src/app/entity/dataFlow/preview/Preview.tsx @@ -4,7 +4,6 @@ import styled from 'styled-components'; import { Deprecation, Domain, EntityType, GlobalTags, Owner, SearchInsight } from '../../../../types.generated'; import DefaultPreviewCard from '../../../preview/DefaultPreviewCard'; import { useEntityRegistry } from '../../../useEntityRegistry'; -import { capitalizeFirstLetter } from '../../../shared/textUtil'; import { IconStyleType } from '../../Entity'; import { ANTD_GRAY } from '../../shared/constants'; @@ -32,7 +31,7 @@ export const Preview = ({ name: string; platformInstanceId?: string; description?: string | null; - platformName: string; + platformName?: string; platformLogo?: string | null; owners?: Array | null; domain?: Domain | null; @@ -44,7 +43,6 @@ export const Preview = ({ jobCount?: number | null; }): JSX.Element => { const entityRegistry = useEntityRegistry(); - const capitalizedPlatform = capitalizeFirstLetter(platformName); return ( { - return data?.dataFlow?.platform?.properties?.displayName || data?.dataFlow?.platform?.name || ''; + return ( + data?.dataFlow?.platform?.properties?.displayName || + capitalizeFirstLetterOnly(data?.dataFlow?.platform?.name) || + '' + ); }; /** @@ -194,7 +199,7 @@ export class DataJobEntity implements Entity { name: this.displayName(entity), expandedName: this.getExpandedNameForDataJob(entity), type: EntityType.DataJob, - icon: entity?.dataFlow?.platform?.properties?.logoUrl || '', + icon: entity?.dataFlow?.platform?.properties?.logoUrl || undefined, platform: entity?.dataFlow?.platform, }; }; diff --git a/datahub-web-react/src/app/entity/dataJob/preview/Preview.tsx b/datahub-web-react/src/app/entity/dataJob/preview/Preview.tsx index 63129ceb11834..12d4ca083d946 100644 --- a/datahub-web-react/src/app/entity/dataJob/preview/Preview.tsx +++ b/datahub-web-react/src/app/entity/dataJob/preview/Preview.tsx @@ -6,7 +6,6 @@ import { ClockCircleOutlined } from '@ant-design/icons'; import { Deprecation, Domain, EntityType, GlobalTags, Owner, SearchInsight } from '../../../../types.generated'; import DefaultPreviewCard from '../../../preview/DefaultPreviewCard'; import { useEntityRegistry } from '../../../useEntityRegistry'; -import { capitalizeFirstLetter } from '../../../shared/textUtil'; import { IconStyleType } from '../../Entity'; import { ANTD_GRAY } from '../../shared/constants'; import { toRelativeTimeString } from '../../../shared/time/timeUtils'; @@ -47,7 +46,6 @@ export const Preview = ({ externalUrl?: string | null; }): JSX.Element => { const entityRegistry = useEntityRegistry(); - const capitalizedPlatform = capitalizeFirstLetter(platformName); return ( { return { name: dataset?.properties?.name || dataset?.name, externalUrl: dataset?.properties?.externalUrl, - entityTypeOverride: subTypes ? capitalizeFirstLetter(subTypes.typeNames?.[0]) : '', + entityTypeOverride: subTypes ? capitalizeFirstLetterOnly(subTypes.typeNames?.[0]) : '', properties: extendedProperties, }; }; @@ -237,7 +237,9 @@ export class DatasetEntity implements Entity { origin={data.origin} subtype={data.subTypes?.typeNames?.[0]} description={data.editableProperties?.description || data.properties?.description} - platformName={data.platform.properties?.displayName || data.platform.name} + platformName={ + data?.platform?.properties?.displayName || capitalizeFirstLetterOnly(data?.platform?.name) + } platformLogo={data.platform.properties?.logoUrl} platformInstanceId={data.dataPlatformInstance?.instanceId} owners={data.ownership?.owners} @@ -260,11 +262,13 @@ export class DatasetEntity implements Entity { name={data.properties?.name || data.name} origin={data.origin} description={data.editableProperties?.description || data.properties?.description} - platformName={data.platform.properties?.displayName || data.platform.name} + platformName={ + data?.platform?.properties?.displayName || capitalizeFirstLetterOnly(data?.platform?.name) + } platformLogo={data.platform.properties?.logoUrl} platformInstanceId={data.dataPlatformInstance?.instanceId} platformNames={genericProperties?.siblingPlatforms?.map( - (platform) => platform.properties?.displayName || platform.name, + (platform) => platform.properties?.displayName || capitalizeFirstLetterOnly(platform.name), )} platformLogos={genericProperties?.siblingPlatforms?.map((platform) => platform.properties?.logoUrl)} owners={data.ownership?.owners} diff --git a/datahub-web-react/src/app/entity/dataset/preview/Preview.tsx b/datahub-web-react/src/app/entity/dataset/preview/Preview.tsx index c9c8bd13f4fc2..ba9677f0b6183 100644 --- a/datahub-web-react/src/app/entity/dataset/preview/Preview.tsx +++ b/datahub-web-react/src/app/entity/dataset/preview/Preview.tsx @@ -48,7 +48,7 @@ export const Preview = ({ name: string; origin: FabricType; description?: string | null; - platformName: string; + platformName?: string; platformLogo?: string | null; platformNames?: (Maybe | undefined)[]; platformLogos?: (Maybe | undefined)[]; @@ -69,7 +69,6 @@ export const Preview = ({ lastUpdatedMs?: number | null; }): JSX.Element => { const entityRegistry = useEntityRegistry(); - const capitalPlatformName = capitalizeFirstLetterOnly(platformName); return ( { // Reload the page. refetch(); }, 2000); @@ -131,7 +131,7 @@ export default function GroupMembers({ urn, pageSize, isExternalGroup, onChangeM const onAddMembers = () => { onChangeMembers?.(); - setTimeout(function () { + setTimeout(() => { // Reload the page. refetch(); }, 3000); diff --git a/datahub-web-react/src/app/entity/mlFeature/MLFeatureEntity.tsx b/datahub-web-react/src/app/entity/mlFeature/MLFeatureEntity.tsx index 3577cc432ee4c..9d3da23674a15 100644 --- a/datahub-web-react/src/app/entity/mlFeature/MLFeatureEntity.tsx +++ b/datahub-web-react/src/app/entity/mlFeature/MLFeatureEntity.tsx @@ -169,7 +169,7 @@ export class MLFeatureEntity implements Entity { // eslint-disable-next-line icon: entity?.['featureTables']?.relationships?.[0]?.entity?.platform?.properties?.logoUrl || undefined, // eslint-disable-next-line - platform: entity?.['featureTables']?.relationships?.[0]?.entity?.platform?.name, + platform: entity?.['featureTables']?.relationships?.[0]?.entity?.platform, }; }; diff --git a/datahub-web-react/src/app/entity/mlFeature/preview/Preview.tsx b/datahub-web-react/src/app/entity/mlFeature/preview/Preview.tsx index 5d763a0fe64fa..2b255945c2e1e 100644 --- a/datahub-web-react/src/app/entity/mlFeature/preview/Preview.tsx +++ b/datahub-web-react/src/app/entity/mlFeature/preview/Preview.tsx @@ -30,7 +30,9 @@ export const Preview = ({ urn={urn} platformInstanceId={platformInstanceId} description={description || ''} - platform={capitalizeFirstLetterOnly(platform?.properties?.displayName) || featureNamespace} + platform={ + platform?.properties?.displayName || capitalizeFirstLetterOnly(platform?.name) || featureNamespace + } logoUrl={platform?.properties?.logoUrl || ''} type="ML Feature" typeIcon={entityRegistry.getIcon(EntityType.Mlfeature, 14, IconStyleType.ACCENT)} diff --git a/datahub-web-react/src/app/entity/mlFeatureTable/MLFeatureTableEntity.tsx b/datahub-web-react/src/app/entity/mlFeatureTable/MLFeatureTableEntity.tsx index 9b145ff501b77..259d7dfaa22af 100644 --- a/datahub-web-react/src/app/entity/mlFeatureTable/MLFeatureTableEntity.tsx +++ b/datahub-web-react/src/app/entity/mlFeatureTable/MLFeatureTableEntity.tsx @@ -16,6 +16,7 @@ import Sources from './profile/Sources'; import { DocumentationTab } from '../shared/tabs/Documentation/DocumentationTab'; import { PropertiesTab } from '../shared/tabs/Properties/PropertiesTab'; import { EntityMenuItems } from '../shared/EntityDropdown/EntityDropdown'; +import { capitalizeFirstLetterOnly } from '../../shared/textUtil'; /** * Definition of the DataHub MLFeatureTable entity. @@ -118,7 +119,7 @@ export class MLFeatureTableEntity implements Entity { description={data.description} owners={data.ownership?.owners} logoUrl={data.platform?.properties?.logoUrl} - platformName={data.platform?.displayName} + platformName={data.platform?.properties?.displayName || capitalizeFirstLetterOnly(data.platform?.name)} /> ); }; @@ -132,7 +133,7 @@ export class MLFeatureTableEntity implements Entity { description={data.description || ''} owners={data.ownership?.owners} logoUrl={data.platform?.properties?.logoUrl} - platformName={data.platform?.displayName} + platformName={data.platform?.properties?.displayName || capitalizeFirstLetterOnly(data.platform?.name)} platformInstanceId={data.dataPlatformInstance?.instanceId} /> ); diff --git a/datahub-web-react/src/app/entity/mlFeatureTable/profile/MLFeatureTableHeader.tsx b/datahub-web-react/src/app/entity/mlFeatureTable/profile/MLFeatureTableHeader.tsx index 40f1b516d01ea..82a1adb54d50a 100644 --- a/datahub-web-react/src/app/entity/mlFeatureTable/profile/MLFeatureTableHeader.tsx +++ b/datahub-web-react/src/app/entity/mlFeatureTable/profile/MLFeatureTableHeader.tsx @@ -6,6 +6,7 @@ import { useEntityRegistry } from '../../../useEntityRegistry'; import CompactContext from '../../../shared/CompactContext'; import { AvatarsGroup } from '../../../shared/avatar'; import MarkdownViewer from '../../shared/components/legacy/MarkdownViewer'; +import { capitalizeFirstLetterOnly } from '../../../shared/textUtil'; const HeaderInfoItem = styled.div` display: inline-block; @@ -32,6 +33,8 @@ export default function MLFeatureTableHeader({ mlFeatureTable: { platform, descr const entityRegistry = useEntityRegistry(); const isCompact = React.useContext(CompactContext); + const platformName = platform.properties?.displayName || capitalizeFirstLetterOnly(platform.name); + return ( <> @@ -49,10 +52,10 @@ export default function MLFeatureTableHeader({ mlFeatureTable: { platform, descr preview={false} src={platform.properties?.logoUrl} placeholder - alt={platform.name} + alt={platformName} /> ) : null} - {platform.name} + {platformName} ) : null} diff --git a/datahub-web-react/src/app/entity/mlModel/preview/Preview.tsx b/datahub-web-react/src/app/entity/mlModel/preview/Preview.tsx index 75b9ea6bf7776..e09dedbaff283 100644 --- a/datahub-web-react/src/app/entity/mlModel/preview/Preview.tsx +++ b/datahub-web-react/src/app/entity/mlModel/preview/Preview.tsx @@ -1,13 +1,12 @@ import React from 'react'; import { EntityType, MlModel } from '../../../../types.generated'; import DefaultPreviewCard from '../../../preview/DefaultPreviewCard'; -import { capitalizeFirstLetter } from '../../../shared/textUtil'; +import { capitalizeFirstLetterOnly } from '../../../shared/textUtil'; import { useEntityRegistry } from '../../../useEntityRegistry'; import { IconStyleType } from '../../Entity'; export const Preview = ({ model }: { model: MlModel }): JSX.Element => { const entityRegistry = useEntityRegistry(); - const capitalPlatformName = capitalizeFirstLetter(model?.platform?.name || ''); return ( { platformInstanceId={model.dataPlatformInstance?.instanceId} type={entityRegistry.getEntityName(EntityType.Mlmodel)} typeIcon={entityRegistry.getIcon(EntityType.Mlmodel, 14, IconStyleType.ACCENT)} - platform={capitalPlatformName} + platform={model?.platform?.properties?.displayName || capitalizeFirstLetterOnly(model?.platform?.name)} qualifier={model.origin} tags={model.globalTags || undefined} owners={model?.ownership?.owners} diff --git a/datahub-web-react/src/app/entity/mlModelGroup/preview/Preview.tsx b/datahub-web-react/src/app/entity/mlModelGroup/preview/Preview.tsx index 6f99780f745ad..34fe07adc4667 100644 --- a/datahub-web-react/src/app/entity/mlModelGroup/preview/Preview.tsx +++ b/datahub-web-react/src/app/entity/mlModelGroup/preview/Preview.tsx @@ -1,13 +1,11 @@ import React from 'react'; import { EntityType, MlModelGroup } from '../../../../types.generated'; import DefaultPreviewCard from '../../../preview/DefaultPreviewCard'; -import { capitalizeFirstLetter } from '../../../shared/textUtil'; +import { capitalizeFirstLetterOnly } from '../../../shared/textUtil'; import { useEntityRegistry } from '../../../useEntityRegistry'; export const Preview = ({ group }: { group: MlModelGroup }): JSX.Element => { const entityRegistry = useEntityRegistry(); - const capitalPlatformName = capitalizeFirstLetter(group?.platform?.name || ''); - return ( { description={group?.description || ''} type="MLModel Group" logoUrl={group?.platform?.properties?.logoUrl || ''} - platform={capitalPlatformName} + platform={group?.platform?.properties?.displayName || capitalizeFirstLetterOnly(group?.platform?.name)} qualifier={group?.origin} owners={group?.ownership?.owners} /> diff --git a/datahub-web-react/src/app/entity/mlPrimaryKey/preview/Preview.tsx b/datahub-web-react/src/app/entity/mlPrimaryKey/preview/Preview.tsx index dd28ea0e11e78..51ba7b0cf1339 100644 --- a/datahub-web-react/src/app/entity/mlPrimaryKey/preview/Preview.tsx +++ b/datahub-web-react/src/app/entity/mlPrimaryKey/preview/Preview.tsx @@ -29,7 +29,9 @@ export const Preview = ({ name={name} urn={urn} description={description || ''} - platform={capitalizeFirstLetterOnly(platform?.properties?.displayName) || featureNamespace} + platform={ + platform?.properties?.displayName || capitalizeFirstLetterOnly(platform?.name) || featureNamespace + } logoUrl={platform?.properties?.logoUrl || ''} type="ML Primary Key" typeIcon={entityRegistry.getIcon(EntityType.MlprimaryKey, 14, IconStyleType.ACCENT)} diff --git a/datahub-web-react/src/app/entity/shared/components/styled/search/downloadAsCsvUtil.ts b/datahub-web-react/src/app/entity/shared/components/styled/search/downloadAsCsvUtil.ts index 23d6569de2138..9b3f4671abc79 100644 --- a/datahub-web-react/src/app/entity/shared/components/styled/search/downloadAsCsvUtil.ts +++ b/datahub-web-react/src/app/entity/shared/components/styled/search/downloadAsCsvUtil.ts @@ -1,4 +1,5 @@ import { CorpGroup, CorpUser, EntityType } from '../../../../../../types.generated'; +import { capitalizeFirstLetterOnly } from '../../../../../shared/textUtil'; import EntityRegistry from '../../../../EntityRegistry'; import { GenericEntityProperties } from '../../../types'; import { SearchResultInterface } from './types'; @@ -80,7 +81,7 @@ export const transformGenericEntityPropertiesToCsvRow = ( // domain properties?.domain?.domain?.properties?.name || '', // properties - properties?.platform?.properties?.displayName || '', + properties?.platform?.properties?.displayName || capitalizeFirstLetterOnly(properties?.platform?.name) || '', // container properties?.container?.properties?.name || '', // entity url diff --git a/datahub-web-react/src/app/entity/shared/containers/profile/header/EntityHeader.tsx b/datahub-web-react/src/app/entity/shared/containers/profile/header/EntityHeader.tsx index 9a262df880f6c..d0ad5d5f2076e 100644 --- a/datahub-web-react/src/app/entity/shared/containers/profile/header/EntityHeader.tsx +++ b/datahub-web-react/src/app/entity/shared/containers/profile/header/EntityHeader.tsx @@ -1,6 +1,5 @@ import React from 'react'; import styled from 'styled-components/macro'; -import { capitalizeFirstLetterOnly } from '../../../../../shared/textUtil'; import { useEntityData, useRefetch } from '../../../EntityContext'; import { EntityHealthStatus } from './EntityHealthStatus'; import EntityDropdown, { EntityMenuItems } from '../../../EntityDropdown/EntityDropdown'; @@ -16,6 +15,7 @@ import { EntitySubHeaderSection, GenericEntityProperties } from '../../../types' import EntityActions, { EntityActionItem } from '../../../entity/EntityActions'; import ExternalUrlButton from '../../../ExternalUrlButton'; import ShareButton from '../../../../../shared/share/ShareButton'; +import { capitalizeFirstLetterOnly } from '../../../../../shared/textUtil'; const TitleWrapper = styled.div` display: flex; @@ -89,15 +89,13 @@ export const EntityHeader = ({ const { urn, entityType, entityData } = useEntityData(); const refetch = useRefetch(); const me = useGetAuthenticatedUser(); - const basePlatformName = getPlatformName(entityData); - const platformName = capitalizeFirstLetterOnly(basePlatformName); + const platformName = getPlatformName(entityData); const externalUrl = entityData?.externalUrl || undefined; const entityCount = entityData?.entityCount; const isCompact = React.useContext(CompactContext); const entityName = entityData?.name; - const subType = - (entityData?.subTypes?.typeNames?.length || 0) > 0 ? entityData?.subTypes?.typeNames![0] : undefined; + const subType = capitalizeFirstLetterOnly(entityData?.subTypes?.typeNames?.[0]) || undefined; const canEditName = isNameEditable && getCanEditName(entityType, entityData, me?.platformPrivileges as PlatformPrivileges); diff --git a/datahub-web-react/src/app/entity/shared/containers/profile/header/PlatformContent/PlatformContentContainer.tsx b/datahub-web-react/src/app/entity/shared/containers/profile/header/PlatformContent/PlatformContentContainer.tsx index a53c5a65d1a6a..5e87f093c3778 100644 --- a/datahub-web-react/src/app/entity/shared/containers/profile/header/PlatformContent/PlatformContentContainer.tsx +++ b/datahub-web-react/src/app/entity/shared/containers/profile/header/PlatformContent/PlatformContentContainer.tsx @@ -15,19 +15,18 @@ export function getDisplayedEntityType( entityRegistry: EntityRegistry, entityType: EntityType, ) { - const entityTypeCased = - (entityData?.subTypes?.typeNames?.length && capitalizeFirstLetterOnly(entityData?.subTypes.typeNames[0])) || - entityRegistry.getEntityName(entityType); - return entityData?.entityTypeOverride || entityTypeCased || ''; + return ( + entityData?.entityTypeOverride || + capitalizeFirstLetterOnly(entityData?.subTypes?.typeNames?.[0]) || + entityRegistry.getEntityName(entityType) || + '' + ); } function PlatformContentContainer() { const { entityType, entityData } = useEntityData(); const entityRegistry = useEntityRegistry(); - - const basePlatformName = getPlatformName(entityData); - const platformName = capitalizeFirstLetterOnly(basePlatformName); - + const platformName = getPlatformName(entityData); const platformLogoUrl = entityData?.platform?.properties?.logoUrl; const entityLogoComponent = entityRegistry.getIcon(entityType, 12, IconStyleType.ACCENT); const typeIcon = entityRegistry.getIcon(entityType, 12, IconStyleType.ACCENT); @@ -41,7 +40,7 @@ function PlatformContentContainer() { platformName={platformName} platformLogoUrl={platformLogoUrl} platformNames={entityData?.siblingPlatforms?.map( - (platform) => platform.properties?.displayName || platform.name, + (platform) => platform.properties?.displayName || capitalizeFirstLetterOnly(platform.name), )} platformLogoUrls={entityData?.siblingPlatforms?.map((platform) => platform.properties?.logoUrl)} entityLogoComponent={entityLogoComponent} diff --git a/datahub-web-react/src/app/entity/shared/containers/profile/header/PlatformContent/PlatformContentView.tsx b/datahub-web-react/src/app/entity/shared/containers/profile/header/PlatformContent/PlatformContentView.tsx index 315db52b534b2..5605bacc1d4e4 100644 --- a/datahub-web-react/src/app/entity/shared/containers/profile/header/PlatformContent/PlatformContentView.tsx +++ b/datahub-web-react/src/app/entity/shared/containers/profile/header/PlatformContent/PlatformContentView.tsx @@ -5,7 +5,6 @@ import { Maybe } from 'graphql/jsutils/Maybe'; import { Container, GlossaryNode } from '../../../../../../../types.generated'; import { ANTD_GRAY } from '../../../../constants'; import ContainerLink from './ContainerLink'; -import { capitalizeFirstLetterOnly } from '../../../../../../shared/textUtil'; import ParentNodesView, { StyledRightOutlined, ParentNodesWrapper as ParentContainersWrapper, @@ -102,7 +101,7 @@ function PlatformContentView(props: Props) { return ( {typeIcon && {typeIcon}} - {capitalizeFirstLetterOnly(entityType)} + {entityType} {(!!platformName || !!instanceId || !!parentContainers?.length || !!parentNodes?.length) && ( )} diff --git a/datahub-web-react/src/app/entity/shared/tabs/Dataset/Validations/DatasetAssertionsList.tsx b/datahub-web-react/src/app/entity/shared/tabs/Dataset/Validations/DatasetAssertionsList.tsx index 13dcfd34b8219..b0216eec3408e 100644 --- a/datahub-web-react/src/app/entity/shared/tabs/Dataset/Validations/DatasetAssertionsList.tsx +++ b/datahub-web-react/src/app/entity/shared/tabs/Dataset/Validations/DatasetAssertionsList.tsx @@ -8,6 +8,7 @@ import { DatasetAssertionDetails } from './DatasetAssertionDetails'; import { Assertion, AssertionRunStatus } from '../../../../../../types.generated'; import { getResultColor, getResultIcon, getResultText } from './assertionUtils'; import { useDeleteAssertionMutation } from '../../../../../../graphql/assertion.generated'; +import { capitalizeFirstLetterOnly } from '../../../../../shared/textUtil'; const ResultContainer = styled.div` display: flex; @@ -116,7 +117,11 @@ export const DatasetAssertionsList = ({ assertions, onDelete }: Props) => { key: '', render: (_, record: any) => ( - + {(record.platform.properties?.logoUrl && ( { width={20} src={record.platform.properties?.logoUrl} /> - )) || {record.platform.properties?.displayName}} + )) || ( + + {record.platform.properties?.displayName || + capitalizeFirstLetterOnly(record.platform.name)} + + )}