From 077e87b51471afc20aabcaede5be0d9566a52124 Mon Sep 17 00:00:00 2001 From: Brad White Date: Wed, 27 Sep 2023 03:42:54 -0600 Subject: [PATCH] Pick Infra UI from #166813 (#167348) ## Summary We're breaking https://github.com/elastic/kibana/pull/166813 up into smaller PRs in the interest of getting PRs through sooner for type fixes. These are the changes for Infra UI. --- x-pack/plugins/asset_manager/server/routes/assets/hosts.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/x-pack/plugins/asset_manager/server/routes/assets/hosts.ts b/x-pack/plugins/asset_manager/server/routes/assets/hosts.ts index 2b1088990334..68ed4baaeb5c 100644 --- a/x-pack/plugins/asset_manager/server/routes/assets/hosts.ts +++ b/x-pack/plugins/asset_manager/server/routes/assets/hosts.ts @@ -47,12 +47,15 @@ export function hostsRoutes({ async (context, req, res) => { const { from = 'now-24h', to = 'now' } = req.query || {}; const esClient = await getEsClientFromContext(context); + const coreContext = await context.core; + const soClient = coreContext.savedObjects.client; try { const response = await assetAccessor.getHosts({ from: datemath.parse(from)!.toISOString(), to: datemath.parse(to)!.toISOString(), esClient, + soClient, }); return res.ok({ body: response });