Commit 0a4ccdce by Torkel Ödegaard

moved all graphite code into features/graphite

parent 599a77c7
......@@ -7,7 +7,6 @@ define([
'./pulldown',
'./search',
'./metricKeys',
'./graphiteTarget',
'./graphiteImport',
'./influxTargetCtrl',
'./playlistCtrl',
......
......@@ -3,7 +3,7 @@ define([
'app',
'lodash',
'jquery',
'../services/graphite/gfunc',
'../features/graphite/gfunc',
],
function (angular, app, _, $, gfunc) {
'use strict';
......
define([
'./panellinkeditor/module',
'./graphite/datasource',
], function () {});
......@@ -4,7 +4,8 @@ define([
'jquery',
'config',
'kbn',
'moment'
'moment',
'./queryCtrl',
],
function (angular, _, $, config, kbn, moment) {
'use strict';
......@@ -17,12 +18,12 @@ function (angular, _, $, config, kbn, moment) {
this.type = 'graphite';
this.basicAuth = datasource.basicAuth;
this.url = datasource.url;
this.editorSrc = 'app/partials/graphite/editor.html';
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/partials/graphite/annotation_editor.html';
this.annotationEditorSrc = 'app/features/graphite/partials/annotation.editor.html';
this.cacheTimeout = datasource.cacheTimeout;
this.withCredentials = datasource.withCredentials;
}
......
......@@ -3,7 +3,7 @@
<div ng-repeat="target in panel.targets"
class="grafana-target"
ng-class="{'grafana-target-hidden': target.hide}"
ng-controller="GraphiteTargetCtrl"
ng-controller="GraphiteQueryCtrl"
ng-init="init()">
<div class="grafana-target-inner">
......
......@@ -2,8 +2,8 @@ define([
'angular',
'lodash',
'config',
'../services/graphite/gfunc',
'../services/graphite/parser'
'./gfunc',
'./parser'
],
function (angular, _, config, gfunc, Parser) {
'use strict';
......@@ -11,7 +11,7 @@ function (angular, _, config, gfunc, Parser) {
var module = angular.module('grafana.controllers');
var targetLetters = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O'];
module.controller('GraphiteTargetCtrl', function($scope, $sce, templateSrv) {
module.controller('GraphiteQueryCtrl', function($scope, $sce, templateSrv) {
$scope.init = function() {
$scope.target.target = $scope.target.target || '';
......
......@@ -2,7 +2,6 @@ define([
'angular',
'lodash',
'config',
'./graphite/graphiteDatasource',
'./influxdb/influxdbDatasource',
'./opentsdb/opentsdbDatasource',
'./elasticsearch/es-datasource',
......
define([
'services/graphite/gfunc'
'features/graphite/gfunc'
], function(gfunc) {
'use strict';
......
define([
'helpers',
'services/graphite/graphiteDatasource'
'features/graphite/datasource'
], function(helpers) {
'use strict';
......
define([
'helpers',
'services/graphite/gfunc',
'controllers/graphiteTarget'
'features/graphite/gfunc',
'features/graphite/queryCtrl'
], function(helpers, gfunc) {
'use strict';
describe('GraphiteTargetCtrl', function() {
describe('GraphiteQueryCtrl', function() {
var ctx = new helpers.ControllerTestContext();
beforeEach(module('grafana.controllers'));
beforeEach(ctx.providePhase());
beforeEach(ctx.createControllerPhase('GraphiteTargetCtrl'));
beforeEach(ctx.createControllerPhase('GraphiteQueryCtrl'));
beforeEach(function() {
ctx.scope.target = {
......
define([
'services/graphite/lexer'
'features/graphite/lexer'
], function(Lexer) {
'use strict';
......
define([
'services/graphite/parser'
'features/graphite/parser'
], function(Parser) {
'use strict';
......
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