Skip to content

Commit

Permalink
Merge pull request #42 from logzio/DEV-42328-grafana-alert-creation-h…
Browse files Browse the repository at this point in the history
…andle-no-data-error-states-better

DEV-42328 Change grafana alert default error state field
  • Loading branch information
copyhold authored Dec 3, 2023
2 parents a7a1d57 + d13d523 commit f920d18
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,12 @@ export const GrafanaConditionsStep: FC = () => {
>
Evaluate every
</InlineLabel>
<Input readOnly={true /* // LOGZ.IO Changes*/} id={evaluateEveryId} width={8} {...register('evaluateEvery', evaluateEveryValidationOptions)} />
<Input
readOnly={true /* // LOGZ.IO Changes*/}
id={evaluateEveryId}
width={8}
{...register('evaluateEvery', evaluateEveryValidationOptions)}
/>
<InlineLabel
htmlFor={evaluateForId}
width={7}
Expand Down Expand Up @@ -119,6 +124,8 @@ export const GrafanaConditionsStep: FC = () => {
render={({ field: { onChange, ref, ...field } }) => (
<GrafanaAlertStatePicker
{...field}
// LOGZ.IO GRAFANA CHANGE :: disable edit of error state handling
disabled
inputId="exec-err-state-input"
width={42}
includeNoData={false}
Expand Down
2 changes: 1 addition & 1 deletion public/app/features/alerting/unified/utils/rule-form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const getDefaultFormValues = (): RuleFormValues => {
queries: [],
condition: '',
noDataState: GrafanaAlertStateDecision.NoData,
execErrState: GrafanaAlertStateDecision.Alerting,
execErrState: GrafanaAlertStateDecision.OK, // LOGZ.IO GRAFANA CHANGE :: make error query error state OK by default
evaluateEvery: '1m',
evaluateFor: '5m',

Expand Down

0 comments on commit f920d18

Please sign in to comment.