1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { unionize, ofType, UnionOf } from "~/common/unionize";
6 import { loadProcess } from '~/store/processes/processes-actions';
7 import { Dispatch } from 'redux';
9 export const procesPanelActions = unionize({
10 INIT_PROCESS_PANEL_FILTERS: ofType<string[]>(),
11 TOGGLE_PROCESS_PANEL_FILTER: ofType<string>(),
14 export type ProcessPanelAction = UnionOf<typeof procesPanelActions>;
16 export const toggleProcessPanelFilter = procesPanelActions.TOGGLE_PROCESS_PANEL_FILTER;
18 export const loadProcessPanel = (uuid: string) =>
19 (dispatch: Dispatch) => {
20 dispatch<any>(loadProcess(uuid));
21 dispatch(initProcessPanelFilters);
24 export const initProcessPanelFilters = procesPanelActions.INIT_PROCESS_PANEL_FILTERS([