X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/f8d794c588b0a252bb8956efe2051697bff0d617..80fdf9603c057f1e41915e7c8890c942d240b36e:/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 b881147666..2483c5166f 100644 --- a/src/views/project-panel/project-panel.tsx +++ b/src/views/project-panel/project-panel.tsx @@ -61,7 +61,7 @@ export const projectPanelColumns: DataColumns = [ name: ProjectPanelColumnNames.NAME, selected: true, configurable: true, - sortDirection: SortDirection.ASC, + sortDirection: SortDirection.NONE, filters: createTree(), render: uuid => }, @@ -97,7 +97,7 @@ export const projectPanelColumns: DataColumns = [ name: ProjectPanelColumnNames.LAST_MODIFIED, selected: true, configurable: true, - sortDirection: SortDirection.NONE, + sortDirection: SortDirection.DESC, filters: createTree(), render: uuid => } @@ -113,6 +113,7 @@ const DEFAUL_VIEW_MESSAGES = [ interface ProjectPanelDataProps { currentItemId: string; resources: ResourcesState; + isAdmin: boolean; } type ProjectPanelProps = ProjectPanelDataProps & DispatchProp @@ -121,7 +122,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 { render() { @@ -146,7 +148,7 @@ export const ProjectPanel = withStyles(styles)( } handleContextMenu = (event: React.MouseEvent, resourceUuid: string) => { - const menuKind = resourceKindToContextMenuKind(resourceUuid); + const menuKind = resourceKindToContextMenuKind(resourceUuid, this.props.isAdmin); const resource = getResource(resourceUuid)(this.props.resources); if (menuKind && resource) { this.props.dispatch(openContextMenu(event, {