diff --git a/assets/js/state/actions/auth.js b/assets/js/state/actions/auth.js deleted file mode 100644 index 32aa2a50bd..0000000000 --- a/assets/js/state/actions/auth.js +++ /dev/null @@ -1,6 +0,0 @@ -export const PERFORM_LOGIN = 'PERFORM_LOGIN'; - -export const performLogin = ({ username, password }) => ({ - type: PERFORM_LOGIN, - payload: { username, password }, -}); diff --git a/assets/js/state/actions/catalog.js b/assets/js/state/actions/catalog.js deleted file mode 100644 index 901f54487a..0000000000 --- a/assets/js/state/actions/catalog.js +++ /dev/null @@ -1,6 +0,0 @@ -export const UPDATE_CATALOG = 'UPDATE_CATALOG'; - -export const updateCatalog = (env = {}) => ({ - type: UPDATE_CATALOG, - payload: env, -}); diff --git a/assets/js/state/actions/cluster.js b/assets/js/state/actions/cluster.js deleted file mode 100644 index 488c7b6ada..0000000000 --- a/assets/js/state/actions/cluster.js +++ /dev/null @@ -1,6 +0,0 @@ -export const CHECKS_SELECTED = 'CHECKS_SELECTED'; - -export const checksSelected = (selectedChecks, clusterID) => ({ - type: CHECKS_SELECTED, - payload: { checks: selectedChecks, clusterID }, -}); diff --git a/assets/js/state/actions/lastExecutions.js b/assets/js/state/actions/lastExecutions.js deleted file mode 100644 index 597a570e9e..0000000000 --- a/assets/js/state/actions/lastExecutions.js +++ /dev/null @@ -1,12 +0,0 @@ -export const UPDATE_LAST_EXECUTION = 'UPDATE_LAST_EXECUTION'; -export const EXECUTION_REQUESTED = 'EXECUTION_REQUESTED'; - -export const updateLastExecution = (groupID) => ({ - type: UPDATE_LAST_EXECUTION, - payload: { groupID }, -}); - -export const executionRequested = (clusterID, hosts, checks, navigate) => ({ - type: EXECUTION_REQUESTED, - payload: { clusterID, hosts, checks, navigate }, -}); diff --git a/assets/js/state/catalog.js b/assets/js/state/catalog.js index 3594a8cebb..96d001f6d9 100644 --- a/assets/js/state/catalog.js +++ b/assets/js/state/catalog.js @@ -26,6 +26,13 @@ export const catalogSlice = createSlice({ }, }); +export const UPDATE_CATALOG = 'UPDATE_CATALOG'; + +export const updateCatalog = (env = {}) => ({ + type: UPDATE_CATALOG, + payload: env, +}); + export const { setCatalogLoading, setCatalogData, setCatalogError } = catalogSlice.actions; diff --git a/assets/js/state/clusters.js b/assets/js/state/clusters.js index 31d9cf32ff..ec991e5f1d 100644 --- a/assets/js/state/clusters.js +++ b/assets/js/state/clusters.js @@ -98,6 +98,13 @@ export const clustersListSlice = createSlice({ }, }); +export const CHECKS_SELECTED = 'CHECKS_SELECTED'; + +export const checksSelected = (selectedChecks, clusterID) => ({ + type: CHECKS_SELECTED, + payload: { checks: selectedChecks, clusterID }, +}); + export const { setClusters, appendCluster, diff --git a/assets/js/state/lastExecutions.js b/assets/js/state/lastExecutions.js index 56a6f204a8..e33fafe414 100644 --- a/assets/js/state/lastExecutions.js +++ b/assets/js/state/lastExecutions.js @@ -81,6 +81,19 @@ export const lastExecutionsSlice = createSlice({ }, }); +export const UPDATE_LAST_EXECUTION = 'UPDATE_LAST_EXECUTION'; +export const EXECUTION_REQUESTED = 'EXECUTION_REQUESTED'; + +export const updateLastExecution = (groupID) => ({ + type: UPDATE_LAST_EXECUTION, + payload: { groupID }, +}); + +export const executionRequested = (clusterID, hosts, checks, navigate) => ({ + type: EXECUTION_REQUESTED, + payload: { clusterID, hosts, checks, navigate }, +}); + export const { setLastExecutionLoading, setLastExecution, diff --git a/assets/js/state/actions/notifications.js b/assets/js/state/notifications.js similarity index 100% rename from assets/js/state/actions/notifications.js rename to assets/js/state/notifications.js diff --git a/assets/js/state/user.js b/assets/js/state/user.js index 8da538f121..b5f78d8554 100644 --- a/assets/js/state/user.js +++ b/assets/js/state/user.js @@ -31,6 +31,13 @@ export const userSlice = createSlice({ }, }); +export const PERFORM_LOGIN = 'PERFORM_LOGIN'; + +export const performLogin = ({ username, password }) => ({ + type: PERFORM_LOGIN, + payload: { username, password }, +}); + export const { setUserAsLogged, setUser, setAuthError, setAuthInProgress } = userSlice.actions;