[ARVADOS-WORKBENCH2] updated: 1.3.0-77-g91fc1bd
Git user
git at public.curoverse.com
Mon Dec 10 08:33:14 EST 2018
Summary of changes:
src/store/process-panel/process-panel-actions.ts | 15 +++++++++++++++
src/views/process-panel/process-panel.tsx | 5 ++---
2 files changed, 17 insertions(+), 3 deletions(-)
via 91fc1bd2a1df91b37755f3453e6e9693baa4ce64 (commit)
from 4f4f2feaf1ac31946a87290ba4eef3a6b5455f2d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 91fc1bd2a1df91b37755f3453e6e9693baa4ce64
Author: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
Date: Mon Dec 10 14:33:02 2018 +0100
added-snakcbar when output des not exists
Feature #14582
Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
diff --git a/src/store/process-panel/process-panel-actions.ts b/src/store/process-panel/process-panel-actions.ts
index 832d4d5..2aa914a 100644
--- a/src/store/process-panel/process-panel-actions.ts
+++ b/src/store/process-panel/process-panel-actions.ts
@@ -6,6 +6,11 @@ import { unionize, ofType, UnionOf } from "~/common/unionize";
import { loadProcess } from '~/store/processes/processes-actions';
import { Dispatch } from 'redux';
import { ProcessStatus } from '~/store/processes/process';
+import { RootState } from '~/store/store';
+import { ServiceRepository } from "~/services/services";
+import { navigateToCollection } from '~/store/navigation/navigation-action';
+import { snackbarActions } from '~/store/snackbar/snackbar-actions';
+import { SnackbarKind } from '../snackbar/snackbar-actions';
export const procesPanelActions = unionize({
SET_PROCESS_PANEL_FILTERS: ofType<string[]>(),
@@ -22,6 +27,16 @@ export const loadProcessPanel = (uuid: string) =>
dispatch(initProcessPanelFilters);
};
+export const navigateToOutput = (uuid: string) =>
+ async (dispatch: Dispatch<any>, getState: () => RootState, services: ServiceRepository) => {
+ try {
+ await services.collectionService.get(uuid);
+ dispatch<any>(navigateToCollection(uuid));
+ } catch {
+ dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'This collection does not exists!', hideDuration: 2000, kind: SnackbarKind.ERROR }));
+ }
+ };
+
export const initProcessPanelFilters = procesPanelActions.SET_PROCESS_PANEL_FILTERS([
ProcessStatus.QUEUED,
ProcessStatus.COMPLETED,
diff --git a/src/views/process-panel/process-panel.tsx b/src/views/process-panel/process-panel.tsx
index 87f60af..5672469 100644
--- a/src/views/process-panel/process-panel.tsx
+++ b/src/views/process-panel/process-panel.tsx
@@ -11,9 +11,8 @@ import { matchProcessRoute } from '~/routes/routes';
import { ProcessPanelRootDataProps, ProcessPanelRootActionProps, ProcessPanelRoot } from './process-panel-root';
import { ProcessPanel as ProcessPanelState} from '~/store/process-panel/process-panel';
import { groupBy } from 'lodash';
-import { toggleProcessPanelFilter } from '~/store/process-panel/process-panel-actions';
+import { toggleProcessPanelFilter, navigateToOutput } from '~/store/process-panel/process-panel-actions';
import { openProcessInputDialog } from '~/store/processes/process-input-actions';
-import { navigateToCollection } from '~/store/navigation/navigation-action';
const mapStateToProps = ({ router, resources, processPanel }: RootState): ProcessPanelRootDataProps => {
const pathname = router.location ? router.location.pathname : '';
@@ -36,7 +35,7 @@ const mapDispatchToProps = (dispatch: Dispatch): ProcessPanelRootActionProps =>
dispatch<any>(toggleProcessPanelFilter(status));
},
openProcessInputDialog: (uuid) => dispatch<any>(openProcessInputDialog(uuid)),
- navigateToOutput: (uuid) => dispatch<any>(navigateToCollection(uuid))
+ navigateToOutput: (uuid) => dispatch<any>(navigateToOutput(uuid))
});
export const ProcessPanel = connect(mapStateToProps, mapDispatchToProps)(ProcessPanelRoot);
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list