19690: fixed UUID display
authorLisa Knox <lisaknox83@gmail.com>
Thu, 24 Nov 2022 03:27:03 +0000 (22:27 -0500)
committerLisa Knox <lisaknox83@gmail.com>
Mon, 28 Nov 2022 16:45:43 +0000 (11:45 -0500)
Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox@curii.com>

src/views-components/data-explorer/renderers.tsx
src/views/project-panel/project-panel.tsx

index 0e7c0cd56ecf2ddb345bba50ef542ebfa946b384..dc19ff6565baee266e71cd71fbbc37a5c00d7117 100644 (file)
@@ -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) => <Typography>{uuid}</Typography>
+
+export const ResourceUUID = connect(
+    (state: RootState, props: { uuid: string }) => {
+        const resource = getResource<GroupContentsResource>(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<GroupContentsResource>(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));
 
index bf7ab85af973d6df0f07eeaf2f4ac9eb03802d3c..2958271ecbb0d0b71f83b580c815b492bd5aa472 100644 (file)
@@ -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<string> = [
         filters: createTree(),
         render: uuid => <ResourceFileSize uuid={uuid} />
     },
-    
     {
         name: ProjectPanelColumnNames.UUID,
         selected: false,
         configurable: true,
         filters: createTree(),
-        render: uuid =><>{uuid}</>
+        render: uuid => <ResourceUUID uuid={uuid}/>
     },
     {
         name: ProjectPanelColumnNames.CREATED_AT,
-        selected: false,
+        selected: true,
         configurable: true,
         filters: createTree(),
         render: uuid =><ResourceCreatedAtDate uuid={uuid}/>
@@ -139,9 +141,17 @@ export const projectPanelColumns: DataColumns<string> = [
         filters: createTree(),
         render: uuid => <ResourceLastModifiedDate uuid={uuid} />
     },
+    {
+        name: ProjectPanelColumnNames.TRASH_AT,
+        selected: false,
+        configurable: true,
+        sortDirection: SortDirection.DESC,
+        filters: createTree(),
+        render: uuid => <ResourceTrashDate uuid={uuid} />
+    },
     {
         name: ProjectPanelColumnNames.DELETE_AT,
-        selected: true,
+        selected: false,
         configurable: true,
         sortDirection: SortDirection.DESC,
         filters: createTree(),