fix(striker-ui-api): include host name in manifest detail

main
Tsu-ba-me 2 years ago
parent f72a348fb5
commit f7dea00ae6
  1. 12
      striker-ui-api/src/lib/request_handlers/manifest/getManifestDetail.ts
  2. 1
      striker-ui-api/src/types/APIManifest.d.ts

@ -132,7 +132,16 @@ export const getManifestDetail: RequestHandler = (request, response) => {
.reduce<ManifestDetailHostList>(
(
previous,
[hostId, { fence = {}, ipmi_ip: ipmiIp, network, ups = {} }],
[
hostId,
{
fence = {},
ipmi_ip: ipmiIp,
name: hostName,
network,
ups = {},
},
],
) => {
const { name: hostType, number: hostNumber } =
getEntityParts(hostId);
@ -160,6 +169,7 @@ export const getManifestDetail: RequestHandler = (request, response) => {
},
{},
),
hostName,
hostNumber,
hostType,
ipmiIp,

@ -48,6 +48,7 @@ type ManifestDetailUpsList = {
type ManifestDetailHostList = {
[hostId: string]: {
fences: ManifestDetailFenceList;
hostName: string;
hostNumber: number;
hostType: string;
ipmiIp: string;

Loading…
Cancel
Save