[arvados-workbench2] updated: 2.4.0-355-g39abd280

git repository hosting git at public.arvados.org
Mon Nov 28 21:15:49 UTC 2022


Summary of changes:
 src/views-components/data-explorer/renderers.tsx | 11 +++++++++++
 src/views/project-panel/project-panel.tsx        | 10 ++++++++++
 2 files changed, 21 insertions(+)

       via  39abd28010044c94c47d4ad5fdf39a352eef6cff (commit)
      from  4a20184914baf8e0457c63c7f0d10e0cb2f65f35 (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 39abd28010044c94c47d4ad5fdf39a352eef6cff
Author: Lisa Knox <lisaknox83 at gmail.com>
Date:   Mon Nov 28 16:15:40 2022 -0500

    fileCount 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 c01e3918..1623f176 100644
--- a/src/views-components/data-explorer/renderers.tsx
+++ b/src/views-components/data-explorer/renderers.tsx
@@ -726,6 +726,7 @@ export const ResourceOwnerName = connect(
 export const ResourceUUID = connect(
     (state: RootState, props: { uuid: string }) => {
         const resource = getResource<CollectionResource>(props.uuid)(state.resources);
+        console.log('COLLECTION_RESOIRCE', resource)
         return { uuid: resource ? resource.uuid : '' };
     })((props: { uuid: string }) => renderUuid({uuid: props.uuid}));
 
@@ -758,6 +759,16 @@ const renderDescription = (description: string)=>{
     return <Typography title={description}>{truncatedDescription}</Typography>;
 }
 
+const renderFileCount = (fileCount: number) =>{
+    return <Typography>{fileCount ?? '-'}</Typography>
+}
+
+export const ResourceFileCount = connect(
+    (state: RootState, props: { uuid: string }) => {
+        const resource = getResource<CollectionResource>(props.uuid)(state.resources);
+        return { fileCount: resource ? resource.fileCount: '' };
+    })((props: { fileCount: number }) => renderFileCount(props.fileCount));
+
 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 0ba61893..4723e409 100644
--- a/src/views/project-panel/project-panel.tsx
+++ b/src/views/project-panel/project-panel.tsx
@@ -17,6 +17,7 @@ import { SortDirection } from 'components/data-table/data-column';
 import { ResourceKind, Resource } from 'models/resource';
 import {
     ResourceFileSize,
+    ResourceFileCount,
     ResourceCreatedAtDate,
     ResourceLastModifiedDate,
     ResourceTrashDate,
@@ -71,6 +72,7 @@ export enum ProjectPanelColumnNames {
     TYPE = "Type",
     OWNER = "Owner",
     FILE_SIZE = "File size",
+    FILE_COUNT = "File count",
     UUID = "UUID",
     CREATED_AT = "Date created",
     LAST_MODIFIED = "Last modified",
@@ -123,6 +125,13 @@ export const projectPanelColumns: DataColumns<string> = [
         filters: createTree(),
         render: uuid => <ResourceFileSize uuid={uuid} />
     },
+    {
+        name: ProjectPanelColumnNames.FILE_COUNT,
+        selected: true,
+        configurable: true,
+        filters: createTree(),
+        render: uuid =><ResourceFileCount uuid={uuid}/>
+    },
     {
         name: ProjectPanelColumnNames.UUID,
         selected: true,
@@ -182,6 +191,7 @@ export const projectPanelColumns: DataColumns<string> = [
         filters: createTree(),
         render: uuid =><ResourceVersion uuid={uuid}/>
     }
+    
 ];
 
 export const PROJECT_PANEL_ID = "projectPanel";

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list