mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
set default value of httpMethod
This commit is contained in:
9
public/app/plugins/datasource/prometheus/config_ctrl.ts
Normal file
9
public/app/plugins/datasource/prometheus/config_ctrl.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export class PrometheusConfigCtrl {
|
||||
static templateUrl = 'public/app/plugins/datasource/prometheus/partials/config.html';
|
||||
current: any;
|
||||
|
||||
/** @ngInject */
|
||||
constructor($scope) {
|
||||
this.current.jsonData.httpMethod = this.current.jsonData.httpMethod || 'GET';
|
||||
}
|
||||
}
|
@@ -34,7 +34,7 @@ export class PrometheusDatasource {
|
||||
this.basicAuth = instanceSettings.basicAuth;
|
||||
this.withCredentials = instanceSettings.withCredentials;
|
||||
this.interval = instanceSettings.jsonData.timeInterval || '15s';
|
||||
this.httpMethod = instanceSettings.jsonData.httpMethod || 'GET';
|
||||
this.httpMethod = instanceSettings.jsonData.httpMethod;
|
||||
}
|
||||
|
||||
_request(method, url, data?, requestId?) {
|
||||
|
@@ -1,9 +1,6 @@
|
||||
import { PrometheusDatasource } from './datasource';
|
||||
import { PrometheusQueryCtrl } from './query_ctrl';
|
||||
|
||||
class PrometheusConfigCtrl {
|
||||
static templateUrl = 'partials/config.html';
|
||||
}
|
||||
import { PrometheusConfigCtrl } from './config_ctrl';
|
||||
|
||||
class PrometheusAnnotationsQueryCtrl {
|
||||
static templateUrl = 'partials/annotations.editor.html';
|
||||
|
Reference in New Issue
Block a user