X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/63b6ab236bbe65ffd9f57c64172a8950d4dc9826..17a3019e33d6d6820f50dabfa9d9ad7a4b02a4b8:/src/views/project-panel/project-panel.tsx?ds=sidebyside

diff --git a/src/views/project-panel/project-panel.tsx b/src/views/project-panel/project-panel.tsx
index bc5a170f..684fd448 100644
--- a/src/views/project-panel/project-panel.tsx
+++ b/src/views/project-panel/project-panel.tsx
@@ -18,19 +18,19 @@ import { ResourceKind, Resource } from 'models/resource';
 import {
     ResourceName,
     ProcessStatus as ResourceStatus,
-    ResourceProcessState,
     ResourceType,
     ResourceOwnerWithName,
-    ResourceVersion,
-    ResourceDescription,
+    ResourcePortableDataHash,
     ResourceFileSize,
     ResourceFileCount,
     ResourceUUID,
     ResourceContainerUuid,
+    ContainerRunTime,
     ResourceOutputUuid,
     ResourceLogUuid,
     ResourceParentProcess,
-    ResourcePortableDataHash,
+    ResourceModifiedByUserUuid,
+    ResourceVersion,
     ResourceCreatedAtDate,
     ResourceLastModifiedDate,
     ResourceTrashDate,
@@ -59,6 +59,7 @@ 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';
+import { ProjectResource } from 'models/project';
 
 type CssRules = 'root' | "button";
 
@@ -74,21 +75,21 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
 export enum ProjectPanelColumnNames {
     NAME = "Name",
     STATUS = "Status",
-    STATE = 'State',
     TYPE = "Type",
     OWNER = "Owner",
-    VERSION = "Version",
-    DESCRIPTION = "Description",
-    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",
+    RUNTIME = "Runtime",
     OUTPUT_UUID = "Output UUID",
     LOG_UUID = "Log UUID",
-    PARENT_PROCESS = 'Parent process UUID',
-    PORTABLE_DATA_HASH = "Portable data hash",
-    CREATED_AT = "Date created",
-    LAST_MODIFIED = "Last modified",
+    PARENT_PROCESS = 'Parent Process UUID',
+    MODIFIED_BY_USER_UUID = 'Modified by User UUID',
+    VERSION = "Version",
+    CREATED_AT = "Date Created",
+    LAST_MODIFIED = "Last Modified",
     TRASH_AT = "Trash at",
     DELETE_AT = "Delete at",
 }
@@ -97,12 +98,12 @@ export interface ProjectPanelFilter extends DataTableFilterItem {
     type: ResourceKind | ContainerRequestState;
 }
 
-export const projectPanelColumns: DataColumns<string> = [
+export const projectPanelColumns: DataColumns<string, ProjectResource> = [
     {
         name: ProjectPanelColumnNames.NAME,
         selected: true,
         configurable: true,
-        sortDirection: SortDirection.NONE,
+        sort: {direction: SortDirection.NONE, field: "name"},
         filters: createTree(),
         render: uuid => <ResourceName uuid={uuid} />
     },
@@ -114,13 +115,6 @@ export const projectPanelColumns: DataColumns<string> = [
         filters: getInitialProcessStatusFilters(),
         render: uuid => <ResourceStatus uuid={uuid} />,
     },
-    {
-        name: ProjectPanelColumnNames.STATE,
-        selected: false,
-        configurable: true,
-        filters: createTree(),
-        render: uuid => <ResourceProcessState uuid={uuid}/>
-    },
     {
         name: ProjectPanelColumnNames.TYPE,
         selected: true,
@@ -136,18 +130,11 @@ export const projectPanelColumns: DataColumns<string> = [
         render: uuid => <ResourceOwnerWithName uuid={uuid} />
     },
     {
-        name: ProjectPanelColumnNames.VERSION,
-        selected: false,
-        configurable: true,
-        filters: createTree(),
-        render: uuid =><ResourceVersion uuid={uuid}/>
-    },
-    {
-        name: ProjectPanelColumnNames.DESCRIPTION,
+        name: ProjectPanelColumnNames.PORTABLE_DATA_HASH,
         selected: false,
         configurable: true,
         filters: createTree(),
-        render: uuid =><ResourceDescription uuid={uuid}/>
+        render: uuid => <ResourcePortableDataHash uuid={uuid} />
     },
     {
         name: ProjectPanelColumnNames.FILE_SIZE,
@@ -161,63 +148,77 @@ export const projectPanelColumns: DataColumns<string> = [
         selected: false,
         configurable: true,
         filters: createTree(),
-        render: uuid =><ResourceFileCount uuid={uuid}/>
+        render: uuid => <ResourceFileCount uuid={uuid} />
     },
     {
         name: ProjectPanelColumnNames.UUID,
         selected: false,
         configurable: true,
         filters: createTree(),
-        render: uuid => <ResourceUUID uuid={uuid}/>
+        render: uuid => <ResourceUUID uuid={uuid} />
     },
     {
         name: ProjectPanelColumnNames.CONTAINER_UUID,
         selected: false,
         configurable: true,
         filters: createTree(),
-        render: uuid => <ResourceContainerUuid uuid={uuid}/>
+        render: uuid => <ResourceContainerUuid uuid={uuid} />
+    },
+    {
+        name: ProjectPanelColumnNames.RUNTIME,
+        selected: false,
+        configurable: true,
+        filters: createTree(),
+        render: uuid => <ContainerRunTime uuid={uuid} />
     },
     {
         name: ProjectPanelColumnNames.OUTPUT_UUID,
         selected: false,
         configurable: true,
         filters: createTree(),
-        render: uuid => <ResourceOutputUuid uuid={uuid}/>
+        render: uuid => <ResourceOutputUuid uuid={uuid} />
     },
     {
         name: ProjectPanelColumnNames.LOG_UUID,
         selected: false,
         configurable: true,
         filters: createTree(),
-        render: uuid => <ResourceLogUuid uuid={uuid}/>
+        render: uuid => <ResourceLogUuid uuid={uuid} />
     },
     {
         name: ProjectPanelColumnNames.PARENT_PROCESS,
         selected: false,
         configurable: true,
         filters: createTree(),
-        render: uuid => <ResourceParentProcess uuid={uuid}/>
+        render: uuid => <ResourceParentProcess uuid={uuid} />
     },
     {
-        name: ProjectPanelColumnNames.PORTABLE_DATA_HASH,
+        name: ProjectPanelColumnNames.MODIFIED_BY_USER_UUID,
         selected: false,
         configurable: true,
         filters: createTree(),
-        render: uuid => <ResourcePortableDataHash uuid={uuid}/>
+        render: uuid => <ResourceModifiedByUserUuid uuid={uuid} />
+    },
+    {
+        name: ProjectPanelColumnNames.VERSION,
+        selected: false,
+        configurable: true,
+        filters: createTree(),
+        render: uuid => <ResourceVersion uuid={uuid} />
     },
     {
         name: ProjectPanelColumnNames.CREATED_AT,
         selected: false,
         configurable: true,
-        sortDirection: SortDirection.DESC,
+        sort: {direction: SortDirection.NONE, field: "createdAt"},
         filters: createTree(),
-        render: uuid =><ResourceCreatedAtDate uuid={uuid}/>
+        render: uuid => <ResourceCreatedAtDate uuid={uuid} />
     },
     {
         name: ProjectPanelColumnNames.LAST_MODIFIED,
         selected: true,
         configurable: true,
-        sortDirection: SortDirection.DESC,
+        sort: {direction: SortDirection.DESC, field: "modifiedAt"},
         filters: createTree(),
         render: uuid => <ResourceLastModifiedDate uuid={uuid} />
     },
@@ -225,7 +226,7 @@ export const projectPanelColumns: DataColumns<string> = [
         name: ProjectPanelColumnNames.TRASH_AT,
         selected: false,
         configurable: true,
-        sortDirection: SortDirection.DESC,
+        sort: {direction: SortDirection.NONE, field: "trashAt"},
         filters: createTree(),
         render: uuid => <ResourceTrashDate uuid={uuid} />
     },
@@ -233,11 +234,11 @@ export const projectPanelColumns: DataColumns<string> = [
         name: ProjectPanelColumnNames.DELETE_AT,
         selected: false,
         configurable: true,
-        sortDirection: SortDirection.DESC,
+        sort: {direction: SortDirection.NONE, field: "deleteAt"},
         filters: createTree(),
         render: uuid => <ResourceDeleteDate uuid={uuid} />
     },
-    
+
 ];
 
 export const PROJECT_PANEL_ID = "projectPanel";
