X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/2b3f667039ba2e7efe0852d58ae2c62899b773f0..ba4eb6e921464fabcb9cdf47f23745f3001c25f3:/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 b8811476..1e26bc0d 100644
--- a/src/views/project-panel/project-panel.tsx
+++ b/src/views/project-panel/project-panel.tsx
@@ -28,7 +28,7 @@ import { PROJECT_PANEL_CURRENT_UUID } from '~/store/project-panel/project-panel-
 import { DataTableDefaultView } from '~/components/data-table-default-view/data-table-default-view';
 import { ArvadosTheme } from "~/common/custom-theme";
 import { createTree } from '~/models/tree';
-import { getInitialResourceTypeFilters } from '~/store/resource-type-filters/resource-type-filters';
+import { getInitialResourceTypeFilters, getInitialProcessStatusFilters } from '~/store/resource-type-filters/resource-type-filters';
 
 type CssRules = 'root' | "button";
 
@@ -61,7 +61,7 @@ export const projectPanelColumns: DataColumns<string> = [
         name: ProjectPanelColumnNames.NAME,
         selected: true,
         configurable: true,
-        sortDirection: SortDirection.ASC,
+        sortDirection: SortDirection.NONE,
         filters: createTree(),
         render: uuid => <ResourceName uuid={uuid} />
     },
@@ -69,7 +69,8 @@ export const projectPanelColumns: DataColumns<string> = [
         name: "Status",
         selected: true,
         configurable: true,
-        filters: createTree(),
+        mutuallyExclusiveFilters: true,
+        filters: getInitialProcessStatusFilters(),
         render: uuid => <ProcessStatus uuid={uuid} />,
     },
     {
@@ -97,7 +98,7 @@ export const projectPanelColumns: DataColumns<string> = [
         name: ProjectPanelColumnNames.LAST_MODIFIED,
         selected: true,
         configurable: true,
-        sortDirection: SortDirection.NONE,
+        sortDirection: SortDirection.DESC,
         filters: createTree(),
         render: uuid => <ResourceLastModifiedDate uuid={uuid} />
     }
@@ -105,7 +106,7 @@ export const projectPanelColumns: DataColumns<string> = [
 
 export const PROJECT_PANEL_ID = "projectPanel";
 
-const DEFAUL_VIEW_MESSAGES = [
+const DEFAULT_VIEW_MESSAGES = [
     'Your project is empty.',
     'Please create a project or create a collection and upload a data.',
 ];
@@ -113,6 +114,7 @@ const DEFAUL_VIEW_MESSAGES = [
 interface ProjectPanelDataProps {
     currentItemId: string;
     resources: ResourcesState;
+    isAdmin: boolean;
 }
 
 type ProjectPanelProps = ProjectPanelDataProps & DispatchProp
@@ -121,7 +123,8 @@ type ProjectPanelProps = ProjectPanelDataProps & DispatchProp
 export const ProjectPanel = withStyles(styles)(
     connect((state: RootState) => ({
         currentItemId: getProperty(PROJECT_PANEL_CURRENT_UUID)(state.properties),
-        resources: state.resources
+        resources: state.resources,
+        isAdmin: state.auth.user!.isAdmin
     }))(
         class extends React.Component<ProjectPanelProps> {
             render() {
@@ -136,7 +139,7 @@ export const ProjectPanel = withStyles(styles)(
                         dataTableDefaultView={
                             <DataTableDefaultView
                                 icon={ProjectIcon}
-                                messages={DEFAUL_VIEW_MESSAGES} />
+                                messages={DEFAULT_VIEW_MESSAGES} />
                         } />
                 </div>;
             }
@@ -146,7 +149,7 @@ export const ProjectPanel = withStyles(styles)(
             }
 
             handleContextMenu = (event: React.MouseEvent<HTMLElement>, resourceUuid: string) => {
-                const menuKind = resourceKindToContextMenuKind(resourceUuid);
+                const menuKind = resourceKindToContextMenuKind(resourceUuid, this.props.isAdmin);
                 const resource = getResource<ProjectResource>(resourceUuid)(this.props.resources);
                 if (menuKind && resource) {
                     this.props.dispatch<any>(openContextMenu(event, {
