Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Spike] Enforce a stronger directory structure in Redux state #1355

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions assets/js/state/actions/auth.js

This file was deleted.

6 changes: 0 additions & 6 deletions assets/js/state/actions/catalog.js

This file was deleted.

6 changes: 0 additions & 6 deletions assets/js/state/actions/cluster.js

This file was deleted.

12 changes: 0 additions & 12 deletions assets/js/state/actions/lastExecutions.js

This file was deleted.

7 changes: 7 additions & 0 deletions assets/js/state/catalog.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
7 changes: 7 additions & 0 deletions assets/js/state/clusters.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
13 changes: 13 additions & 0 deletions assets/js/state/lastExecutions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 7 additions & 0 deletions assets/js/state/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down