From eb37c3d13d2d9d43ec02ad59544c68b156765a68 Mon Sep 17 00:00:00 2001 From: Ildar Iskhakov Date: Wed, 8 Mar 2023 18:52:34 +0800 Subject: [PATCH] Hide edit button for default route (#1485) # What this PR does ## Which issue(s) this PR fixes ## Checklist - [ ] Tests updated - [ ] Documentation added - [ ] `CHANGELOG.md` updated --- .../src/containers/AlertRules/AlertRules.tsx | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/grafana-plugin/src/containers/AlertRules/AlertRules.tsx b/grafana-plugin/src/containers/AlertRules/AlertRules.tsx index ac92a069..d0eaa920 100644 --- a/grafana-plugin/src/containers/AlertRules/AlertRules.tsx +++ b/grafana-plugin/src/containers/AlertRules/AlertRules.tsx @@ -664,20 +664,22 @@ class AlertRules extends React.Component { /> )} - - { - event.stopPropagation(); - this.setState({ - channelFilterToEdit: channelFilter, - }); - }} - tooltip="Edit" - tooltipPlacement="top" - /> - + {!channelFilter.is_default && ( + + { + event.stopPropagation(); + this.setState({ + channelFilterToEdit: channelFilter, + }); + }} + tooltip="Edit" + tooltipPlacement="top" + /> + + )}