From: Daniel Kos Date: Tue, 18 Sep 2018 11:32:23 +0000 (+0200) Subject: refs #master Merge branch 'origin/master' into 14186-progress-indicator-store X-Git-Tag: 1.3.0~91^2 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/a2bf1ed3a15cf55e426c51ad8e6febd7ff2e3020 refs #master Merge branch 'origin/master' into 14186-progress-indicator-store # Conflicts: # src/services/groups-service/groups-service.ts # src/store/store.ts # src/views/project-panel/project-panel.tsx # src/views/workbench/workbench.tsx Arvados-DCO-1.1-Signed-off-by: Daniel Kos --- a2bf1ed3a15cf55e426c51ad8e6febd7ff2e3020 diff --cc src/common/custom-theme.ts index be8e77ff,3d56f78b..ff0eb5e3 --- a/src/common/custom-theme.ts +++ b/src/common/custom-theme.ts @@@ -26,12 -27,12 +27,10 @@@ interface Colors yellow700: string; red900: string; blue500: string; - grey500: string; - grey700: string; } - const red900 = red["900"]; + const arvadosPurple = '#361336'; const purple800 = purple["800"]; - const grey200 = grey["200"]; - const grey300 = grey["300"]; const grey500 = grey["500"]; const grey600 = grey["600"]; const grey700 = grey["700"]; diff --cc src/services/groups-service/groups-service.ts index c2b559b7,299e6808..e705b6e5 --- a/src/services/groups-service/groups-service.ts +++ b/src/services/groups-service/groups-service.ts @@@ -10,7 -10,7 +10,8 @@@ import { ProjectResource } from "~/mode import { ProcessResource } from "~/models/process"; import { TrashableResource } from "~/models/resource"; import { TrashableResourceService } from "~/services/common-service/trashable-resource-service"; -import { GroupResource } from '~/models/group'; +import { ApiActions } from "~/services/api/api-actions"; ++import { GroupResource } from "~/models/group"; export interface ContentsArguments { limit?: number; @@@ -26,10 -30,10 +31,10 @@@ export type GroupContentsResource ProjectResource | ProcessResource; - export class GroupsService extends TrashableResourceService { + export class GroupsService extends TrashableResourceService { - constructor(serverApi: AxiosInstance) { - super(serverApi, "groups"); + constructor(serverApi: AxiosInstance, actions: ApiActions) { + super(serverApi, "groups", actions); } contents(uuid: string, args: ContentsArguments = {}): Promise> { @@@ -39,14 -43,18 +44,22 @@@ filters: filters ? `[${filters}]` : undefined, order: order ? order : undefined }; - return this.serverApi - .get(this.resourceType + `${uuid}/contents`, { - params: CommonResourceService.mapKeys(_.snakeCase)(params) - }) - .then(CommonResourceService.mapResponseKeys); + return CommonResourceService.defaultResponse( + this.serverApi + .get(this.resourceType + `${uuid}/contents`, { + params: CommonResourceService.mapKeys(_.snakeCase)(params) + }), + this.actions + ); } + + shared(params: SharedArguments = {}): Promise> { - return this.serverApi - .get(this.resourceType + 'shared', { params }) - .then(CommonResourceService.mapResponseKeys); ++ return CommonResourceService.defaultResponse( ++ this.serverApi ++ .get(this.resourceType + 'shared', { params }), ++ this.actions ++ ); + } } export enum GroupContentsResourcePrefix { diff --cc src/store/store.ts index 205a21e1,43ab2310..012b7474 --- a/src/store/store.ts +++ b/src/store/store.ts @@@ -32,7 -32,8 +32,9 @@@ import { TrashPanelMiddlewareService } import { TRASH_PANEL_ID } from "~/store/trash-panel/trash-panel-action"; import { processLogsPanelReducer } from './process-logs-panel/process-logs-panel-reducer'; import { processPanelReducer } from '~/store/process-panel/process-panel-reducer'; + import { SHARED_WITH_ME_PANEL_ID } from '~/store/shared-with-me-panel/shared-with-me-panel-actions'; + import { SharedWithMeMiddlewareService } from './shared-with-me-panel/shared-with-me-middleware-service'; +import { progressIndicatorReducer } from './progress-indicator/progress-indicator-reducer'; const composeEnhancers = (process.env.NODE_ENV === 'development' && diff --cc src/views/project-panel/project-panel.tsx index 61f6766c,25579396..2b2be2e8 --- a/src/views/project-panel/project-panel.tsx +++ b/src/views/project-panel/project-panel.tsx @@@ -25,24 -23,9 +23,23 @@@ import { ProjectResource } from '~/mode 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 { openCollectionCreateDialog } from '~/store/collections/collection-create-actions'; - import { openProjectCreateDialog } from '~/store/projects/project-create-actions'; --import { filterResources } from '~/store/resources/resources'; --import { PanelDefaultView } from '~/components/panel-default-view/panel-default-view'; import { DataTableDefaultView } from '~/components/data-table-default-view/data-table-default-view'; ++import { StyleRulesCallback, WithStyles } from "@material-ui/core"; ++import { ArvadosTheme } from "~/common/custom-theme"; ++import withStyles from "@material-ui/core/styles/withStyles"; + +type CssRules = 'root' | "button"; + +const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ + root: { + position: 'relative', + width: '100%', + height: '100%' + }, + button: { + marginLeft: theme.spacing.unit + }, +}); export enum ProjectPanelColumnNames { NAME = "Name", diff --cc src/views/workbench/workbench.tsx index c22dde25,1d7d47d0..ad1a2668 --- a/src/views/workbench/workbench.tsx +++ b/src/views/workbench/workbench.tsx @@@ -41,21 -41,29 +41,31 @@@ import { FilesUploadCollectionDialog } import { PartialCopyCollectionDialog } from '~/views-components/dialog-forms/partial-copy-collection-dialog'; import { TrashPanel } from "~/views/trash-panel/trash-panel"; import { MainContentBar } from '~/views-components/main-content-bar/main-content-bar'; -import { Grid } from '@material-ui/core'; +import { Grid, LinearProgress } from '@material-ui/core'; + import { SharedWithMePanel } from '../shared-with-me-panel/shared-with-me-panel'; -import { ProcessCommandDialog } from '~/views-components/process-command-dialog/process-command-dialog'; + import SplitterLayout from 'react-splitter-layout'; +import { ProcessCommandDialog } from '~/views-components/process-command-dialog/process-command-dialog'; +import { isSystemWorking } from "~/store/progress-indicator/progress-indicator-reducer"; - type CssRules = 'root' | 'asidePanel' | 'contentWrapper' | 'content' | 'appBar'; + type CssRules = 'root' | 'container' | 'splitter' | 'asidePanel' | 'contentWrapper' | 'content' | 'appBar'; const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ root: { overflow: 'hidden', width: '100vw', - height: '100vh' + height: '100vh', + paddingTop: theme.spacing.unit * 8 }, + container: { + position: 'relative' + }, + splitter: { + '& > .layout-splitter': { + width: '2px' + } + }, asidePanel: { - maxWidth: '240px', + height: '100%', background: theme.palette.background.default }, contentWrapper: { @@@ -105,33 -110,39 +114,39 @@@ export const Workbench = withStyles(sty render() { const { classes } = this.props; return <> + + {this.props.working ? : null} + - - - {this.props.user && - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + +