diff --git a/x-pack/platform/plugins/shared/alerting/server/usage/task_state.test.ts b/x-pack/platform/plugins/shared/alerting/server/usage/task_state.test.ts index ccef029a6ab30..f69646503ba87 100644 --- a/x-pack/platform/plugins/shared/alerting/server/usage/task_state.test.ts +++ b/x-pack/platform/plugins/shared/alerting/server/usage/task_state.test.ts @@ -667,10 +667,20 @@ describe('telemetry task state', () => { count_rules_executions_timeouts_by_type_per_day: { '.index-threshold': 30 }, count_rules_executions_timeouts_per_day: 31, count_rules_muted: 32, - count_rules_muted_by_type: {}, + count_rules_muted_by_type: { + // eslint-disable-next-line @typescript-eslint/naming-convention + observability__rules__custom_threshold: 5, + // eslint-disable-next-line @typescript-eslint/naming-convention + slo__rules__burnRate: 4, + }, count_rules_namespaces: 33, count_rules_snoozed: 34, - count_rules_snoozed_by_type: {}, + count_rules_snoozed_by_type: { + // eslint-disable-next-line @typescript-eslint/naming-convention + observability__rules__custom_threshold: 2, + // eslint-disable-next-line @typescript-eslint/naming-convention + slo__rules__burnRate: 1, + }, count_rules_with_muted_alerts: 35, count_rules_with_tags: 36, count_rules_with_linked_dashboards: 10, diff --git a/x-pack/platform/plugins/shared/triggers_actions_ui/public/application/sections/rules_list/components/rule_status_dropdown.tsx b/x-pack/platform/plugins/shared/triggers_actions_ui/public/application/sections/rules_list/components/rule_status_dropdown.tsx index 27f05487fb6e6..06915244cc4ae 100644 --- a/x-pack/platform/plugins/shared/triggers_actions_ui/public/application/sections/rules_list/components/rule_status_dropdown.tsx +++ b/x-pack/platform/plugins/shared/triggers_actions_ui/public/application/sections/rules_list/components/rule_status_dropdown.tsx @@ -34,7 +34,8 @@ const SNOOZE_END_TIME_FORMAT = 'LL @ LT'; type DropdownRuleRecord = Pick< Rule, 'enabled' | 'muteAll' | 'isSnoozedUntil' | 'snoozeSchedule' | 'activeSnoozes' ->; +> & + Partial>; export interface ComponentOpts { rule: DropdownRuleRecord; @@ -223,7 +224,7 @@ export const RuleStatusDropdown: React.FunctionComponent = ({ gutterSize={direction === 'row' ? 's' : 'xs'} responsive={false} > - + {isEditable ? ( { } return ( - { - await onSnoozeRule(rule, snoozeSchedule); - }} - unsnoozeRule={async (scheduleIds) => await onUnsnoozeRule(rule, scheduleIds)} - isRuleEditable={rule.isEditable} - /> +
+ { + await onSnoozeRule(rule, snoozeSchedule); + }} + unsnoozeRule={async (scheduleIds) => await onUnsnoozeRule(rule, scheduleIds)} + isRuleEditable={rule.isEditable} + /> +
); }, }, @@ -777,7 +779,11 @@ export const RulesListTable = (props: RulesListTableProps) => { width: '90px', render(rule: RuleTableItem) { return ( - + {rule.isEditable && isRuleTypeEditableInContext(rule.ruleTypeId) ? ( diff --git a/x-pack/solutions/observability/plugins/observability/public/pages/rule_details/components/header_actions.tsx b/x-pack/solutions/observability/plugins/observability/public/pages/rule_details/components/header_actions.tsx index 5bf48fe361f40..a2da1b70b7fca 100644 --- a/x-pack/solutions/observability/plugins/observability/public/pages/rule_details/components/header_actions.tsx +++ b/x-pack/solutions/observability/plugins/observability/public/pages/rule_details/components/header_actions.tsx @@ -185,7 +185,11 @@ export function HeaderActions({ return ( <> - + - +