Commit 36ebfc74 by Torkel Ödegaard

feat(plugins): more upgrading work

parent bc328cbe
define([
'angular',
'./bucket_agg',
'./metric_agg',
],
function (angular) {
'use strict';
var module = angular.module('grafana.directives');
module.directive('metricQueryEditorElasticsearch', function() {
return {controller: 'ElasticQueryCtrl', templateUrl: 'app/plugins/datasource/elasticsearch/partials/query.editor.html'};
});
module.directive('metricQueryOptionsElasticsearch', function() {
return {templateUrl: 'app/plugins/datasource/elasticsearch/partials/query.options.html'};
});
module.directive('annotationsQueryEditorElasticsearch', function() {
return {templateUrl: 'app/plugins/datasource/elasticsearch/partials/annotations.editor.html'};
});
module.directive('elastic', function() {
return {templateUrl: 'app/plugins/datasource/elasticsearch/partials/config.html'};
});
module.directive('elasticMetricAgg', function() {
return {
templateUrl: 'app/plugins/datasource/elasticsearch/partials/metric_agg.html',
controller: 'ElasticMetricAggCtrl',
restrict: 'E',
scope: {
target: "=",
index: "=",
onChange: "&",
getFields: "&",
esVersion: '='
}
};
});
module.directive('elasticBucketAgg', function() {
return {
templateUrl: 'app/plugins/datasource/elasticsearch/partials/bucket_agg.html',
controller: 'ElasticBucketAggCtrl',
restrict: 'E',
scope: {
target: "=",
index: "=",
onChange: "&",
getFields: "&",
}
};
});
});
define([
'angular'
],
function (angular) {
'use strict';
var module = angular.module('grafana.services');
module.factory('GrafanaDatasource', function($q, backendSrv) {
function GrafanaDatasource() {
}
GrafanaDatasource.prototype.query = function(options) {
return backendSrv.get('/api/metrics/test', {
from: options.range.from.valueOf(),
to: options.range.to.valueOf(),
maxDataPoints: options.maxDataPoints
});
};
GrafanaDatasource.prototype.metricFindQuery = function() {
return $q.when([]);
};
return GrafanaDatasource;
});
});
define([
'angular',
],
function (angular) {
'use strict';
var module = angular.module('grafana.directives');
module.directive('metricQueryEditorGrafana', function() {
return {templateUrl: 'app/plugins/datasource/grafana/partials/query.editor.html'};
});
});
...@@ -3,10 +3,8 @@ ...@@ -3,10 +3,8 @@
"name": "Grafana", "name": "Grafana",
"id": "grafana", "id": "grafana",
"builtIn": true, "module": "app/plugins/datasource/grafana/module",
"serviceName": "GrafanaDatasource",
"module": "app/plugins/datasource/grafana/datasource", "builtIn": true,
"metrics": true "metrics": true
} }
...@@ -30,8 +30,3 @@ class MixedDatasource { ...@@ -30,8 +30,3 @@ class MixedDatasource {
} }
export {MixedDatasource, MixedDatasource as Datasource} export {MixedDatasource, MixedDatasource as Datasource}
// var module = angular.module('grafana.services');
// module.factory('MixedDatasource', MixedDatasource);
//
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