forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Rules Page (elastic#146193)
- Loading branch information
1 parent
876f1b9
commit f063ba4
Showing
4 changed files
with
137 additions
and
136 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
x-pack/plugins/observability/public/hooks/use_get_filtered_rule_types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { useMemo } from 'react'; | ||
import { usePluginContext } from './use_plugin_context'; | ||
|
||
export function useGetFilteredRuleTypes() { | ||
const { observabilityRuleTypeRegistry } = usePluginContext(); | ||
|
||
return useMemo(() => observabilityRuleTypeRegistry.list(), [observabilityRuleTypeRegistry]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.