Skip to content

Commit 9cd5177

Browse files
committed
Merge branch 'master' of github.com:grafana/grafana
2 parents 8c30bab + a73424d commit 9cd5177

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

pkg/api/dataproxy.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,22 @@ func ProxyDataSourceRequest(c *middleware.Context) {
104104
}
105105

106106
proxyPath := c.Params("*")
107+
108+
if ds.Type == m.DS_ES {
109+
if c.Req.Request.Method == "DELETE" {
110+
c.JsonApiErr(403, "Deletes not allowed on proxied Elasticsearch datasource", nil)
111+
return
112+
}
113+
if c.Req.Request.Method == "PUT" {
114+
c.JsonApiErr(403, "Puts not allowed on proxied Elasticsearch datasource", nil)
115+
return
116+
}
117+
if c.Req.Request.Method == "POST" && proxyPath != "_msearch" {
118+
c.JsonApiErr(403, "Posts not allowed on proxied Elasticsearch datasource except on /_msearch", nil)
119+
return
120+
}
121+
}
122+
107123
proxy := NewReverseProxy(ds, proxyPath, targetUrl)
108124
proxy.Transport = dataProxyTransport
109125
proxy.ServeHTTP(c.Resp, c.Req.Request)

public/app/features/alerting/alert_tab_ctrl.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,11 @@ export class AlertTabCtrl {
128128
return;
129129
}
130130

131-
this.alertNotifications.push({name: model.name, iconClass: this.getNotificationIcon(model.type)});
131+
this.alertNotifications.push({
132+
name: model.name,
133+
iconClass: this.getNotificationIcon(model.type),
134+
isDefault: false
135+
});
132136
this.alert.notifications.push({id: model.id});
133137

134138
// reset plus button

0 commit comments

Comments
 (0)