Commit 4e1501b1 by Mitsuhiro Tanda

set default value of httpMethod

parent a83ede01
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 { ...@@ -34,7 +34,7 @@ export class PrometheusDatasource {
this.basicAuth = instanceSettings.basicAuth; this.basicAuth = instanceSettings.basicAuth;
this.withCredentials = instanceSettings.withCredentials; this.withCredentials = instanceSettings.withCredentials;
this.interval = instanceSettings.jsonData.timeInterval || '15s'; this.interval = instanceSettings.jsonData.timeInterval || '15s';
this.httpMethod = instanceSettings.jsonData.httpMethod || 'GET'; this.httpMethod = instanceSettings.jsonData.httpMethod;
} }
_request(method, url, data?, requestId?) { _request(method, url, data?, requestId?) {
......
import { PrometheusDatasource } from './datasource'; import { PrometheusDatasource } from './datasource';
import { PrometheusQueryCtrl } from './query_ctrl'; import { PrometheusQueryCtrl } from './query_ctrl';
import { PrometheusConfigCtrl } from './config_ctrl';
class PrometheusConfigCtrl {
static templateUrl = 'partials/config.html';
}
class PrometheusAnnotationsQueryCtrl { class PrometheusAnnotationsQueryCtrl {
static templateUrl = 'partials/annotations.editor.html'; static templateUrl = 'partials/annotations.editor.html';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment