Commit a2335707 by Torkel Ödegaard

feat(plugins): upgraded opentsdb and prometheus to new plugin module return format

parent 6fae2642
...@@ -3,12 +3,5 @@ ...@@ -3,12 +3,5 @@
import angular from 'angular'; import angular from 'angular';
import {MixedDatasource} from './datasource'; import {MixedDatasource} from './datasource';
var module = angular.module('grafana.directives');
module.directive('metricQueryEditorMixed', function() {
return {templateUrl: 'app/plugins/datasource/mixed/partials/query.editor.html'};
});
export {MixedDatasource, MixedDatasource as Datasource}; export {MixedDatasource, MixedDatasource as Datasource};
define([ define([
'angular',
'./datasource', './datasource',
], ],
function (angular, OpenTsDatasource) { function (OpenTsDatasource) {
'use strict'; 'use strict';
var module = angular.module('grafana.directives'); function metricsQueryEditor() {
module.directive('metricQueryEditorOpentsdb', function() {
return { return {
controller: 'OpenTSDBQueryCtrl', controller: 'OpenTSDBQueryCtrl',
templateUrl: 'app/plugins/datasource/opentsdb/partials/query.editor.html', templateUrl: 'app/plugins/datasource/opentsdb/partials/query.editor.html',
}; };
}); }
module.directive('datasourceCustomSettingsViewOpentsdb', function() { function configView() {
return {templateUrl: 'app/plugins/datasource/opentsdb/partials/config.html'}; return {templateUrl: 'app/plugins/datasource/opentsdb/partials/config.html'};
}); }
return { return {
Datasource: OpenTsDatasource Datasource: OpenTsDatasource,
metricsQueryEditor: metricsQueryEditor,
configView: configView,
}; };
}); });
define([ define([
'angular',
'./datasource', './datasource',
], ],
function (angular, PromDatasource) { function (PromDatasource) {
'use strict'; 'use strict';
var module = angular.module('grafana.directives'); function metricsQueryEditor() {
module.directive('metricQueryEditorPrometheus', function() {
return {controller: 'PrometheusQueryCtrl', templateUrl: 'app/plugins/datasource/prometheus/partials/query.editor.html'}; return {controller: 'PrometheusQueryCtrl', templateUrl: 'app/plugins/datasource/prometheus/partials/query.editor.html'};
}); }
module.directive('datasourceCustomSettingsViewPrometheus', function() { function configView() {
return {templateUrl: 'app/plugins/datasource/prometheus/partials/config.html'}; return {templateUrl: 'app/plugins/datasource/prometheus/partials/config.html'};
}); }
return { return {
Datasource: PromDatasource Datasource: PromDatasource,
metricsQueryEditor: metricsQueryEditor,
configView: configView,
}; };
}); });
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
"property-declaration": "nospace", "property-declaration": "nospace",
"variable-declaration": "nospace" "variable-declaration": "nospace"
}], }],
"variable-name": false, "variable-name": [true, "ban-keywords"],
"whitespace": [true, "whitespace": [true,
"check-branch", "check-branch",
"check-decl", "check-decl",
......
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