mirror of https://github.com/rancher/dashboard.git
Normalize states to enum values
This commit is contained in:
parent
db7f9b52d6
commit
40b5960959
|
|
@ -28,10 +28,15 @@ function normalizeStateCounts(data) {
|
|||
};
|
||||
}
|
||||
const { desiredReady, ...rest } = data ;
|
||||
const states = Object.entries(rest).reduce((res, [key, value]) => {
|
||||
res[mapStateToEnum(key)] = value;
|
||||
|
||||
return res;
|
||||
}, {});
|
||||
|
||||
return {
|
||||
total: desiredReady,
|
||||
states: rest,
|
||||
total: desiredReady,
|
||||
states,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue