swapped portable data hash and version columns/menu items Arvados-DCO-1.1-Signed...
authorLisa Knox <lisaknox83@gmail.com>
Fri, 9 Dec 2022 15:40:23 +0000 (10:40 -0500)
committerLisa Knox <lisaknox83@gmail.com>
Fri, 9 Dec 2022 15:40:23 +0000 (10:40 -0500)
src/views-components/data-explorer/renderers.tsx
src/views/project-panel/project-panel.tsx

index 7390a6e267b26235801088e517ce94eafacf36e6..a309d1db4c3e569edad49020c2b0e103664e339c 100644 (file)
@@ -454,7 +454,7 @@ export const ResourceCluster = (props: { uuid: string }) => {
 
 // Links Resources
 const renderLinkName = (item: { name: string }) =>
-    <Typography noWrap>{item.name || '(none)'}</Typography>;
+    <Typography noWrap>{item.name || '-'}</Typography>;
 
 export const ResourceLinkName = connect(
     (state: RootState, props: { uuid: string }) => {
@@ -788,6 +788,16 @@ export const ResourceUUID = connect(
         const resource = getResource<CollectionResource>(props.uuid)(state.resources);
         return { uuid: resource ? resource.uuid : '' };
     })((props: { uuid: string }) => renderUuid({uuid: props.uuid}));
+
+const renderVersion = (version: number) =>{
+    return <Typography>{version ?? '-'}</Typography>
+}
+
+export const ResourceVersion = connect(
+    (state: RootState, props: { uuid: string }) => {
+        const resource = getResource<CollectionResource>(props.uuid)(state.resources);
+        return { version: resource ? resource.version: '' };
+    })((props: { version: number }) => renderVersion(props.version));
     
 const renderPortableDataHash = (portableDataHash:string | null) => 
     <Typography noWrap>
@@ -801,15 +811,6 @@ export const ResourcePortableDataHash = connect(
         return { portableDataHash: resource ? resource.portableDataHash : '' };    
     })((props: { portableDataHash: string }) => renderPortableDataHash(props.portableDataHash));
 
-const renderVersion = (version: number) =>{
-    return <Typography>{version ?? '-'}</Typography>
-}
-
-export const ResourceVersion = connect(
-    (state: RootState, props: { uuid: string }) => {
-        const resource = getResource<CollectionResource>(props.uuid)(state.resources);
-        return { version: resource ? resource.version: '' };
-    })((props: { version: number }) => renderVersion(props.version));
 
 const renderFileCount = (fileCount: number) =>{
     return <Typography>{fileCount ?? '-'}</Typography>
index dcf6c40cbf5fcabcc3d9566a21342af148165ce1..689456118653f64991563cdf0950f5c86dc2c1f9 100644 (file)
@@ -20,7 +20,7 @@ import {
     ProcessStatus as ResourceStatus,
     ResourceType,
     ResourceOwnerWithName,
-    ResourceVersion,
+    ResourcePortableDataHash,
     ResourceFileSize,
     ResourceFileCount,
     ResourceUUID,
@@ -29,7 +29,7 @@ import {
     ResourceLogUuid,
     ResourceParentProcess,
     ResourceModifiedByUserUuid,
-    ResourcePortableDataHash,
+    ResourceVersion,
     ResourceCreatedAtDate,
     ResourceLastModifiedDate,
     ResourceTrashDate,
@@ -75,18 +75,18 @@ export enum ProjectPanelColumnNames {
     STATUS = "Status",
     TYPE = "Type",
     OWNER = "Owner",
-    VERSION = "Version",
-    FILE_SIZE = "File size",
-    FILE_COUNT = "File count",
+    PORTABLE_DATA_HASH = "Portable Data Hash",
+    FILE_SIZE = "File Size",
+    FILE_COUNT = "File Count",
     UUID = "UUID",
     CONTAINER_UUID = "Container UUID",
     OUTPUT_UUID = "Output UUID",
     LOG_UUID = "Log UUID",
-    PARENT_PROCESS = 'Parent process UUID',
+    PARENT_PROCESS = 'Parent Process UUID',
     MODIFIED_BY_USER_UUID = 'Modified by User UUID',
-    PORTABLE_DATA_HASH = "Portable data hash",
-    CREATED_AT = "Date created",
-    LAST_MODIFIED = "Last modified",
+    VERSION = "Version",
+    CREATED_AT = "Date Created",
+    LAST_MODIFIED = "Last Modified",
     TRASH_AT = "Trash at",
     DELETE_AT = "Delete at",
 }
@@ -127,11 +127,11 @@ export const projectPanelColumns: DataColumns<string> = [
         render: uuid => <ResourceOwnerWithName uuid={uuid} />
     },
     {
-        name: ProjectPanelColumnNames.VERSION,
+        name: ProjectPanelColumnNames.PORTABLE_DATA_HASH,
         selected: false,
         configurable: true,
         filters: createTree(),
-        render: uuid =><ResourceVersion uuid={uuid}/>
+        render: uuid => <ResourcePortableDataHash uuid={uuid}/>
     },
     {
         name: ProjectPanelColumnNames.FILE_SIZE,
@@ -190,11 +190,11 @@ export const projectPanelColumns: DataColumns<string> = [
         render: uuid => <ResourceModifiedByUserUuid uuid={uuid}/>
     },
     {
-        name: ProjectPanelColumnNames.PORTABLE_DATA_HASH,
+        name: ProjectPanelColumnNames.VERSION,
         selected: false,
         configurable: true,
         filters: createTree(),
-        render: uuid => <ResourcePortableDataHash uuid={uuid}/>
+        render: uuid =><ResourceVersion uuid={uuid}/>
     },
     {
         name: ProjectPanelColumnNames.CREATED_AT,