fix(striker-ui-api): exclude blank records from provision server data

main
Tsu-ba-me 1 year ago
parent 26bfb80707
commit 8f5620f84e
  1. 10
      striker-ui-api/src/lib/request_handlers/anvil/buildQueryAnvilDetail.ts

@ -258,7 +258,7 @@ const buildQueryAnvilDetail = ({
stores = {};
}
if (!previous[anvilUUID]) {
if (anvilUUID && !previous[anvilUUID]) {
previous[anvilUUID] = {
anvilUUID,
anvilName,
@ -276,7 +276,7 @@ const buildQueryAnvilDetail = ({
puuid = anvilUUID;
}
if (!hosts[hostUUID]) {
if (hostUUID && !hosts[hostUUID]) {
hosts[hostUUID] = {
hostUUID,
hostName,
@ -285,7 +285,7 @@ const buildQueryAnvilDetail = ({
};
}
if (!servers[serverUUID]) {
if (serverUUID && !servers[serverUUID]) {
const serverMemory =
dSize(serverMemoryValue, {
fromUnit: serverMemoryUnit,
@ -302,7 +302,7 @@ const buildQueryAnvilDetail = ({
};
}
if (!stores[storageGroupUUID]) {
if (storageGroupUUID && !stores[storageGroupUUID]) {
stores[storageGroupUUID] = {
storageGroupUUID,
storageGroupName,
@ -311,7 +311,7 @@ const buildQueryAnvilDetail = ({
};
}
if (!files[fileUUID]) {
if (fileUUID && !files[fileUUID]) {
files[fileUUID] = {
fileUUID,
fileName,

Loading…
Cancel
Save