mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Fix group select not being filled by selected folder when creating alert from panel (#61577)
Add fetchRulerRulesIfNotFetchedYet fetching when results are an empty object
This commit is contained in:
parent
9a8c798bae
commit
04b5e6ed9e
@ -258,7 +258,8 @@ export function fetchRulerRulesIfNotFetchedYet(rulesSourceName: string): ThunkRe
|
|||||||
return (dispatch, getStore) => {
|
return (dispatch, getStore) => {
|
||||||
const { rulerRules } = getStore().unifiedAlerting;
|
const { rulerRules } = getStore().unifiedAlerting;
|
||||||
const resp = rulerRules[rulesSourceName];
|
const resp = rulerRules[rulesSourceName];
|
||||||
if (!resp?.result && !(resp && isRulerNotSupportedResponse(resp)) && !resp?.loading) {
|
const emptyResults = isEmpty(resp?.result);
|
||||||
|
if (emptyResults && !(resp && isRulerNotSupportedResponse(resp)) && !resp?.loading) {
|
||||||
dispatch(fetchRulerRulesAction({ rulesSourceName }));
|
dispatch(fetchRulerRulesAction({ rulesSourceName }));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user