css changes
[arvados-workbench2.git] / src / store / process-panel / process-panel-actions.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { unionize, ofType, UnionOf } from "~/common/unionize";
6 import { loadProcess } from '~/store/processes/processes-actions';
7 import { Dispatch } from 'redux';
8
9 export const procesPanelActions = unionize({
10     INIT_PROCESS_PANEL_FILTERS: ofType<string[]>(),
11     TOGGLE_PROCESS_PANEL_FILTER: ofType<string>(),
12 });
13
14 export type ProcessPanelAction = UnionOf<typeof procesPanelActions>;
15
16 export const toggleProcessPanelFilter = procesPanelActions.TOGGLE_PROCESS_PANEL_FILTER;
17
18 export const loadProcessPanel = (uuid: string) =>
19     (dispatch: Dispatch) => {
20         dispatch<any>(loadProcess(uuid));
21         dispatch(initProcessPanelFilters);
22     };
23
24 export const initProcessPanelFilters = procesPanelActions.INIT_PROCESS_PANEL_FILTERS([
25     'Queued',
26     'Complete',
27     'Active',
28     'Failed'
29 ]);