mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
feat(slo): group by slo id (#210469)
This commit is contained in:
parent
d36df89025
commit
9545d6b127
5 changed files with 17 additions and 1 deletions
|
@ -14,6 +14,7 @@ const groupBySchema = t.union([
|
|||
t.literal('slo.indicator.type'),
|
||||
t.literal('slo.instanceId'),
|
||||
t.literal('_index'),
|
||||
t.literal('slo.id'),
|
||||
]);
|
||||
|
||||
const findSLOGroupsParamsSchema = t.partial({
|
||||
|
|
|
@ -59,6 +59,9 @@ export function QuickFilters({
|
|||
align-items: flex-start;
|
||||
min-height: initial;
|
||||
}
|
||||
.controlPanel {
|
||||
height: initial;
|
||||
}
|
||||
.controlGroup {
|
||||
min-height: initial;
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ export function useGroupName(groupBy: GroupByField, group: string, summary?: Gro
|
|||
case 'ungrouped':
|
||||
case 'slo.tags':
|
||||
case 'status':
|
||||
case 'slo.id':
|
||||
return groupName;
|
||||
case 'slo.instanceId':
|
||||
if (groupName === ALL_VALUE || !summary?.worst?.slo?.groupings) {
|
||||
|
|
|
@ -80,6 +80,16 @@ export function SloGroupBy({ onStateChange, state, loading }: Props) {
|
|||
handleChangeGroupBy('slo.indicator.type');
|
||||
},
|
||||
},
|
||||
{
|
||||
label: i18n.translate('xpack.slo.list.groupBy.sloId', {
|
||||
defaultMessage: 'SLO definition id',
|
||||
}),
|
||||
checked: groupBy === 'slo.id',
|
||||
value: 'slo.id',
|
||||
onClick: () => {
|
||||
handleChangeGroupBy('slo.id');
|
||||
},
|
||||
},
|
||||
{
|
||||
label: i18n.translate('xpack.slo.list.groupBy.sloInstanceId', {
|
||||
defaultMessage: 'SLO instance id',
|
||||
|
|
|
@ -12,7 +12,8 @@ export type GroupByField =
|
|||
| 'status'
|
||||
| 'slo.indicator.type'
|
||||
| 'slo.instanceId'
|
||||
| '_index';
|
||||
| '_index'
|
||||
| 'slo.id';
|
||||
export type SortDirection = 'asc' | 'desc';
|
||||
export type SortField =
|
||||
| 'sli_value'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue