Skip to content

Commit ac480d4

Browse files
committed
[Metrics UI] Add Charts to Alert Conditions
- Reorganize files under public/alerting - Change Metrics Explorer API to force interval - Add charts to expression rows - Allow expression rows to be collapsable - Adding sum aggregation to Metrics Explorer for parity
1 parent 4a04adf commit ac480d4

File tree

22 files changed

+772
-264
lines changed

22 files changed

+772
-264
lines changed

x-pack/plugins/infra/common/http_api/metrics_explorer/index.ts renamed to x-pack/plugins/infra/common/http_api/metrics_explorer.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export const METRIC_EXPLORER_AGGREGATIONS = [
1313
'cardinality',
1414
'rate',
1515
'count',
16+
'sum',
1617
] as const;
1718

1819
type MetricExplorerAggregations = typeof METRIC_EXPLORER_AGGREGATIONS[number];
@@ -54,6 +55,7 @@ export const metricsExplorerRequestBodyOptionalFieldsRT = rt.partial({
5455
afterKey: rt.union([rt.string, rt.null, rt.undefined]),
5556
limit: rt.union([rt.number, rt.null, rt.undefined]),
5657
filterQuery: rt.union([rt.string, rt.null, rt.undefined]),
58+
forceInterval: rt.boolean,
5759
});
5860

5961
export const metricsExplorerRequestBodyRT = rt.intersection([

x-pack/plugins/infra/common/saved_objects/metrics_explorer_view.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ export const metricsExplorerViewSavedObjectMappings: {
3535
},
3636
options: {
3737
properties: {
38+
forceInterval: {
39+
type: 'boolean',
40+
},
3841
metrics: {
3942
type: 'nested',
4043
properties: {

0 commit comments

Comments
 (0)