Skip to content

Commit

Permalink
[Custom threshold] Add group by filters to the custom threshold view …
Browse files Browse the repository at this point in the history
…in app URL (#177016)

Resolves #173713

## Summary

This PR adds group by filters to the view in the app URL for the custom
threshold rule:


![image](https://github.com/elastic/kibana/assets/12370520/c84eecfc-b196-4268-acdd-57bae86ac4c4)

I also moved some types to the common folder and adjusted them to match
the reality.

## 🧪 How to test
- Create a custom threshold rule with group by
   - One with persisted data view
   - One with an ad-hoc data view
- Check the view in app link in the alerts table, you should also see
the group filters there.
- Check the view in app URL from the actions, it should also include the
group filters.
  • Loading branch information
maryam-saeidi authored Feb 22, 2024
1 parent bf4b70c commit 637de1d
Show file tree
Hide file tree
Showing 33 changed files with 301 additions and 142 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ export const legacyExperimentalFieldMap = {
},
[ALERT_GROUP_FIELD]: {
type: 'keyword',
array: false,
array: true,
required: false,
},
[ALERT_GROUP_VALUE]: {
type: 'keyword',
array: false,
array: true,
required: false,
},
} as const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ const ObservabilityApmAlertOptional = rt.partial({
'kibana.alert.evaluation.values': schemaStringOrNumberArray,
'kibana.alert.group': rt.array(
rt.partial({
field: schemaString,
value: schemaString,
field: schemaStringArray,
value: schemaStringArray,
})
),
labels: schemaUnknown,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ const ObservabilityLogsAlertOptional = rt.partial({
'kibana.alert.evaluation.values': schemaStringOrNumberArray,
'kibana.alert.group': rt.array(
rt.partial({
field: schemaString,
value: schemaString,
field: schemaStringArray,
value: schemaStringArray,
})
),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ const ObservabilityMetricsAlertOptional = rt.partial({
'kibana.alert.evaluation.values': schemaStringOrNumberArray,
'kibana.alert.group': rt.array(
rt.partial({
field: schemaString,
value: schemaString,
field: schemaStringArray,
value: schemaStringArray,
})
),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ const ObservabilitySloAlertOptional = rt.partial({
'kibana.alert.evaluation.values': schemaStringOrNumberArray,
'kibana.alert.group': rt.array(
rt.partial({
field: schemaString,
value: schemaString,
field: schemaStringArray,
value: schemaStringArray,
})
),
'slo.id': schemaString,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ const ObservabilityUptimeAlertOptional = rt.partial({
'kibana.alert.evaluation.values': schemaStringOrNumberArray,
'kibana.alert.group': rt.array(
rt.partial({
field: schemaString,
value: schemaString,
field: schemaStringArray,
value: schemaStringArray,
})
),
'monitor.id': schemaString,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 637de1d

Please sign in to comment.