Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
picodata
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
picodata
Commits
ac59b115
Commit
ac59b115
authored
1 year ago
by
Egor Fuchezhi
Browse files
Options
Downloads
Patches
Plain Diff
PicoUI-9: Added enum for redux action types
parent
e9fa96f6
No related branches found
No related tags found
1 merge request
!1136
chore: incorporate webui submodule
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
webui/src/store/slices/clusterSlice.ts
+3
-3
3 additions, 3 deletions
webui/src/store/slices/clusterSlice.ts
webui/src/store/slices/types.ts
+5
-0
5 additions, 0 deletions
webui/src/store/slices/types.ts
with
8 additions
and
3 deletions
webui/src/store/slices/clusterSlice.ts
+
3
−
3
View file @
ac59b115
import
{
createAsyncThunk
,
createSlice
}
from
"
@reduxjs/toolkit
"
;
import
{
ClusterInfoType
,
ReplicasetType
}
from
"
./types
"
;
import
{
ActionTypes
,
ClusterInfoType
,
ReplicasetType
}
from
"
./types
"
;
export
interface
ClusterState
{
clusterInfo
:
ClusterInfoType
;
...
...
@@ -40,7 +40,7 @@ const initialState: ClusterState = {
};
export
const
getReplicasets
=
createAsyncThunk
<
ReplicasetType
[]
>
(
"
cluster/
getReplicasets
"
,
ActionTypes
.
getReplicasets
Type
,
async
()
=>
{
return
new
Promise
((
res
)
=>
{
res
([
...
...
@@ -158,7 +158,7 @@ export const getReplicasets = createAsyncThunk<ReplicasetType[]>(
);
export
const
getClusterInfo
=
createAsyncThunk
<
ClusterInfoType
>
(
"
cluster/
getClusterInfo
"
,
ActionTypes
.
getClusterInfo
Type
,
async
()
=>
{
return
new
Promise
((
res
)
=>
{
res
({
...
...
This diff is collapsed.
Click to expand it.
webui/src/store/slices/types.ts
+
5
−
0
View file @
ac59b115
...
...
@@ -26,3 +26,8 @@ export interface ClusterInfoType {
instancesCurrentGradeOffline
:
number
;
currentInstaceVersion
:
string
;
}
export
enum
ActionTypes
{
getClusterInfoType
=
"
cluster/getClusterInfo
"
,
getReplicasetsType
=
"
cluster/getReplicasets
"
,
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment