mirror of
https://github.com/grafana/grafana.git
synced 2024-11-25 02:10:45 -06:00
Alerting: Do not check evaluation interval for external rulers (#89354)
This commit is contained in:
parent
86ac40418d
commit
64e134c601
@ -338,7 +338,8 @@ export function EditCloudGroupModal(props: ModalProps): React.ReactElement {
|
||||
</Stack>
|
||||
</Field>
|
||||
|
||||
{checkEvaluationIntervalGlobalLimit(watch('groupInterval')).exceedsLimit && (
|
||||
{/* if we're dealing with a Grafana-managed group, check if the evaluation interval is valid / permitted */}
|
||||
{isGrafanaManagedGroup && checkEvaluationIntervalGlobalLimit(watch('groupInterval')).exceedsLimit && (
|
||||
<EvaluationIntervalLimitExceeded />
|
||||
)}
|
||||
|
||||
|
@ -7,6 +7,7 @@ import { Icon, Tooltip, useStyles2 } from '@grafana/ui/src';
|
||||
|
||||
import { CombinedRule } from '../../../../../types/unified-alerting';
|
||||
import { checkEvaluationIntervalGlobalLimit } from '../../utils/config';
|
||||
import { isGrafanaRulerRule } from '../../utils/rules';
|
||||
|
||||
interface RuleConfigStatusProps {
|
||||
rule: CombinedRule;
|
||||
@ -14,11 +15,11 @@ interface RuleConfigStatusProps {
|
||||
|
||||
export function RuleConfigStatus({ rule }: RuleConfigStatusProps) {
|
||||
const styles = useStyles2(getStyles);
|
||||
const isGrafanaManagedRule = isGrafanaRulerRule(rule.rulerRule);
|
||||
|
||||
const { exceedsLimit } = useMemo(
|
||||
() => checkEvaluationIntervalGlobalLimit(rule.group.interval),
|
||||
[rule.group.interval]
|
||||
);
|
||||
const exceedsLimit = useMemo(() => {
|
||||
return isGrafanaManagedRule ? checkEvaluationIntervalGlobalLimit(rule.group.interval).exceedsLimit : false;
|
||||
}, [rule.group.interval, isGrafanaManagedRule]);
|
||||
|
||||
if (!exceedsLimit) {
|
||||
return null;
|
||||
|
Loading…
Reference in New Issue
Block a user