Skip to content

Commit

Permalink
Hide edit/delete for default contact point
Browse files Browse the repository at this point in the history
  • Loading branch information
copyhold committed Nov 9, 2023
1 parent acaa2b2 commit 378e30b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export const ReceiversTable: FC<Props> = ({ config, alertManagerName }) => {
setReceiverToDelete(undefined);
};

const defaultContactPoint = config.alertmanager_config.route?.receiver;// LOGZ.IO GRAFANA CHANGE
const rows = useMemo(
() =>
config.alertmanager_config.receivers?.map((receiver) => ({
Expand Down Expand Up @@ -119,7 +120,7 @@ export const ReceiversTable: FC<Props> = ({ config, alertManagerName }) => {
<td className={tableStyles.actionsCell}>
{
// prettier-ignore
!isVanillaAM && !receiver.logzioSettings && ( // LOGZ.IO GRAFANA CHANGE
!isVanillaAM && !receiver.logzioSettings && defaultContactPoint !== receiver.name && ( // LOGZ.IO GRAFANA CHANGE
<>
<Authorize actions={[permissions.update]}>
<ActionIcon
Expand Down

0 comments on commit 378e30b

Please sign in to comment.