mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix: don't allow editing rule types for existing rules (#47512)
This commit is contained in:
parent
b31c7d3654
commit
c530100d45
@ -38,12 +38,8 @@ export const AlertTypeStep: FC<Props> = ({ editingExistingRule }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<RuleEditorSection stepNo={1} title="Rule type">
|
<RuleEditorSection stepNo={1} title="Rule type">
|
||||||
<Field
|
{!editingExistingRule && (
|
||||||
disabled={editingExistingRule}
|
<Field error={errors.type?.message} invalid={!!errors.type?.message} data-testid="alert-type-picker">
|
||||||
error={errors.type?.message}
|
|
||||||
invalid={!!errors.type?.message}
|
|
||||||
data-testid="alert-type-picker"
|
|
||||||
>
|
|
||||||
<InputControl
|
<InputControl
|
||||||
render={({ field: { onChange } }) => (
|
render={({ field: { onChange } }) => (
|
||||||
<RuleTypePicker
|
<RuleTypePicker
|
||||||
@ -59,6 +55,7 @@ export const AlertTypeStep: FC<Props> = ({ editingExistingRule }) => {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Field>
|
</Field>
|
||||||
|
)}
|
||||||
|
|
||||||
<Field
|
<Field
|
||||||
className={styles.formInput}
|
className={styles.formInput}
|
||||||
|
Loading…
Reference in New Issue
Block a user