feat(DataPlatform Logos): Adding server driven logos (#2165)
Co-authored-by: John Joyce <john@acryl.io>
@ -7,7 +7,7 @@ import {
|
||||
} from './graphql/search.generated';
|
||||
import { LoginDocument } from './graphql/auth.generated';
|
||||
import { GetUserDocument } from './graphql/user.generated';
|
||||
import { Dataset, EntityType } from './types.generated';
|
||||
import { Dataset, EntityType, PlatformType } from './types.generated';
|
||||
|
||||
const user1 = {
|
||||
username: 'sdas',
|
||||
@ -52,6 +52,11 @@ const dataset1 = {
|
||||
urn: 'urn:li:dataPlatform:hdfs',
|
||||
name: 'HDFS',
|
||||
type: EntityType.DataPlatform,
|
||||
info: {
|
||||
type: PlatformType.FileSystem,
|
||||
datasetNameDelimiter: '.',
|
||||
logoUrl: '',
|
||||
},
|
||||
},
|
||||
platformNativeType: 'TABLE',
|
||||
name: 'The Great Test Dataset',
|
||||
@ -114,6 +119,11 @@ const dataset2 = {
|
||||
platform: {
|
||||
urn: 'urn:li:dataPlatform:mysql',
|
||||
name: 'MySQL',
|
||||
info: {
|
||||
type: PlatformType.RelationalDb,
|
||||
datasetNameDelimiter: '.',
|
||||
logoUrl: '',
|
||||
},
|
||||
type: EntityType.DataPlatform,
|
||||
},
|
||||
platformNativeType: 'TABLE',
|
||||
@ -156,6 +166,11 @@ const dataset3 = {
|
||||
platform: {
|
||||
urn: 'urn:li:dataPlatform:kafka',
|
||||
name: 'Kafka',
|
||||
info: {
|
||||
type: PlatformType.MessageBroker,
|
||||
datasetNameDelimiter: '.',
|
||||
logoUrl: '',
|
||||
},
|
||||
type: EntityType.DataPlatform,
|
||||
},
|
||||
platformNativeType: 'STREAM',
|
||||
|
||||
@ -1,23 +1,11 @@
|
||||
import lookerLogo from '../../../images/lookerlogo.png';
|
||||
import hdfsLogo from '../../../images/hadooplogo.png';
|
||||
import kafkaLogo from '../../../images/kafkalogo.png';
|
||||
import hiveLogo from '../../../images/hivelogo.png';
|
||||
|
||||
/**
|
||||
* TODO: This is a temporary solution, until the backend can push logos for all data platform types.
|
||||
*/
|
||||
export function getLogoFromPlatform(platform: string) {
|
||||
if (platform === 'Looker') {
|
||||
if (platform.toLowerCase() === 'looker') {
|
||||
return lookerLogo;
|
||||
}
|
||||
if (platform === 'hdfs') {
|
||||
return hdfsLogo;
|
||||
}
|
||||
if (platform === 'kafka') {
|
||||
return kafkaLogo;
|
||||
}
|
||||
if (platform === 'hive') {
|
||||
return hiveLogo;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@ -50,6 +50,7 @@ export class DatasetEntity implements Entity<Dataset> {
|
||||
origin={data.origin}
|
||||
description={data.description}
|
||||
platformName={data.platform.name}
|
||||
platformLogo={data.platform.info?.logoUrl}
|
||||
tags={data.tags}
|
||||
owners={data.ownership?.owners}
|
||||
/>
|
||||
|
||||
@ -2,7 +2,6 @@ import React from 'react';
|
||||
import { EntityType, FabricType, Owner } from '../../../../types.generated';
|
||||
import DefaultPreviewCard from '../../../preview/DefaultPreviewCard';
|
||||
import { useEntityRegistry } from '../../../useEntityRegistry';
|
||||
import { getLogoFromPlatform } from '../../chart/getLogoFromPlatform';
|
||||
|
||||
export const Preview = ({
|
||||
urn,
|
||||
@ -10,6 +9,7 @@ export const Preview = ({
|
||||
origin,
|
||||
description,
|
||||
platformName,
|
||||
platformLogo,
|
||||
tags,
|
||||
owners,
|
||||
}: {
|
||||
@ -18,18 +18,18 @@ export const Preview = ({
|
||||
origin: FabricType;
|
||||
description?: string | null;
|
||||
platformName: string;
|
||||
platformLogo?: string | null;
|
||||
tags: Array<string>;
|
||||
owners?: Array<Owner> | null;
|
||||
}): JSX.Element => {
|
||||
const entityRegistry = useEntityRegistry();
|
||||
|
||||
return (
|
||||
<DefaultPreviewCard
|
||||
url={`/${entityRegistry.getPathName(EntityType.Dataset)}/${urn}`}
|
||||
name={name || ''}
|
||||
description={description || ''}
|
||||
type="Dataset"
|
||||
logoUrl={getLogoFromPlatform(platformName) || ''}
|
||||
logoUrl={platformLogo || ''}
|
||||
platform={platformName}
|
||||
qualifier={origin}
|
||||
tags={tags}
|
||||
|
||||
@ -15,6 +15,9 @@ query getBrowseResults($input: BrowseInput!) {
|
||||
description
|
||||
platform {
|
||||
name
|
||||
info {
|
||||
logoUrl
|
||||
}
|
||||
}
|
||||
tags
|
||||
ownership {
|
||||
|
||||
@ -14,6 +14,9 @@ query getChart($urn: String!) {
|
||||
description
|
||||
platform {
|
||||
name
|
||||
info {
|
||||
logoUrl
|
||||
}
|
||||
}
|
||||
platformNativeType
|
||||
tags
|
||||
|
||||
@ -7,6 +7,9 @@ fragment nonRecursiveDatasetFields on Dataset {
|
||||
uri
|
||||
platform {
|
||||
name
|
||||
info {
|
||||
logoUrl
|
||||
}
|
||||
}
|
||||
platformNativeType
|
||||
tags
|
||||
|
||||
@ -20,6 +20,9 @@ query getSearchResults($input: SearchInput!) {
|
||||
uri
|
||||
platform {
|
||||
name
|
||||
info {
|
||||
logoUrl
|
||||
}
|
||||
}
|
||||
platformNativeType
|
||||
tags
|
||||
|
||||
BIN
datahub-web-react/src/images/adlslogo.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
datahub-web-react/src/images/couchbaselogo.png
Normal file
|
After Width: | Height: | Size: 58 KiB |
BIN
datahub-web-react/src/images/kustologo.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
datahub-web-react/src/images/mongodblogo.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
datahub-web-react/src/images/mssqllogo.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
datahub-web-react/src/images/oraclelogo.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
datahub-web-react/src/images/pinotlogo.png
Normal file
|
After Width: | Height: | Size: 122 KiB |
BIN
datahub-web-react/src/images/prestologo.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
datahub-web-react/src/images/redshiftlogo.png
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
datahub-web-react/src/images/snowflakelogo.png
Normal file
|
After Width: | Height: | Size: 40 KiB |
BIN
datahub-web-react/src/images/teradatalogo.png
Normal file
|
After Width: | Height: | Size: 91 KiB |
@ -3,13 +3,15 @@
|
||||
"datasetNameDelimiter": "/",
|
||||
"name": "adlsGen1",
|
||||
"displayName": "Azure Data Lake (Gen 1)",
|
||||
"type": "FILE_SYSTEM"
|
||||
"type": "FILE_SYSTEM",
|
||||
"logoUrl": "https://raw.githubusercontent.com/linkedin/datahub/master/datahub-web-react/src/images/adlslogo.png"
|
||||
},
|
||||
"urn:li:dataPlatform:adlsGen2": {
|
||||
"datasetNameDelimiter": "/",
|
||||
"name": "adlsGen2",
|
||||
"displayName": "Azure Data Lake (Gen 2)",
|
||||
"type": "FILE_SYSTEM"
|
||||
"type": "FILE_SYSTEM",
|
||||
"logoUrl": "https://raw.githubusercontent.com/linkedin/datahub/master/datahub-web-react/src/images/adlslogo.png"
|
||||
},
|
||||
"urn:li:dataPlatform:ambry": {
|
||||
"datasetNameDelimiter": ".",
|
||||
@ -21,7 +23,8 @@
|
||||
"datasetNameDelimiter": ".",
|
||||
"name": "couchbase",
|
||||
"displayName": "Couchbase",
|
||||
"type": "KEY_VALUE_STORE"
|
||||
"type": "KEY_VALUE_STORE",
|
||||
"logoUrl": "https://raw.githubusercontent.com/linkedin/datahub/master/datahub-web-react/src/images/couchbaselogo.png"
|
||||
},
|
||||
"urn:li:dataPlatform:external": {
|
||||
"datasetNameDelimiter": ".",
|
||||
@ -33,67 +36,78 @@
|
||||
"datasetNameDelimiter": "/",
|
||||
"name": "hdfs",
|
||||
"displayName": "HDFS",
|
||||
"type": "FILE_SYSTEM"
|
||||
"type": "FILE_SYSTEM",
|
||||
"logoUrl": "https://raw.githubusercontent.com/linkedin/datahub/master/datahub-web-react/src/images/hadooplogo.png"
|
||||
},
|
||||
"urn:li:dataPlatform:hive": {
|
||||
"datasetNameDelimiter": ".",
|
||||
"name": "hive",
|
||||
"displayName": "Hive",
|
||||
"type": "FILE_SYSTEM"
|
||||
"type": "FILE_SYSTEM",
|
||||
"logoUrl": "https://raw.githubusercontent.com/linkedin/datahub/master/datahub-web-react/src/images/hivelogo.png"
|
||||
},
|
||||
"urn:li:dataPlatform:kafka": {
|
||||
"datasetNameDelimiter": ".",
|
||||
"name": "kafka",
|
||||
"displayName": "Kafka",
|
||||
"type": "MESSAGE_BROKER"
|
||||
"type": "MESSAGE_BROKER",
|
||||
"logoUrl": "https://raw.githubusercontent.com/linkedin/datahub/master/datahub-web-react/src/images/kafkalogo.png"
|
||||
},
|
||||
"urn:li:dataPlatform:kusto": {
|
||||
"datasetNameDelimiter": ".",
|
||||
"name": "kusto",
|
||||
"displayName": "Kusto",
|
||||
"type": "OLAP_DATASTORE"
|
||||
"type": "OLAP_DATASTORE",
|
||||
"logoUrl": "https://raw.githubusercontent.com/linkedin/datahub/master/datahub-web-react/src/images/kustologo.png"
|
||||
},
|
||||
"urn:li:dataPlatform:mongo": {
|
||||
"datasetNameDelimiter": ".",
|
||||
"name": "mongo",
|
||||
"displayName": "MongoDB",
|
||||
"type": "KEY_VALUE_STORE"
|
||||
"type": "KEY_VALUE_STORE",
|
||||
"logoUrl": "https://raw.githubusercontent.com/linkedin/datahub/master/datahub-web-react/src/images/mongodblogo.png"
|
||||
},
|
||||
"urn:li:dataPlatform:mysql": {
|
||||
"datasetNameDelimiter": ".",
|
||||
"name": "mysql",
|
||||
"displayName": "MySQL",
|
||||
"type": "RELATIONAL_DB"
|
||||
"type": "RELATIONAL_DB",
|
||||
"logoUrl": "https://raw.githubusercontent.com/linkedin/datahub/master/datahub-web-react/src/images/mysqllogo.png"
|
||||
},
|
||||
"urn:li:dataPlatform:oracle": {
|
||||
"datasetNameDelimiter": ".",
|
||||
"name": "oracle",
|
||||
"displayName": "Oracle",
|
||||
"type": "RELATIONAL_DB"
|
||||
"type": "RELATIONAL_DB",
|
||||
"logoUrl": "https://raw.githubusercontent.com/linkedin/datahub/master/datahub-web-react/src/images/oraclelogo.png"
|
||||
},
|
||||
"urn:li:dataPlatform:pinot": {
|
||||
"datasetNameDelimiter": ".",
|
||||
"name": "pinot",
|
||||
"displayName": "Pinot",
|
||||
"type": "OLAP_DATASTORE"
|
||||
"type": "OLAP_DATASTORE",
|
||||
"logoUrl": "https://raw.githubusercontent.com/linkedin/datahub/master/datahub-web-react/src/images/pinotlogo.png"
|
||||
},
|
||||
"urn:li:dataPlatform:postgres": {
|
||||
"datasetNameDelimiter": ".",
|
||||
"name": "postgres",
|
||||
"displayName": "PostgreSQL",
|
||||
"type": "RELATIONAL_DB"
|
||||
"type": "RELATIONAL_DB",
|
||||
"logoUrl": "https://raw.githubusercontent.com/linkedin/datahub/master/datahub-web-react/src/images/postgreslogo.png"
|
||||
},
|
||||
"urn:li:dataPlatform:presto": {
|
||||
"datasetNameDelimiter": ".",
|
||||
"name": "presto",
|
||||
"displayName": "Presto",
|
||||
"type": "QUERY_ENGINE"
|
||||
"type": "QUERY_ENGINE",
|
||||
"logoUrl": "https://raw.githubusercontent.com/linkedin/datahub/master/datahub-web-react/src/images/prestologo.png"
|
||||
},
|
||||
"urn:li:dataPlatform:teradata": {
|
||||
"datasetNameDelimiter": ".",
|
||||
"name": "teradata",
|
||||
"displayName": "Teradata",
|
||||
"type": "RELATIONAL_DB"
|
||||
"type": "RELATIONAL_DB",
|
||||
"logoUrl": "https://raw.githubusercontent.com/linkedin/datahub/master/datahub-web-react/src/images/teradatalogo.png"
|
||||
},
|
||||
"urn:li:dataPlatform:voldemort": {
|
||||
"datasetNameDelimiter": ".",
|
||||
@ -105,19 +119,22 @@
|
||||
"datasetNameDelimiter": ".",
|
||||
"name": "snowflake",
|
||||
"displayName": "Snowflake",
|
||||
"type": "RELATIONAL_DB"
|
||||
"type": "RELATIONAL_DB",
|
||||
"logoUrl": "https://raw.githubusercontent.com/linkedin/datahub/master/datahub-web-react/src/images/snowflakelogo.png"
|
||||
},
|
||||
"urn:li:dataPlatform:redshift": {
|
||||
"datasetNameDelimiter": ".",
|
||||
"name": "redshift",
|
||||
"displayName": "Redshift",
|
||||
"type": "RELATIONAL_DB"
|
||||
"type": "RELATIONAL_DB",
|
||||
"logoUrl": "https://raw.githubusercontent.com/linkedin/datahub/master/datahub-web-react/src/images/redshiftlogo.png"
|
||||
},
|
||||
"urn:li:dataPlatform:mssql": {
|
||||
"datasetNameDelimiter": ".",
|
||||
"name": "mssql",
|
||||
"displayName": "SQL Server",
|
||||
"type": "RELATIONAL_DB"
|
||||
"type": "RELATIONAL_DB",
|
||||
"logoUrl": "https://raw.githubusercontent.com/linkedin/datahub/master/datahub-web-react/src/images/mssqllogo.png"
|
||||
},
|
||||
"urn:li:dataPlatform:bigquery": {
|
||||
"datasetNameDelimiter": ".",
|
||||
|
||||