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

Loading…
Cancel
Save