Skip to content

Commit 65bb04b

Browse files
Merge pull request #216 from alanconway/alert-id
COO-1673: fix: Can not generate query from alertrule number
2 parents ed71b71 + 8bb759a commit 65bb04b

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

web/src/hooks/useDomains.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ import { State } from '../redux-reducers';
77

88
// The alert domain is dependent on alert Rules state , so we need a hook for domains
99
export const useDomains = () => {
10-
const alertRules = useSelector((state: State) => state.observe?.get('rules'));
10+
const alertRules = useSelector(
11+
(state: State) => state?.plugins?.mp?.alerting?.cmo?.['#ALL_NS#']?.rules,
12+
);
1113

1214
const alertIDs = React.useMemo(() => {
1315
if (!alertRules) return new Map<string, string>();

web/src/redux-reducers.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ export type State = {
99
observe: TPState;
1010
plugins: {
1111
tp: TPState;
12+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
13+
mp: any;
1214
};
1315
};
1416

0 commit comments

Comments
 (0)