From: Janicki Artur Date: Fri, 28 Sep 2018 07:37:34 +0000 (+0200) Subject: Merge branch 'master' into 14225-prepare-structure-and-init-stepper X-Git-Tag: 1.3.0~72^2^2~6^2~1 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/00a61a4484185dc98daa92af5f189779cc10ad3c Merge branch 'master' into 14225-prepare-structure-and-init-stepper refs #14225 Arvados-DCO-1.1-Signed-off-by: Janicki Artur --- 00a61a4484185dc98daa92af5f189779cc10ad3c diff --cc src/routes/route-change-handlers.ts index 9b56a7fc,97613147..af3bdab4 --- a/src/routes/route-change-handlers.ts +++ b/src/routes/route-change-handlers.ts @@@ -4,10 -4,10 +4,10 @@@ import { History, Location } from 'history'; import { RootStore } from '~/store/store'; - import { matchProcessRoute, matchProcessLogRoute, matchProjectRoute, matchCollectionRoute, matchFavoritesRoute, matchTrashRoute, matchRootRoute, matchSharedWithMeRoute, matchRunProcessRoute } from './routes'; -import { matchProcessRoute, matchProcessLogRoute, matchProjectRoute, matchCollectionRoute, matchFavoritesRoute, matchTrashRoute, matchRootRoute, matchSharedWithMeRoute, matchWorkflowRoute } from './routes'; ++import { matchProcessRoute, matchProcessLogRoute, matchProjectRoute, matchCollectionRoute, matchFavoritesRoute, matchTrashRoute, matchRootRoute, matchSharedWithMeRoute, matchRunProcessRoute, matchWorkflowRoute } from './routes'; import { loadProject, loadCollection, loadFavorites, loadTrash, loadProcess, loadProcessLog } from '~/store/workbench/workbench-actions'; import { navigateToRootProject } from '~/store/navigation/navigation-action'; - import { loadSharedWithMe, loadRunProcess } from '../store/workbench/workbench-actions'; -import { loadSharedWithMe, loadWorkflow } from '~/store/workbench/workbench-actions'; ++import { loadSharedWithMe, loadRunProcess, loadWorkflow } from '../store/workbench/workbench-actions'; export const addRouteChangeHandlers = (history: History, store: RootStore) => { const handler = handleLocationChange(store); @@@ -24,7 -24,7 +24,8 @@@ const handleLocationChange = (store: Ro const processMatch = matchProcessRoute(pathname); const processLogMatch = matchProcessLogRoute(pathname); const sharedWithMeMatch = matchSharedWithMeRoute(pathname); + const runProcessMatch = matchRunProcessRoute(pathname); + const workflowMatch = matchWorkflowRoute(pathname); if (projectMatch) { store.dispatch(loadProject(projectMatch.params.id)); @@@ -42,7 -42,7 +43,9 @@@ store.dispatch(navigateToRootProject); } else if (sharedWithMeMatch) { store.dispatch(loadSharedWithMe); + } else if (runProcessMatch) { + store.dispatch(loadRunProcess); + } else if (workflowMatch) { + store.dispatch(loadWorkflow); } }; diff --cc src/routes/routes.ts index 4e8cf366,34b15e11..432cf750 --- a/src/routes/routes.ts +++ b/src/routes/routes.ts @@@ -17,7 -17,7 +17,8 @@@ export const Routes = TRASH: '/trash', PROCESS_LOGS: `/process-logs/:id(${RESOURCE_UUID_PATTERN})`, SHARED_WITH_ME: '/shared-with-me', - RUN_PROCESS: '/run-process' ++ RUN_PROCESS: '/run-process', + WORKFLOWS: '/workflows' }; export const getResourceUrl = (uuid: string) => { @@@ -66,5 -66,5 +67,8 @@@ export const matchProcessLogRoute = (ro export const matchSharedWithMeRoute = (route: string) => matchPath(route, { path: Routes.SHARED_WITH_ME }); +export const matchRunProcessRoute = (route: string) => - matchPath(route, { path: Routes.RUN_PROCESS }); ++ matchPath(route, { path: Routes.RUN_PROCESS }); ++ + export const matchWorkflowRoute = (route: string) => + matchPath(route, { path: Routes.WORKFLOWS }); diff --cc src/store/store.ts index 6fb0305c,16d0d055..21e5029a --- a/src/store/store.ts +++ b/src/store/store.ts @@@ -35,7 -35,8 +35,9 @@@ import { processPanelReducer } from '~/ 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'; +import { runProcessPanelReducer } from '~/store/run-process-panel/run-process-panel-reducer'; + import { WorkflowMiddlewareService } from './workflow-panel/workflow-middleware-service'; + import { WORKFLOW_PANEL_ID } from './workflow-panel/workflow-panel-actions'; const composeEnhancers = (process.env.NODE_ENV === 'development' && diff --cc src/store/workbench/workbench-actions.ts index a7614c4d,8f034ec0..2586fdc5 --- a/src/store/workbench/workbench-actions.ts +++ b/src/store/workbench/workbench-actions.ts @@@ -348,12 -350,11 +351,18 @@@ export const loadSharedWithMe = handleF await dispatch(setSidePanelBreadcrumbs(SidePanelTreeCategory.SHARED_WITH_ME)); }); +export const loadRunProcess = handleFirstTimeLoad( + async (dispatch: Dispatch) => { + dispatch(loadRunProcessPanel()); + } +); + + export const loadWorkflow = handleFirstTimeLoad(async (dispatch: Dispatch) => { + dispatch(activateSidePanelTreeItem(SidePanelTreeCategory.WORKFLOWS)); + await dispatch(loadWorkflowPanel()); + dispatch(setSidePanelBreadcrumbs(SidePanelTreeCategory.WORKFLOWS)); + }); ++ const finishLoadingProject = (project: GroupContentsResource | string) => async (dispatch: Dispatch) => { const uuid = typeof project === 'string' ? project : project.uuid; diff --cc src/views/workbench/workbench.tsx index 3a68a710,776850ce..47e22541 --- a/src/views/workbench/workbench.tsx +++ b/src/views/workbench/workbench.tsx @@@ -33,13 -33,13 +33,14 @@@ import { MoveProjectDialog } from '~/vi import { MoveCollectionDialog } from '~/views-components/dialog-forms/move-collection-dialog'; import { FilesUploadCollectionDialog } from '~/views-components/dialog-forms/files-upload-collection-dialog'; import { PartialCopyCollectionDialog } from '~/views-components/dialog-forms/partial-copy-collection-dialog'; -import { TrashPanel } from "~/views/trash-panel/trash-panel"; +import { ProcessCommandDialog } from '~/views-components/process-command-dialog/process-command-dialog'; import { MainContentBar } from '~/views-components/main-content-bar/main-content-bar'; import { Grid } from '@material-ui/core'; -import { SharedWithMePanel } from '../shared-with-me-panel/shared-with-me-panel'; +import { TrashPanel } from "~/views/trash-panel/trash-panel"; +import { SharedWithMePanel } from '~/views/shared-with-me-panel/shared-with-me-panel'; +import { RunProcessPanel } from '~/views/run-process-panel/run-process-panel'; import SplitterLayout from 'react-splitter-layout'; -import { ProcessCommandDialog } from '~/views-components/process-command-dialog/process-command-dialog'; + import { WorkflowPanel } from '~/views/workflow-panel/workflow-panel'; type CssRules = 'root' | 'container' | 'splitter' | 'asidePanel' | 'contentWrapper' | 'content'; @@@ -95,7 -95,7 +96,8 @@@ export const WorkbenchPanel + +