Skip to content

Commit

Permalink
[Alerting] Fix the charts on Log Threshold Rule Alert Detail page (#1…
Browse files Browse the repository at this point in the history
…60321)

## Summary

This PR fixes #160320 by changing the chart from the `CriterionPreview`
chart, borrowed from the Log Threshold Rule, to an embedded Lens
visualization that represents the correct document count in one chart. I
also took the liberty of changing the ratio chart to use the same
technique for consistency sake.

## Count with multiple conditions

### Before

<img width="736" alt="image"
src="https://github.com/elastic/kibana/assets/41702/6c6a27ea-f8e4-491f-8a12-261d0ed13dcb">

### After

<img width="736" alt="image"
src="https://github.com/elastic/kibana/assets/41702/9b18ebe9-e911-4e40-8911-bee55cd7d245">

## Count with multiple conditions and a group by

### Before

<img width="736" alt="image"
src="https://github.com/elastic/kibana/assets/41702/7b9462da-55b2-4f54-ba09-3c55b372ae2c">


### After

<img width="736" alt="image"
src="https://github.com/elastic/kibana/assets/41702/b268caed-242f-430a-ade0-14bf491ec899">

## Ratio with multiple conditions

### Before

<img width="736" alt="image"
src="https://github.com/elastic/kibana/assets/41702/55b8dfa2-7789-433b-bffd-e412bdb08b3f">

### After

<img width="736" alt="image"
src="https://github.com/elastic/kibana/assets/41702/a029bf8a-3ba1-4e16-87bd-097ebc526a4e">


## Ratio with multiple conditions and a  group by

### Before

<img width="736" alt="image"
src="https://github.com/elastic/kibana/assets/41702/61ddf1e9-c5ad-4546-a539-15a51ee563c0">

### After

<img width="736" alt="image"
src="https://github.com/elastic/kibana/assets/41702/15b0aaa3-4ef9-47f6-baba-24869feae77e">
  • Loading branch information
simianhacker authored Jun 27, 2023
1 parent 58b3c32 commit a8322d2
Show file tree
Hide file tree
Showing 10 changed files with 688 additions and 369 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
import moment from 'moment';

export interface TimeRange {
from?: string;
to?: string;
interval?: string;
from: string;
to: string;
}

export const getPaddedAlertTimeRange = (alertStart: string, alertEnd?: string): TimeRange => {
Expand Down

This file was deleted.

Loading

0 comments on commit a8322d2

Please sign in to comment.