File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
public/app/features/alerting Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,22 @@ func ProxyDataSourceRequest(c *middleware.Context) {
104
104
}
105
105
106
106
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
+
107
123
proxy := NewReverseProxy (ds , proxyPath , targetUrl )
108
124
proxy .Transport = dataProxyTransport
109
125
proxy .ServeHTTP (c .Resp , c .Req .Request )
Original file line number Diff line number Diff line change @@ -128,7 +128,11 @@ export class AlertTabCtrl {
128
128
return ;
129
129
}
130
130
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
+ } ) ;
132
136
this . alert . notifications . push ( { id : model . id } ) ;
133
137
134
138
// reset plus button
You can’t perform that action at this time.
0 commit comments