mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
restructuring
This commit is contained in:
parent
0a4ccdcef2
commit
f9b0a01c74
@ -8,7 +8,6 @@ define([
|
||||
'./search',
|
||||
'./metricKeys',
|
||||
'./graphiteImport',
|
||||
'./influxTargetCtrl',
|
||||
'./playlistCtrl',
|
||||
'./inspectCtrl',
|
||||
'./opentsdbTargetCtrl',
|
||||
|
@ -12,11 +12,8 @@ define([
|
||||
'./spectrumPicker',
|
||||
'./bootstrap-tagsinput',
|
||||
'./bodyClass',
|
||||
'./addGraphiteFunc',
|
||||
'./graphiteFuncEditor',
|
||||
'./templateParamSelector',
|
||||
'./graphiteSegment',
|
||||
'./grafanaVersionCheck',
|
||||
'./dropdown.typeahead',
|
||||
'./influxdbFuncEditor'
|
||||
], function () {});
|
||||
|
@ -1,4 +1,5 @@
|
||||
define([
|
||||
'./panellinkeditor/module',
|
||||
'./graphite/datasource',
|
||||
'./influxdb/datasource',
|
||||
], function () {});
|
||||
|
@ -3,7 +3,7 @@ define([
|
||||
'app',
|
||||
'lodash',
|
||||
'jquery',
|
||||
'../features/graphite/gfunc',
|
||||
'./gfunc',
|
||||
],
|
||||
function (angular, app, _, $, gfunc) {
|
||||
'use strict';
|
@ -6,6 +6,8 @@ define([
|
||||
'kbn',
|
||||
'moment',
|
||||
'./queryCtrl',
|
||||
'./funcEditor',
|
||||
'./addGraphiteFunc',
|
||||
],
|
||||
function (angular, _, $, config, kbn, moment) {
|
||||
'use strict';
|
||||
@ -18,14 +20,15 @@ function (angular, _, $, config, kbn, moment) {
|
||||
this.type = 'graphite';
|
||||
this.basicAuth = datasource.basicAuth;
|
||||
this.url = datasource.url;
|
||||
this.editorSrc = 'app/features/graphite/partials/query.editor.html';
|
||||
this.name = datasource.name;
|
||||
this.render_method = datasource.render_method || 'POST';
|
||||
this.supportAnnotations = true;
|
||||
this.supportMetrics = true;
|
||||
this.annotationEditorSrc = 'app/features/graphite/partials/annotation.editor.html';
|
||||
this.cacheTimeout = datasource.cacheTimeout;
|
||||
this.withCredentials = datasource.withCredentials;
|
||||
this.render_method = datasource.render_method || 'POST';
|
||||
|
||||
this.supportAnnotations = true;
|
||||
this.supportMetrics = true;
|
||||
this.editorSrc = 'app/features/graphite/partials/query.editor.html';
|
||||
this.annotationEditorSrc = 'app/features/graphite/partials/annotation.editor.html';
|
||||
}
|
||||
|
||||
GraphiteDatasource.prototype.query = function(options) {
|
||||
|
@ -3,7 +3,9 @@ define([
|
||||
'lodash',
|
||||
'kbn',
|
||||
'./influxSeries',
|
||||
'./influxQueryBuilder'
|
||||
'./queryBuilder',
|
||||
'./queryCtrl',
|
||||
'./funcEditor',
|
||||
],
|
||||
function (angular, _, kbn, InfluxSeries, InfluxQueryBuilder) {
|
||||
'use strict';
|
||||
@ -14,20 +16,20 @@ function (angular, _, kbn, InfluxSeries, InfluxQueryBuilder) {
|
||||
|
||||
function InfluxDatasource(datasource) {
|
||||
this.type = 'influxDB';
|
||||
this.editorSrc = 'app/partials/influxdb/editor.html';
|
||||
this.urls = datasource.urls;
|
||||
this.username = datasource.username;
|
||||
this.password = datasource.password;
|
||||
this.name = datasource.name;
|
||||
this.basicAuth = datasource.basicAuth;
|
||||
this.grafanaDB = datasource.grafanaDB;
|
||||
|
||||
this.saveTemp = _.isUndefined(datasource.save_temp) ? true : datasource.save_temp;
|
||||
this.saveTempTTL = _.isUndefined(datasource.save_temp_ttl) ? '30d' : datasource.save_temp_ttl;
|
||||
|
||||
this.grafanaDB = datasource.grafanaDB;
|
||||
this.supportAnnotations = true;
|
||||
this.supportMetrics = true;
|
||||
this.annotationEditorSrc = 'app/partials/influxdb/annotation_editor.html';
|
||||
this.editorSrc = 'app/features/influxdb/partials/query.editor.html';
|
||||
this.annotationEditorSrc = 'app/features/influxdb/partials/annotations.editor.html';
|
||||
}
|
||||
|
||||
InfluxDatasource.prototype.query = function(options) {
|
@ -3,7 +3,7 @@
|
||||
<div ng-repeat="target in panel.targets"
|
||||
class="grafana-target"
|
||||
ng-class="{'grafana-target-hidden': target.hide}"
|
||||
ng-controller="InfluxTargetCtrl"
|
||||
ng-controller="InfluxQueryCtrl"
|
||||
ng-init="init()">
|
||||
|
||||
<div class="grafana-target-inner-wrapper">
|
@ -9,7 +9,7 @@ function (angular, _) {
|
||||
|
||||
var seriesList = null;
|
||||
|
||||
module.controller('InfluxTargetCtrl', function($scope, $timeout) {
|
||||
module.controller('InfluxQueryCtrl', function($scope, $timeout) {
|
||||
|
||||
$scope.init = function() {
|
||||
var target = $scope.target;
|
@ -2,7 +2,6 @@ define([
|
||||
'angular',
|
||||
'lodash',
|
||||
'config',
|
||||
'./influxdb/influxdbDatasource',
|
||||
'./opentsdb/opentsdbDatasource',
|
||||
'./elasticsearch/es-datasource',
|
||||
],
|
||||
|
@ -1,5 +1,5 @@
|
||||
define([
|
||||
'services/influxdb/influxQueryBuilder'
|
||||
'features/influxdb/queryBuilder'
|
||||
], function(InfluxQueryBuilder) {
|
||||
'use strict';
|
||||
|
||||
@ -68,7 +68,7 @@ define([
|
||||
var query = builder.build();
|
||||
|
||||
expect(query).to.be('select mean(value) from "merge.google.test" where $timeFilter ' +
|
||||
'group by time($interval) order asc');
|
||||
'group by time($interval) order asc');
|
||||
});
|
||||
|
||||
});
|
||||
|
@ -1,5 +1,5 @@
|
||||
define([
|
||||
'services/influxdb/influxSeries'
|
||||
'features/influxdb/influxSeries'
|
||||
], function(InfluxSeries) {
|
||||
'use strict';
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
define([
|
||||
'helpers',
|
||||
'services/influxdb/influxdbDatasource'
|
||||
'features/influxdb/datasource'
|
||||
], function(helpers) {
|
||||
'use strict';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user