[arvados-workbench2] updated: 2.4.0-354-g4a201849

git repository hosting git at public.arvados.org
Mon Nov 28 20:57:29 UTC 2022


Summary of changes:
 src/views-components/data-explorer/renderers.tsx | 16 +++++++++++++---
 src/views/project-panel/project-panel.tsx        | 13 +++++++++++--
 2 files changed, 24 insertions(+), 5 deletions(-)

       via  4a20184914baf8e0457c63c7f0d10e0cb2f65f35 (commit)
      from  f8f6c21d5162f38e6e644a628b9caae6e1e23f88 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 4a20184914baf8e0457c63c7f0d10e0cb2f65f35
Author: Lisa Knox <lisaknox83 at gmail.com>
Date:   Mon Nov 28 15:54:50 2022 -0500

    version column up
    
    Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>

diff --git a/src/views-components/data-explorer/renderers.tsx b/src/views-components/data-explorer/renderers.tsx
index 9c0bccb0..c01e3918 100644
--- a/src/views-components/data-explorer/renderers.tsx
+++ b/src/views-components/data-explorer/renderers.tsx
@@ -738,16 +738,26 @@ const renderMetadata = (metadata:any) => {
 export const ResourceMetadata = connect(
     (state: RootState, props: { uuid: string }) => {
         const resource = getResource<CollectionResource>(props.uuid)(state.resources);
-        const metadata = resource && Object.keys(resource.properties).length ? {...resource.properties} : {}
+        const metadata = resource && Object.keys(resource.properties).length ? resource.properties : {}
         if(resource && resource.portableDataHash) metadata['Portable Data Hash'] = resource.portableDataHash
         return { properties: metadata };
     })((props: { properties: string }) => renderMetadata(props.properties));
-    
+
+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 renderDescription = (description: string)=>{
     const truncatedDescription = description ? description.slice(0, 18) + '...' : '-'
     return <Typography title={description}>{truncatedDescription}</Typography>;
 }
-    
+
 export const ResourceDescription = connect(
     (state: RootState, props: { uuid: string }) => {
         const resource = getResource<GroupContentsResource>(props.uuid)(state.resources);
diff --git a/src/views/project-panel/project-panel.tsx b/src/views/project-panel/project-panel.tsx
index ef9fdc9e..0ba61893 100644
--- a/src/views/project-panel/project-panel.tsx
+++ b/src/views/project-panel/project-panel.tsx
@@ -25,6 +25,7 @@ import {
     ResourceType,
     ResourceUUID,
     ResourceMetadata,
+    ResourceVersion,
     ResourceDescription,
     ResourceOwnerWithName
 } from 'views-components/data-explorer/renderers';
@@ -76,7 +77,8 @@ export enum ProjectPanelColumnNames {
     TRASH_AT = "Trash at",
     DELETE_AT = "Delete at",
     DESCRIPTION = "Description",
-    METADATA = "Metadata"
+    METADATA = "Metadata",
+    VERSION = "Version"
 }
 
 export interface ProjectPanelFilter extends DataTableFilterItem {
@@ -130,7 +132,7 @@ export const projectPanelColumns: DataColumns<string> = [
     },
     {
         name: ProjectPanelColumnNames.METADATA,
-        selected: true,
+        selected: false,
         configurable: true,
         filters: createTree(),
         render: uuid => <ResourceMetadata uuid={uuid}/>
@@ -172,6 +174,13 @@ export const projectPanelColumns: DataColumns<string> = [
         configurable: true,
         filters: createTree(),
         render: uuid =><ResourceDescription uuid={uuid}/>
+    },
+    {
+        name: ProjectPanelColumnNames.VERSION,
+        selected: false,
+        configurable: true,
+        filters: createTree(),
+        render: uuid =><ResourceVersion uuid={uuid}/>
     }
 ];
 

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list