mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Uptime] Console errors in case index missing (#65115)
This commit is contained in:
parent
7d15c2103c
commit
ba0670d4c2
2 changed files with 8 additions and 2 deletions
|
@ -55,7 +55,13 @@ const statusCount = async (context: QueryContext): Promise<Snapshot> => {
|
|||
body: statusCountBody(await context.dateAndCustomFilters()),
|
||||
});
|
||||
|
||||
return res.aggregations.counts.value;
|
||||
return (
|
||||
res.aggregations?.counts?.value ?? {
|
||||
total: 0,
|
||||
up: 0,
|
||||
down: 0,
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
const statusCountBody = (filters: any): any => {
|
||||
|
|
|
@ -47,7 +47,7 @@ export const findPotentialMatches = async (
|
|||
return {
|
||||
monitorIds,
|
||||
checkGroups,
|
||||
searchAfter: queryResult.aggregations.monitors.after_key,
|
||||
searchAfter: queryResult.aggregations?.monitors?.after_key,
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue