-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
Signed-off-by: Antonette Caldwell <[email protected]>
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { createSlice, PayloadAction } from '@reduxjs/toolkit'; | ||
import type { MesheryRootState } from '../store'; | ||
// State interface | ||
export interface AnonymousPerfResultsState { | ||
[key: string]: any; | ||
Check failure on line 5 in src/redux-toolkit/slices/anonymousPerfResultsSlice.ts GitHub Actions / lint (16)
Check failure on line 5 in src/redux-toolkit/slices/anonymousPerfResultsSlice.ts GitHub Actions / lint (18)
|
||
} | ||
// Initial state | ||
const initialState: AnonymousPerfResultsState = true; | ||
// Slice | ||
const anonymousPerfResultsSlice = createSlice({ | ||
name: 'anonymousPerfResults', | ||
initialState, | ||
reducers: { | ||
setAnonymousPerfResults: (state, action: PayloadAction<AnonymousPerfResultsState>) => { | ||
return action.payload; | ||
}, | ||
updateResultsSelection: (state: AnonymousPerfResultsState, action: PayloadAction<any>) => { | ||
Check failure on line 17 in src/redux-toolkit/slices/anonymousPerfResultsSlice.ts GitHub Actions / lint (16)
Check failure on line 17 in src/redux-toolkit/slices/anonymousPerfResultsSlice.ts GitHub Actions / lint (16)
Check failure on line 17 in src/redux-toolkit/slices/anonymousPerfResultsSlice.ts GitHub Actions / lint (18)
Check failure on line 17 in src/redux-toolkit/slices/anonymousPerfResultsSlice.ts GitHub Actions / lint (18)
Check failure on line 17 in src/redux-toolkit/slices/anonymousPerfResultsSlice.ts GitHub Actions / lint (20)
|
||
// TODO: Implement reducer logic for UPDATE_RESULTS_SELECTION | ||
return state; | ||
}, | ||
clearResultsSelection: (state: AnonymousPerfResultsState, action: PayloadAction<any>) => { | ||
Check failure on line 21 in src/redux-toolkit/slices/anonymousPerfResultsSlice.ts GitHub Actions / lint (16)
Check failure on line 21 in src/redux-toolkit/slices/anonymousPerfResultsSlice.ts GitHub Actions / lint (16)
Check failure on line 21 in src/redux-toolkit/slices/anonymousPerfResultsSlice.ts GitHub Actions / lint (18)
Check failure on line 21 in src/redux-toolkit/slices/anonymousPerfResultsSlice.ts GitHub Actions / lint (18)
Check failure on line 21 in src/redux-toolkit/slices/anonymousPerfResultsSlice.ts GitHub Actions / lint (20)
|
||
// TODO: Implement reducer logic for CLEAR_RESULTS_SELECTION | ||
return state; | ||
}, | ||
updateAnonymousUsageStats: (state: AnonymousPerfResultsState, action: PayloadAction<any>) => { | ||
Check failure on line 25 in src/redux-toolkit/slices/anonymousPerfResultsSlice.ts GitHub Actions / lint (16)
Check failure on line 25 in src/redux-toolkit/slices/anonymousPerfResultsSlice.ts GitHub Actions / lint (16)
Check failure on line 25 in src/redux-toolkit/slices/anonymousPerfResultsSlice.ts GitHub Actions / lint (18)
Check failure on line 25 in src/redux-toolkit/slices/anonymousPerfResultsSlice.ts GitHub Actions / lint (18)
Check failure on line 25 in src/redux-toolkit/slices/anonymousPerfResultsSlice.ts GitHub Actions / lint (20)
|
||
// TODO: Implement reducer logic for UPDATE_ANONYMOUS_USAGE_STATS | ||
return state; | ||
}, | ||
updateAnonymousPerformanceResults: ( | ||
state: AnonymousPerfResultsState, | ||
action: PayloadAction<any> | ||
Check failure on line 31 in src/redux-toolkit/slices/anonymousPerfResultsSlice.ts GitHub Actions / lint (16)
Check failure on line 31 in src/redux-toolkit/slices/anonymousPerfResultsSlice.ts GitHub Actions / lint (16)
Check failure on line 31 in src/redux-toolkit/slices/anonymousPerfResultsSlice.ts GitHub Actions / lint (18)
Check failure on line 31 in src/redux-toolkit/slices/anonymousPerfResultsSlice.ts GitHub Actions / lint (18)
Check failure on line 31 in src/redux-toolkit/slices/anonymousPerfResultsSlice.ts GitHub Actions / lint (20)
|
||
) => { | ||
// TODO: Implement reducer logic for UPDATE_ANONYMOUS_PERFORMANCE_RESULTS | ||
return state; | ||
} | ||
} | ||
}); | ||
// Actions | ||
export const { | ||
setAnonymousPerfResults, | ||
updateResultsSelection, | ||
clearResultsSelection, | ||
updateAnonymousUsageStats, | ||
updateAnonymousPerformanceResults | ||
} = anonymousPerfResultsSlice.actions; | ||
// Selectors | ||
export const selectAnonymousPerfResults = (state: MesheryRootState) => state.anonymousPerfResults; | ||
export default anonymousPerfResultsSlice.reducer; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { createSlice, PayloadAction } from '@reduxjs/toolkit'; | ||
import type { MesheryRootState } from '../store'; | ||
// State interface | ||
export interface AnonymousUsageStatsState { | ||
[key: string]: any; | ||
Check failure on line 5 in src/redux-toolkit/slices/anonymousUsageStatsSlice.ts GitHub Actions / lint (16)
Check failure on line 5 in src/redux-toolkit/slices/anonymousUsageStatsSlice.ts GitHub Actions / lint (18)
|
||
} | ||
// Initial state | ||
const initialState: AnonymousUsageStatsState = true; | ||
// Slice | ||
const anonymousUsageStatsSlice = createSlice({ | ||
name: 'anonymousUsageStats', | ||
initialState, | ||
reducers: { | ||
setAnonymousUsageStats: (state, action: PayloadAction<AnonymousUsageStatsState>) => { | ||
return action.payload; | ||
}, | ||
updateAnonymousUsageStats: (state: AnonymousUsageStatsState, action: PayloadAction<any>) => { | ||
// TODO: Implement reducer logic for UPDATE_ANONYMOUS_USAGE_STATS | ||
return state; | ||
}, | ||
updateAnonymousPerformanceResults: ( | ||
state: AnonymousUsageStatsState, | ||
action: PayloadAction<any> | ||
) => { | ||
// TODO: Implement reducer logic for UPDATE_ANONYMOUS_PERFORMANCE_RESULTS | ||
return state; | ||
} | ||
} | ||
}); | ||
// Actions | ||
export const { | ||
setAnonymousUsageStats, | ||
updateAnonymousUsageStats, | ||
updateAnonymousPerformanceResults | ||
} = anonymousUsageStatsSlice.actions; | ||
// Selectors | ||
export const selectAnonymousUsageStats = (state: MesheryRootState) => state.anonymousUsageStats; | ||
export default anonymousUsageStatsSlice.reducer; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { createSlice, PayloadAction } from '@reduxjs/toolkit'; | ||
import type { MesheryRootState } from '../store'; | ||
// State interface | ||
export interface CState { | ||
[key: string]: any; | ||
} | ||
// Initial state | ||
const initialState: CState = 0; | ||
// Slice | ||
const cSlice = createSlice({ | ||
name: 'c', | ||
initialState, | ||
reducers: { | ||
setC: (state, action: PayloadAction<CState>) => { | ||
return action.payload; | ||
} | ||
} | ||
}); | ||
// Actions | ||
export const { setC } = cSlice.actions; | ||
// Selectors | ||
export const selectC = (state: MesheryRootState) => state.c; | ||
export default cSlice.reducer; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { createSlice, PayloadAction } from '@reduxjs/toolkit'; | ||
import type { MesheryRootState } from '../store'; | ||
// State interface | ||
export interface CapabilitiesRegistryState { | ||
[key: string]: any; | ||
} | ||
// Initial state | ||
const initialState: CapabilitiesRegistryState = null; | ||
// Slice | ||
const capabilitiesRegistrySlice = createSlice({ | ||
name: 'capabilitiesRegistry', | ||
initialState, | ||
reducers: { | ||
setCapabilitiesRegistry: (state, action: PayloadAction<CapabilitiesRegistryState>) => { | ||
return action.payload; | ||
}, | ||
updateCapabilityRegistry: (state: CapabilitiesRegistryState, action: PayloadAction<any>) => { | ||
// TODO: Implement reducer logic for UPDATE_CAPABILITY_REGISTRY | ||
return state; | ||
} | ||
} | ||
}); | ||
// Actions | ||
export const { setCapabilitiesRegistry, updateCapabilityRegistry } = | ||
capabilitiesRegistrySlice.actions; | ||
// Selectors | ||
export const selectCapabilitiesRegistry = (state: MesheryRootState) => state.capabilitiesRegistry; | ||
export default capabilitiesRegistrySlice.reducer; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { createSlice, PayloadAction } from '@reduxjs/toolkit'; | ||
import type { MesheryRootState } from '../store'; | ||
// State interface | ||
export interface CatalogVisibilityState { | ||
[key: string]: any; | ||
} | ||
// Initial state | ||
const initialState: CatalogVisibilityState = true; | ||
// Slice | ||
const catalogVisibilitySlice = createSlice({ | ||
name: 'catalogVisibility', | ||
initialState, | ||
reducers: { | ||
setCatalogVisibility: (state, action: PayloadAction<CatalogVisibilityState>) => { | ||
return action.payload; | ||
}, | ||
setCatalogContent: (state: CatalogVisibilityState, action: PayloadAction<any>) => { | ||
// TODO: Implement reducer logic for SET_CATALOG_CONTENT | ||
return state; | ||
} | ||
} | ||
}); | ||
// Actions | ||
export const { setCatalogVisibility, setCatalogContent } = catalogVisibilitySlice.actions; | ||
// Selectors | ||
export const selectCatalogVisibility = (state: MesheryRootState) => state.catalogVisibility; | ||
export default catalogVisibilitySlice.reducer; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { createSlice, PayloadAction } from '@reduxjs/toolkit'; | ||
import type { MesheryRootState } from '../store'; | ||
// State interface | ||
export interface ConnectionMetadataStateState { | ||
[key: string]: any; | ||
} | ||
// Initial state | ||
const initialState: ConnectionMetadataStateState = null; | ||
// Slice | ||
const connectionMetadataStateSlice = createSlice({ | ||
name: 'connectionMetadataState', | ||
initialState, | ||
reducers: { | ||
setConnectionMetadataState: (state, action: PayloadAction<ConnectionMetadataStateState>) => { | ||
return action.payload; | ||
}, | ||
updateLoadTestData: (state: ConnectionMetadataStateState, action: PayloadAction<any>) => { | ||
// TODO: Implement reducer logic for UPDATE_LOAD_TEST_DATA | ||
return state; | ||
}, | ||
setControllerState: (state: ConnectionMetadataStateState, action: PayloadAction<any>) => { | ||
// TODO: Implement reducer logic for SET_CONTROLLER_STATE | ||
return state; | ||
}, | ||
setConnectionMetadata: (state: ConnectionMetadataStateState, action: PayloadAction<any>) => { | ||
// TODO: Implement reducer logic for SET_CONNECTION_METADATA | ||
return state; | ||
} | ||
} | ||
}); | ||
// Actions | ||
export const { | ||
setConnectionMetadataState, | ||
updateLoadTestData, | ||
setControllerState, | ||
setConnectionMetadata | ||
} = connectionMetadataStateSlice.actions; | ||
// Selectors | ||
export const selectConnectionMetadataState = (state: MesheryRootState) => | ||
state.connectionMetadataState; | ||
export default connectionMetadataStateSlice.reducer; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { createSlice, PayloadAction } from '@reduxjs/toolkit'; | ||
import type { MesheryRootState } from '../store'; | ||
// State interface | ||
export interface ControllerStateState { | ||
[key: string]: any; | ||
} | ||
// Initial state | ||
const initialState: ControllerStateState = null; | ||
// Slice | ||
const controllerStateSlice = createSlice({ | ||
name: 'controllerState', | ||
initialState, | ||
reducers: { | ||
setControllerState: (state, action: PayloadAction<ControllerStateState>) => { | ||
return action.payload; | ||
}, | ||
setControllerState: (state: ControllerStateState, action: PayloadAction<any>) => { | ||
// TODO: Implement reducer logic for SET_CONTROLLER_STATE | ||
return state; | ||
} | ||
} | ||
}); | ||
// Actions | ||
export const { setControllerState, setControllerState1 } = controllerStateSlice.actions; | ||
// Selectors | ||
export const selectControllerState = (state: MesheryRootState) => state.controllerState; | ||
export default controllerStateSlice.reducer; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { createSlice, PayloadAction } from '@reduxjs/toolkit'; | ||
import type { MesheryRootState } from '../store'; | ||
// State interface | ||
export interface EventsState { | ||
[key: string]: any; | ||
} | ||
// Initial state | ||
const initialState: EventsState = []; | ||
// Slice | ||
const eventsSlice = createSlice({ | ||
name: 'events', | ||
initialState, | ||
reducers: { | ||
setEvents: (state, action: PayloadAction<EventsState>) => { | ||
return action.payload; | ||
} | ||
} | ||
}); | ||
// Actions | ||
export const { setEvents } = eventsSlice.actions; | ||
// Selectors | ||
export const selectEvents = (state: MesheryRootState) => state.events; | ||
export default eventsSlice.reducer; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { createSlice, PayloadAction } from '@reduxjs/toolkit'; | ||
import type { MesheryRootState } from '../store'; | ||
// State interface | ||
export interface ExtensionTypeState { | ||
[key: string]: any; | ||
} | ||
// Initial state | ||
const initialState: ExtensionTypeState = ''; | ||
// Slice | ||
const extensionTypeSlice = createSlice({ | ||
name: 'extensionType', | ||
initialState, | ||
reducers: { | ||
setExtensionType: (state, action: PayloadAction<ExtensionTypeState>) => { | ||
return action.payload; | ||
}, | ||
updateExtensionType: (state: ExtensionTypeState, action: PayloadAction<any>) => { | ||
// TODO: Implement reducer logic for UPDATE_EXTENSION_TYPE | ||
return state; | ||
} | ||
} | ||
}); | ||
// Actions | ||
export const { setExtensionType, updateExtensionType } = extensionTypeSlice.actions; | ||
// Selectors | ||
export const selectExtensionType = (state: MesheryRootState) => state.extensionType; | ||
export default extensionTypeSlice.reducer; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { createSlice, PayloadAction } from '@reduxjs/toolkit'; | ||
import type { MesheryRootState } from '../store'; | ||
// State interface | ||
export interface GenState { | ||
[key: string]: any; | ||
} | ||
// Initial state | ||
const initialState: GenState = 'fortio'; | ||
// Slice | ||
const genSlice = createSlice({ | ||
name: 'gen', | ||
initialState, | ||
reducers: { | ||
setGen: (state, action: PayloadAction<GenState>) => { | ||
return action.payload; | ||
}, | ||
updateLoadGenConfig: (state: GenState, action: PayloadAction<any>) => { | ||
// TODO: Implement reducer logic for UPDATE_LOAD_GEN_CONFIG | ||
return state; | ||
} | ||
} | ||
}); | ||
// Actions | ||
export const { setGen, updateLoadGenConfig } = genSlice.actions; | ||
// Selectors | ||
export const selectGen = (state: MesheryRootState) => state.gen; | ||
export default genSlice.reducer; |