From 634063f4737ac6bfb14a756d91a45f7fbb500e91 Mon Sep 17 00:00:00 2001 From: Maryam Saeidi Date: Wed, 4 Oct 2023 20:51:41 +0200 Subject: [PATCH] [AO] Fix alerting rules order (#168013) Closes #167876 ## Summary This PR fixes alerting rules order. Since the Custom threshold rule is in the tech preview, we want to show it at the end of the list. |Rules (trial)|Rules (Permium)| |---|---| |![image](https://github.com/elastic/kibana/assets/12370520/6e542d8d-a2d8-4dc9-8728-c55bacc87592)|![image](https://github.com/elastic/kibana/assets/12370520/da5c2a82-a5f1-4cb3-aa3c-183fa7af3fa3)| --- .../observability/public/hooks/use_get_filtered_rule_types.ts | 2 +- .../public/rules/register_observability_rule_types.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/observability/public/hooks/use_get_filtered_rule_types.ts b/x-pack/plugins/observability/public/hooks/use_get_filtered_rule_types.ts index 834cc31f39d2ef..24e8a0fc107fb9 100644 --- a/x-pack/plugins/observability/public/hooks/use_get_filtered_rule_types.ts +++ b/x-pack/plugins/observability/public/hooks/use_get_filtered_rule_types.ts @@ -13,6 +13,6 @@ export function useGetFilteredRuleTypes() { const { observabilityRuleTypeRegistry } = usePluginContext(); return useMemo(() => { - return [...observabilityRuleTypeRegistry.list(), ES_QUERY_ID]; + return [ES_QUERY_ID, ...observabilityRuleTypeRegistry.list()]; }, [observabilityRuleTypeRegistry]); } diff --git a/x-pack/plugins/observability/public/rules/register_observability_rule_types.ts b/x-pack/plugins/observability/public/rules/register_observability_rule_types.ts index 5d042607135acd..4cd705656c01b3 100644 --- a/x-pack/plugins/observability/public/rules/register_observability_rule_types.ts +++ b/x-pack/plugins/observability/public/rules/register_observability_rule_types.ts @@ -125,7 +125,7 @@ export const registerObservabilityRuleTypes = ( alertDetailsAppSection: lazy( () => import('../components/custom_threshold/components/alert_details_app_section') ), - priority: 110, + priority: 5, }); } };