mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Synthetics] Fixes pending count filtering (#177499)
## Summary
Fixes pending count filtering !!
Follow up to https://github.com/elastic/kibana/pull/177406
<img width="1728" alt="image"
src="3dea1684
-d6a9-44ab-b9a7-ad6c60079542">
This commit is contained in:
parent
534c337831
commit
1f8bfae21c
3 changed files with 20 additions and 4 deletions
|
@ -44,6 +44,11 @@ export const useMonitorQueryIds = () => {
|
|||
case 'disabled':
|
||||
monitorIds = status?.disabledMonitorQueryIds ?? [];
|
||||
break;
|
||||
case 'pending':
|
||||
monitorIds = status
|
||||
? Object.entries(status.pendingConfigs).map(([id, config]) => config.monitorQueryId)
|
||||
: [];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ export function OverviewStatus() {
|
|||
pending: 0,
|
||||
});
|
||||
break;
|
||||
case 'down': {
|
||||
case 'down':
|
||||
setStatusConfig({
|
||||
up: 0,
|
||||
down: status?.down || 0,
|
||||
|
@ -59,8 +59,7 @@ export function OverviewStatus() {
|
|||
pending: 0,
|
||||
});
|
||||
break;
|
||||
}
|
||||
case 'disabled': {
|
||||
case 'disabled':
|
||||
setStatusConfig({
|
||||
up: 0,
|
||||
down: 0,
|
||||
|
@ -68,7 +67,14 @@ export function OverviewStatus() {
|
|||
pending: 0,
|
||||
});
|
||||
break;
|
||||
}
|
||||
case 'pending':
|
||||
setStatusConfig({
|
||||
up: 0,
|
||||
down: 0,
|
||||
disabledCount: 0,
|
||||
pending: status?.pending || 0,
|
||||
});
|
||||
break;
|
||||
}
|
||||
} else if (status) {
|
||||
setStatusConfig({
|
||||
|
|
|
@ -89,6 +89,11 @@ export function useMonitorsSortedByStatus() {
|
|||
monitorsSortedByStatus: monitorsSortedByStatus.disabled,
|
||||
downMonitors: downMonitors.current,
|
||||
};
|
||||
case 'pending':
|
||||
return {
|
||||
monitorsSortedByStatus: monitorsSortedByStatus.pending,
|
||||
downMonitors: downMonitors.current,
|
||||
};
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue