|
|
|
@ -1,3 +1,5 @@ |
|
|
|
|
import { LOCAL } from '../../consts/LOCAL'; |
|
|
|
|
|
|
|
|
|
import { getLocalHostUUID } from '../../accessModule'; |
|
|
|
|
import buildGetRequestHandler from '../buildGetRequestHandler'; |
|
|
|
|
import { buildQueryHostDetail } from './buildQueryHostDetail'; |
|
|
|
@ -21,7 +23,7 @@ export const getHost = buildGetRequestHandler((request, buildQueryOptions) => { |
|
|
|
|
if (output instanceof Array) { |
|
|
|
|
result = output.reduce<Record<string, HostOverview>>( |
|
|
|
|
(previous, [hostName, hostUUID]) => { |
|
|
|
|
const key = hostUUID === localHostUUID ? 'local' : hostUUID; |
|
|
|
|
const key = hostUUID === localHostUUID ? LOCAL : hostUUID; |
|
|
|
|
|
|
|
|
|
previous[key] = { hostName, hostUUID }; |
|
|
|
|
|
|
|
|
|