X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/090f4825bdd30925a10c6df1b9493df0c2e8f541..8c9cf2d12a513379d13db279b076314b292c037e:/src/views-components/data-explorer/renderers.tsx diff --git a/src/views-components/data-explorer/renderers.tsx b/src/views-components/data-explorer/renderers.tsx index 1be47be709..a4713c8dc2 100644 --- a/src/views-components/data-explorer/renderers.tsx +++ b/src/views-components/data-explorer/renderers.tsx @@ -210,9 +210,23 @@ export const ResourceLinkClass = connect( return resource || { linkClass: '' }; })(renderLinkClass); -const renderLinkTail = (dispatch: Dispatch, item: { uuid: string, tailUuid: string, tailKind: string }) => - dispatch(navigateTo(item.uuid))}> - {resourceLabel(item.tailKind)}: {item.tailUuid} +const renderLinkTail = (dispatch: Dispatch, item: { uuid: string, tailUuid: string, tailKind: string }) => { + const currentLabel = resourceLabel(item.tailKind); + const isUnknow = currentLabel === "Unknown"; + return (
+ { !isUnknow ? ( + renderLink(dispatch, item.tailUuid, currentLabel) + ) : ( + + {item.tailUuid} + + )} +
); +}; + +const renderLink = (dispatch: Dispatch, uuid: string, label: string) => + dispatch(navigateTo(uuid))}> + {label}: {uuid} ; export const ResourceLinkTail = connect( @@ -225,9 +239,7 @@ export const ResourceLinkTail = connect( renderLinkTail(props.dispatch, props.item)); const renderLinkHead = (dispatch: Dispatch, item: { uuid: string, headUuid: string, headKind: ResourceKind }) => - dispatch(navigateTo(item.uuid))}> - {resourceLabel(item.headKind)}: {item.headUuid} - ; + renderLink(dispatch, item.headUuid, resourceLabel(item.headKind)); export const ResourceLinkHead = connect( (state: RootState, props: { uuid: string }) => {