diff --git a/src/app/controllers/all.js b/src/app/controllers/all.js index 0765b82d1aa..09cce803f55 100644 --- a/src/app/controllers/all.js +++ b/src/app/controllers/all.js @@ -8,7 +8,6 @@ define([ './search', './metricKeys', './graphiteImport', - './influxTargetCtrl', './playlistCtrl', './inspectCtrl', './opentsdbTargetCtrl', diff --git a/src/app/directives/all.js b/src/app/directives/all.js index d75410f3d33..879b61e2512 100644 --- a/src/app/directives/all.js +++ b/src/app/directives/all.js @@ -12,11 +12,8 @@ define([ './spectrumPicker', './bootstrap-tagsinput', './bodyClass', - './addGraphiteFunc', - './graphiteFuncEditor', './templateParamSelector', './graphiteSegment', './grafanaVersionCheck', './dropdown.typeahead', - './influxdbFuncEditor' ], function () {}); diff --git a/src/app/features/all.js b/src/app/features/all.js index 64ae3fdf794..93d986b90d4 100644 --- a/src/app/features/all.js +++ b/src/app/features/all.js @@ -1,4 +1,5 @@ define([ './panellinkeditor/module', './graphite/datasource', + './influxdb/datasource', ], function () {}); diff --git a/src/app/directives/addGraphiteFunc.js b/src/app/features/graphite/addGraphiteFunc.js similarity index 98% rename from src/app/directives/addGraphiteFunc.js rename to src/app/features/graphite/addGraphiteFunc.js index cf2d5069962..5ea45618ce1 100644 --- a/src/app/directives/addGraphiteFunc.js +++ b/src/app/features/graphite/addGraphiteFunc.js @@ -3,7 +3,7 @@ define([ 'app', 'lodash', 'jquery', - '../features/graphite/gfunc', + './gfunc', ], function (angular, app, _, $, gfunc) { 'use strict'; diff --git a/src/app/features/graphite/datasource.js b/src/app/features/graphite/datasource.js index 1041703d0fc..74fc47cd7a5 100644 --- a/src/app/features/graphite/datasource.js +++ b/src/app/features/graphite/datasource.js @@ -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) { diff --git a/src/app/directives/graphiteFuncEditor.js b/src/app/features/graphite/funcEditor.js similarity index 100% rename from src/app/directives/graphiteFuncEditor.js rename to src/app/features/graphite/funcEditor.js diff --git a/src/app/services/influxdb/influxdbDatasource.js b/src/app/features/influxdb/datasource.js similarity index 98% rename from src/app/services/influxdb/influxdbDatasource.js rename to src/app/features/influxdb/datasource.js index c30f950e51b..dc542ec3cfd 100644 --- a/src/app/services/influxdb/influxdbDatasource.js +++ b/src/app/features/influxdb/datasource.js @@ -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) { diff --git a/src/app/directives/influxdbFuncEditor.js b/src/app/features/influxdb/funcEditor.js similarity index 100% rename from src/app/directives/influxdbFuncEditor.js rename to src/app/features/influxdb/funcEditor.js diff --git a/src/app/services/influxdb/influxSeries.js b/src/app/features/influxdb/influxSeries.js similarity index 100% rename from src/app/services/influxdb/influxSeries.js rename to src/app/features/influxdb/influxSeries.js diff --git a/src/app/partials/influxdb/annotation_editor.html b/src/app/features/influxdb/partials/annotations.editor.html similarity index 100% rename from src/app/partials/influxdb/annotation_editor.html rename to src/app/features/influxdb/partials/annotations.editor.html diff --git a/src/app/partials/influxdb/editor.html b/src/app/features/influxdb/partials/query.editor.html similarity index 99% rename from src/app/partials/influxdb/editor.html rename to src/app/features/influxdb/partials/query.editor.html index 7fe41c1d268..44d19c80d89 100644 --- a/src/app/partials/influxdb/editor.html +++ b/src/app/features/influxdb/partials/query.editor.html @@ -3,7 +3,7 @@