mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: hide "silence" button for external AM setups (#62133)
This commit is contained in:
@@ -148,8 +148,15 @@ func (srv ConfigSrv) RouteGetAlertingStatus(c *contextmodel.ReqContext) response
|
||||
sendsAlertsTo = cfg.SendAlertsTo
|
||||
}
|
||||
|
||||
// handle errors
|
||||
externalAlertManagers, err := srv.externalAlertmanagers(c.Req.Context(), c.OrgID)
|
||||
if err != nil {
|
||||
return ErrResp(http.StatusInternalServerError, err, "")
|
||||
}
|
||||
|
||||
resp := apimodels.AlertingStatus{
|
||||
AlertmanagersChoice: apimodels.AlertmanagersChoice(sendsAlertsTo.String()),
|
||||
AlertmanagersChoice: apimodels.AlertmanagersChoice(sendsAlertsTo.String()),
|
||||
NumExternalAlertmanagers: len(externalAlertManagers),
|
||||
}
|
||||
return response.JSON(http.StatusOK, resp)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user