Skip to content

Commit

Permalink
Merge branch 'main' into cypress-aut-failure-part1
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaileshParmar11 authored Oct 25, 2023
2 parents 3ebcfad + 737d557 commit 470a28a
Show file tree
Hide file tree
Showing 11 changed files with 320 additions and 312 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ import {
getEntityName,
getEntityVoteStatus,
} from '../../../utils/EntityUtils';
import { serviceTypeLogo } from '../../../utils/ServiceUtils';
import serviceUtilClassBase from '../../../utils/ServiceUtilClassBase';
import { getTierTags } from '../../../utils/TableUtils';
import { showErrorToast } from '../../../utils/ToastUtils';
import {
Expand Down Expand Up @@ -140,7 +140,10 @@ export const DataAssetsHeader = ({
const icon = useMemo(
() =>
dataAsset?.serviceType ? (
<img className="h-9" src={serviceTypeLogo(dataAsset.serviceType)} />
<img
className="h-9"
src={serviceUtilClassBase.getServiceTypeLogo(dataAsset.serviceType)}
/>
) : null,
[dataAsset]
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import TitleBreadcrumb from '../../../components/common/title-breadcrumb/title-b
import EntityHeaderTitle from '../../../components/Entity/EntityHeaderTitle/EntityHeaderTitle.component';
import { EntityType } from '../../../enums/entity.enum';
import { getDataAssetsVersionHeaderInfo } from '../../../utils/DataAssetsVersionHeaderUtils';
import { serviceTypeLogo } from '../../../utils/ServiceUtils';
import serviceUtilClassBase from '../../../utils/ServiceUtilClassBase';
import { stringToHTML } from '../../../utils/StringsUtils';
import { EntitiesWithDomainField } from '../DataAssetsHeader/DataAssetsHeader.interface';
import { DataAssetsVersionHeaderProps } from './DataAssetsVersionHeader.interface';
Expand Down Expand Up @@ -88,6 +88,13 @@ function DataAssetsVersionHeader({
() => getDataAssetsVersionHeaderInfo(entityType, currentVersionData),
[entityType, currentVersionData]
);
const logo = useMemo(
() =>
serviceUtilClassBase.getServiceTypeLogo(
currentVersionData.serviceType ?? ''
),
[currentVersionData.serviceType]
);

return (
<Row className="p-x-lg" gutter={[8, 12]} justify="space-between">
Expand All @@ -102,10 +109,7 @@ function DataAssetsVersionHeader({
displayName={displayName}
icon={
currentVersionData.serviceType && (
<img
className="h-9"
src={serviceTypeLogo(currentVersionData.serviceType)}
/>
<img className="h-9" src={logo} />
)
}
name={currentVersionData?.name}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {
getEntityNodeIcon,
getSearchIndexFromNodeType,
} from '../../../utils/EntityLineageUtils';
import { serviceTypeLogo } from '../../../utils/ServiceUtils';
import serviceUtilClassBase from '../../../utils/ServiceUtilClassBase';
import { showErrorToast } from '../../../utils/ToastUtils';
import { ExploreSearchIndex } from '../../Explore/explore.interface';
import './node-suggestion.less';
Expand Down Expand Up @@ -139,7 +139,9 @@ const NodeSuggestions: FC<EntitySuggestionProps> = ({
alt={entity.serviceType}
className="m-r-xs"
height="16px"
src={serviceTypeLogo(entity.serviceType as string)}
src={serviceUtilClassBase.getServiceTypeLogo(
entity.serviceType as string
)}
width="16px"
/>
<div className="flex-1 text-left">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ import { getServiceByFQN, updateService } from '../../rest/serviceAPI';
import { getEntityMissingError } from '../../utils/CommonUtils';
import { getEntityName } from '../../utils/EntityUtils';
import { getPathByServiceFQN, getSettingPath } from '../../utils/RouterUtils';
import serviceUtilClassBase from '../../utils/ServiceUtilClassBase';
import {
getServiceRouteFromServiceType,
getServiceType,
serviceTypeLogo,
} from '../../utils/ServiceUtils';
import { showErrorToast } from '../../utils/ToastUtils';

Expand Down Expand Up @@ -103,7 +103,7 @@ function EditConnectionFormPage() {
},
{
name: getEntityName(response),
imgSrc: serviceTypeLogo(response.serviceType),
imgSrc: serviceUtilClassBase.getServiceTypeLogo(response.serviceType),
url: getPathByServiceFQN(serviceCategory, serviceFQN),
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ import { getEntityFeedLink, getTitleCase } from './EntityUtils';
import Fqn from './Fqn';
import { history } from './HistoryUtils';
import { getSearchIndexTabPath } from './SearchIndexUtils';
import { serviceTypeLogo } from './ServiceUtils';
import serviceUtilClassBase from './ServiceUtilClassBase';
import { getEncodedFqn } from './StringsUtils';
import { TASK_ENTITIES } from './TasksUtils';
import { showErrorToast } from './ToastUtils';
Expand Down Expand Up @@ -379,7 +379,7 @@ export const getServiceLogo = (
serviceType: string,
className = ''
): JSX.Element | null => {
const logo = serviceTypeLogo(serviceType);
const logo = serviceUtilClassBase.getServiceTypeLogo(serviceType);

if (!isNull(logo)) {
return <img alt="" className={className} src={logo} />;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@ import { Connection as MetadataConnection } from '../generated/entity/services/m
import { DataObj, ServicesType } from '../interface/service.interface';
import { Transi18next } from './CommonUtils';
import { getSettingPath, getSettingsPathWithFqn } from './RouterUtils';
import {
getServiceRouteFromServiceType,
serviceTypeLogo,
} from './ServiceUtils';
import serviceUtilClassBase from './ServiceUtilClassBase';
import { getServiceRouteFromServiceType } from './ServiceUtils';

export const getIngestionHeadingName = (
ingestionType: string,
Expand Down Expand Up @@ -114,7 +112,9 @@ export const getBreadCrumbsArray = (
{
name: serviceData?.name || '',
url: getServiceDetailsPath(serviceFQN, serviceCategory, 'ingestions'),
imgSrc: serviceTypeLogo(serviceData?.serviceType || ''),
imgSrc: serviceUtilClassBase.getServiceTypeLogo(
serviceData?.serviceType || ''
),
activeTitle: true,
},
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import {
import { EntityType, FqnPart } from '../enums/entity.enum';
import { SearchIndex } from '../enums/search.enum';
import { getPartialNameFromTableFQN } from './CommonUtils';
import { serviceTypeLogo } from './ServiceUtils';
import serviceUtilClassBase from './ServiceUtilClassBase';
import { escapeESReservedCharacters } from './StringsUtils';
import { getEntityLink } from './TableUtils';

Expand Down Expand Up @@ -200,7 +200,7 @@ export const getSuggestionElement = (
alt={serviceType}
className="m-r-sm"
height="16px"
src={serviceTypeLogo(serviceType)}
src={serviceUtilClassBase.getServiceTypeLogo(serviceType)}
width="16px"
/>
}
Expand Down
Loading

0 comments on commit 470a28a

Please sign in to comment.