fix: Fix monitor data

Fix the state to get the right data of up and down

Closes-Bug: #1975374
Change-Id: I073471e8c0e9d35c6fb802fc1ec9fea67f9b22d4
This commit is contained in:
xusongfu 2022-05-23 16:07:23 +08:00
parent 54ce0336b9
commit b8b385ef90

View File

@ -169,7 +169,7 @@ export const physicalNodeRightTopCardList = [
];
const result = get(responses[0], 'data.result', []);
result.forEach((r) => {
const idx = r.metric.services_state === 'up' ? 0 : 1;
const idx = r.metric.adminState === 'enabled' ? 0 : 1;
status[idx].value += parseInt(r.value[1], 10);
});
return status;