X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/89a2555cc00f750dfa07dc57a2908059fc52c935..7f697d536ed03c19844677e027bbab17e9b5e5f6:/src/views/project-panel/project-panel.tsx

diff --git a/src/views/project-panel/project-panel.tsx b/src/views/project-panel/project-panel.tsx
index a5594d8e..465178e7 100644
--- a/src/views/project-panel/project-panel.tsx
+++ b/src/views/project-panel/project-panel.tsx
@@ -17,9 +17,18 @@ import { SortDirection } from 'components/data-table/data-column';
 import { ResourceKind, Resource } from 'models/resource';
 import {
     ResourceFileSize,
+    ResourceFileCount,
+    ResourceCreatedAtDate,
     ResourceLastModifiedDate,
+    ResourceTrashDate,
+    ResourceDeleteDate,
     ProcessStatus,
     ResourceType,
+    ResourceUUID,
+    ResourceProcessState,
+    ResourcePortableDataHash,
+    ResourceVersion,
+    ResourceDescription,
     ResourceOwnerWithName
 } from 'views-components/data-explorer/renderers';
 import { ProjectIcon } from 'components/icon/icon';
@@ -36,7 +45,6 @@ import {
 import { navigateTo } from 'store/navigation/navigation-action';
 import { getProperty } from 'store/properties/properties';
 import { PROJECT_PANEL_CURRENT_UUID } from 'store/project-panel/project-panel-action';
-import { DataTableDefaultView } from 'components/data-table-default-view/data-table-default-view';
 import { ArvadosTheme } from "common/custom-theme";
 import { createTree } from 'models/tree';
 import {
@@ -46,6 +54,7 @@ import {
 import { GroupContentsResource } from 'services/groups-service/groups-service';
 import { GroupClass, GroupResource } from 'models/group';
 import { CollectionResource } from 'models/collection';
+import { resourceIsFrozen } from 'common/frozen-resources';
 
 type CssRules = 'root' | "button";
 
@@ -64,7 +73,16 @@ export enum ProjectPanelColumnNames {
     TYPE = "Type",
     OWNER = "Owner",
     FILE_SIZE = "File size",
-    LAST_MODIFIED = "Last modified"
+    FILE_COUNT = "File count",
+    UUID = "UUID",
+    STATE = 'State',
+    CREATED_AT = "Date created",
+    LAST_MODIFIED = "Last modified",
+    TRASH_AT = "Trash at",
+    DELETE_AT = "Delete at",
+    DESCRIPTION = "Description",
+    PORTABLE_DATA_HASH = "Portable Data Hash",
+    VERSION = "Version"
 }
 
 export interface ProjectPanelFilter extends DataTableFilterItem {
@@ -110,13 +128,79 @@ export const projectPanelColumns: DataColumns<string> = [
         render: uuid => <ResourceFileSize uuid={uuid} />
     },
     {
-        name: ProjectPanelColumnNames.LAST_MODIFIED,
+        name: ProjectPanelColumnNames.FILE_COUNT,
         selected: true,
         configurable: true,
+        filters: createTree(),
+        render: uuid =><ResourceFileCount uuid={uuid}/>
+    },
+    {
+        name: ProjectPanelColumnNames.UUID,
+        selected: true,
+        configurable: true,
+        filters: createTree(),
+        render: uuid => <ResourceUUID uuid={uuid}/>
+    },
+    {
+        name: ProjectPanelColumnNames.STATE,
+        selected: true,
+        configurable: true,
+        filters: createTree(),
+        render: uuid => <ResourceProcessState uuid={uuid}/>
+    },
+    {
+        name: ProjectPanelColumnNames.PORTABLE_DATA_HASH,
+        selected: true,
+        configurable: true,
+        filters: createTree(),
+        render: uuid => <ResourcePortableDataHash uuid={uuid}/>
+    },
+    {
+        name: ProjectPanelColumnNames.CREATED_AT,
+        selected: false,
+        configurable: true,
+        filters: createTree(),
+        render: uuid =><ResourceCreatedAtDate uuid={uuid}/>
+    },
+    {
+        name: ProjectPanelColumnNames.LAST_MODIFIED,
+        selected: false,
+        configurable: true,
         sortDirection: SortDirection.DESC,
         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: false,
+        configurable: true,
+        sortDirection: SortDirection.DESC,
+        filters: createTree(),
+        render: uuid => <ResourceDeleteDate uuid={uuid} />
+    },
+    {
+        name: ProjectPanelColumnNames.DESCRIPTION,
+        selected: true,
+        configurable: true,
+        filters: createTree(),
+        render: uuid =><ResourceDescription uuid={uuid}/>
+    },
+    {
+        name: ProjectPanelColumnNames.VERSION,
+        selected: false,
+        configurable: true,
+        filters: createTree(),
+        render: uuid =><ResourceVersion uuid={uuid}/>
     }
+    
 ];
 
 export const PROJECT_PANEL_ID = "projectPanel";
@@ -155,11 +239,9 @@ export const ProjectPanel = withStyles(styles)(
                         onRowDoubleClick={this.handleRowDoubleClick}
                         onContextMenu={this.handleContextMenu}
                         contextMenuColumn={true}
-                        dataTableDefaultView={
-                            <DataTableDefaultView
-                                icon={ProjectIcon}
-                                messages={DEFAULT_VIEW_MESSAGES} />
-                        } />
+                        defaultViewIcon={ProjectIcon}
+                        defaultViewMessages={DEFAULT_VIEW_MESSAGES}
+                    />
                 </div>;
             }
 
@@ -168,7 +250,7 @@ export const ProjectPanel = withStyles(styles)(
             }
 
             handleContextMenu = (event: React.MouseEvent<HTMLElement>, resourceUuid: string) => {
-                const { resources } = this.props;
+                const { resources, isAdmin } = this.props;
                 const resource = getResource<GroupContentsResource>(resourceUuid)(resources);
                 // When viewing the contents of a filter group, all contents should be treated as read only.
                 let readonly = false;
@@ -186,6 +268,8 @@ export const ProjectPanel = withStyles(styles)(
                         isTrashed: ('isTrashed' in resource) ? resource.isTrashed : false,
                         kind: resource.kind,
                         menuKind,
+                        isAdmin,
+                        isFrozen: resourceIsFrozen(resource, resources),
                         description: resource.description,
                         storageClassesDesired: (resource as CollectionResource).storageClassesDesired,
                         properties: ('properties' in resource) ? resource.properties : {},
