Skip to content

Commit

Permalink
Pick Infra UI from #166813 (#167348)
Browse files Browse the repository at this point in the history
## Summary

We're breaking #166813 up into
smaller PRs in the interest of getting PRs through sooner for type
fixes. These are the changes for Infra UI.
  • Loading branch information
Ikuni17 authored Sep 27, 2023
1 parent cd96231 commit 077e87b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions x-pack/plugins/asset_manager/server/routes/assets/hosts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,15 @@ export function hostsRoutes<T extends RequestHandlerContext>({
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 });
Expand Down

0 comments on commit 077e87b

Please sign in to comment.