mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
## 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.
This commit is contained in:
parent
cd962314d7
commit
077e87b514
1 changed files with 3 additions and 0 deletions
|
@ -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 });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue