diff --git a/web/src/components/datasets/DatasetInfo.tsx b/web/src/components/datasets/DatasetInfo.tsx index bfdcd435b9..ac717ee7f3 100644 --- a/web/src/components/datasets/DatasetInfo.tsx +++ b/web/src/components/datasets/DatasetInfo.tsx @@ -14,6 +14,9 @@ import MqJsonView from '../core/json-view/MqJsonView' import MqText from '../core/text/MqText' import React, { FunctionComponent, useEffect } from 'react' import RunStatus from '../jobs/RunStatus' +import { Chip } from '@mui/material' +import { createTheme } from '@mui/material/styles' +import { useTheme } from '@emotion/react' export interface DispatchProps { fetchJobFacets: typeof fetchJobFacets @@ -39,6 +42,22 @@ type DatasetInfoProps = { } & JobFacetsProps & DispatchProps +const formatColumnTags = (tags: string[]) => { + const theme = createTheme(useTheme()) + return ( + <> + {tags.map((tag, index) => ( + + ))} + + ) +} + const DatasetInfo: FunctionComponent = (props) => { const { datasetFields, facets, run, jobFacets, fetchJobFacets, resetFacets } = props const i18next = require('i18next') @@ -82,6 +101,11 @@ const DatasetInfo: FunctionComponent = (props) => { {i18next.t('dataset_info_columns.description')} + + + {i18next.t('dataset_info_columns.tags')} + + @@ -91,6 +115,7 @@ const DatasetInfo: FunctionComponent = (props) => { {field.name} {field.type} {field.description || 'no description'} + {formatColumnTags(field.tags)} ) })} diff --git a/web/src/i18n/config.ts b/web/src/i18n/config.ts index a2f7fd7f87..e934f3090f 100644 --- a/web/src/i18n/config.ts +++ b/web/src/i18n/config.ts @@ -118,7 +118,8 @@ i18next dataset_info_columns: { name: 'NAME', type: 'TYPE', - description: 'DESCRIPTION' + description: 'DESCRIPTION', + tags: 'TAGS' }, dataset_versions_columns: { version: 'VERSION', @@ -244,7 +245,8 @@ i18next dataset_info_columns: { name: 'NOM', type: 'TAPER', - description: 'DESCRIPTION' + description: 'DESCRIPTION', + tags: 'MOTS CLÉS' }, dataset_versions_columns: { version: 'VERSION', @@ -371,7 +373,8 @@ i18next dataset_info_columns: { name: 'NOMBRE', type: 'ESCRIBE', - description: 'DESCRIPCIÓN' + description: 'DESCRIPCIÓN', + tags: 'ETIQUETAS' }, dataset_versions_columns: { version: 'VERSIÓN', @@ -498,7 +501,8 @@ i18next dataset_info_columns: { name: 'NAZWA', type: 'RODZAJ', - description: 'OPIS' + description: 'OPIS', + tags: 'TAGI' }, dataset_versions_columns: { version: 'WERSJA',