From 056ff9cf3237aa091607489ca31f34a5625676e3 Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Fri, 8 Apr 2022 09:45:42 -0400 Subject: [PATCH] fix: don't allow editing rule types for existing rules (#47512) (#47516) (cherry picked from commit c530100d45a7235acc773c43970e8a5d99faede7) Co-authored-by: Gilles De Mey --- .../components/rule-editor/AlertTypeStep.tsx | 39 +++++++++---------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/public/app/features/alerting/unified/components/rule-editor/AlertTypeStep.tsx b/public/app/features/alerting/unified/components/rule-editor/AlertTypeStep.tsx index aa2179f2265..b06e7e2497c 100644 --- a/public/app/features/alerting/unified/components/rule-editor/AlertTypeStep.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/AlertTypeStep.tsx @@ -38,27 +38,24 @@ export const AlertTypeStep: FC = ({ editingExistingRule }) => { return ( - - ( - - )} - name="type" - control={control} - rules={{ - required: { value: true, message: 'Please select alert type' }, - }} - /> - + {!editingExistingRule && ( + + ( + + )} + name="type" + control={control} + rules={{ + required: { value: true, message: 'Please select alert type' }, + }} + /> + + )}