From 48adcab305593e4e869c2f622b00a1f794d55c50 Mon Sep 17 00:00:00 2001 From: Lisa Knox Date: Wed, 23 Nov 2022 22:27:03 -0500 Subject: [PATCH] 19690: fixed UUID display Arvados-DCO-1.1-Signed-off-by: Lisa Knox --- .../data-explorer/renderers.tsx | 10 +++++++++- src/views/project-panel/project-panel.tsx | 20 ++++++++++++++----- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/src/views-components/data-explorer/renderers.tsx b/src/views-components/data-explorer/renderers.tsx index 0e7c0cd5..dc19ff65 100644 --- a/src/views-components/data-explorer/renderers.tsx +++ b/src/views-components/data-explorer/renderers.tsx @@ -723,6 +723,13 @@ export const ResourceOwnerName = connect( return { owner: ownerName ? ownerName!.name : resource!.ownerUuid }; })((props: { owner: string }) => renderOwner(props.owner)); +const renderUUID = (uuid:string) => {uuid} + +export const ResourceUUID = connect( + (state: RootState, props: { uuid: string }) => { + const resource = getResource(props.uuid)(state.resources); + return { uuid: resource ? resource.uuid : '' }; + })((props: { uuid: string }) => renderUUID(props.uuid)); const renderDescription = (description: string)=>{ const truncatedDescription = description ? description.slice(0, 18) + '...' : '-' @@ -733,8 +740,9 @@ export const ResourceDescription = connect( (state: RootState, props: { uuid: string }) => { const resource = getResource(props.uuid)(state.resources); //testing--------------- - const containerRequestDescription = "This is a description for a Container Request, also known as a 'Process'. I'm still not 100% sure why one term is used over the other in practice, but I'm new here so I expect it will become clear to me when it's appropriate. This long bit of text is for testing purposes. -LK" + const containerRequestDescription = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." if (resource && !resource.description && resource.kind === ResourceKind.PROCESS) resource.description = containerRequestDescription + //testing--------------- return { description: resource ? resource.description : '' }; })((props: { description: string }) => renderDescription(props.description)); diff --git a/src/views/project-panel/project-panel.tsx b/src/views/project-panel/project-panel.tsx index bf7ab85a..2958271e 100644 --- a/src/views/project-panel/project-panel.tsx +++ b/src/views/project-panel/project-panel.tsx @@ -19,9 +19,11 @@ import { ResourceFileSize, ResourceCreatedAtDate, ResourceLastModifiedDate, + ResourceTrashDate, ResourceDeleteDate, ProcessStatus, ResourceType, + ResourceUUID, ResourceDescription, ResourceOwnerWithName } from 'views-components/data-explorer/renderers'; @@ -70,7 +72,8 @@ export enum ProjectPanelColumnNames { UUID = "UUID", CREATED_AT = "Date created", LAST_MODIFIED = "Last modified", - DELETE_AT = "Delete At", + TRASH_AT = "Trash at", + DELETE_AT = "Delete at", DESCRIPTION = "Description" } @@ -116,17 +119,16 @@ export const projectPanelColumns: DataColumns = [ filters: createTree(), render: uuid => }, - { name: ProjectPanelColumnNames.UUID, selected: false, configurable: true, filters: createTree(), - render: uuid =><>{uuid} + render: uuid => }, { name: ProjectPanelColumnNames.CREATED_AT, - selected: false, + selected: true, configurable: true, filters: createTree(), render: uuid => @@ -139,9 +141,17 @@ export const projectPanelColumns: DataColumns = [ filters: createTree(), render: uuid => }, + { + name: ProjectPanelColumnNames.TRASH_AT, + selected: false, + configurable: true, + sortDirection: SortDirection.DESC, + filters: createTree(), + render: uuid => + }, { name: ProjectPanelColumnNames.DELETE_AT, - selected: true, + selected: false, configurable: true, sortDirection: SortDirection.DESC, filters: createTree(), -- 2.30.2