Alerting: Promote the policy matching functions to stable (#112931)

This commit is contained in:
Gilles De Mey
2025-10-24 12:36:23 +00:00
committed by GitHub
parent dc77da11cf
commit 2a3b3c0003
14 changed files with 43 additions and 43 deletions
+27 -3
View File
@@ -11,8 +11,32 @@ export { AlertLabels } from './grafana/rules/components/labels/AlertLabels';
export { AlertLabel } from './grafana/rules/components/labels/AlertLabel';
// keep label utils internal to the app for now
/**
* Notification policies and label matching
*/
export {
useMatchInstancesToRouteTrees,
matchInstancesToRouteTrees,
type RouteMatch,
type InstanceMatchResult,
} from './grafana/notificationPolicies/hooks/useMatchPolicies';
export {
type TreeMatch,
type RouteMatchResult,
matchInstancesToRoute,
findMatchingRoutes,
getInheritedProperties,
computeInheritedTree,
} from './grafana/notificationPolicies/utils';
export { USER_DEFINED_TREE_NAME } from './grafana/notificationPolicies/consts';
export * from './grafana/notificationPolicies/types';
/**
* Labels and matchers
*/
export { type LabelMatcher, type Label } from './grafana/matchers/types';
// Utilities
export { base64UrlEncode } from './grafana/api/util';
// This is a dummy export so typescript doesn't error importing an "empty module"
export const index = {};
-18
View File
@@ -8,24 +8,6 @@ export { useListContactPoints } from './grafana/contactPoints/hooks/v0alpha1/use
export { ContactPointSelector } from './grafana/contactPoints/components/ContactPointSelector/ContactPointSelector';
export { getContactPointDescription } from './grafana/contactPoints/utils';
// Notification Policies
export {
useMatchInstancesToRouteTrees,
matchInstancesToRouteTrees,
type RouteMatch,
type InstanceMatchResult,
} from './grafana/notificationPolicies/hooks/useMatchPolicies';
export {
type TreeMatch,
type RouteMatchResult,
matchInstancesToRoute,
findMatchingRoutes,
getInheritedProperties,
computeInheritedTree,
} from './grafana/notificationPolicies/utils';
export { USER_DEFINED_TREE_NAME } from './grafana/notificationPolicies/consts';
export * from './grafana/notificationPolicies/types';
// Rules
export { StateText } from './grafana/rules/components/state/StateText';
export { StateIcon } from './grafana/rules/components/state/StateIcon';