Source

reports/reports-menu-actions.js

const CHANGE_LOADING_STATE = 'reports/CHANGE_LOADING_STATE';
const SET_CURRENT_TAB = 'reports/SET_CURRENT_TAB';
const SELECT_TAB = 'reports/SELECT_TAB';

const tabTypes = {
    CONTROL_TASKS: 'Control Tasks',
    DASHBOARD: 'Dashboard',
    DEPLOYMENTS: 'Deployments'
};

/**
 * @module reports
 */
export default {
    CHANGE_LOADING_STATE,
    /**
     *
     * @param id
     * @param loading
     * @property {string} type - CHANGE_LOADING_STATE
     */
    changeLoadingState: (id, loading) => ({id, loading, type: CHANGE_LOADING_STATE}),
    SELECT_TAB,
    /**
     *
     * @param id
     * @property {string} type - SELECT_TAB
     */
    selectTab: (id) => ({id, type: SELECT_TAB}),
    SET_CURRENT_TAB,
    /**
     *
     * @param id
     * @property {string} type - SET_CURRENT_TAB
     */
    setCurrentTab: (id) => ({id, type: SET_CURRENT_TAB}),
    tabTypes
};