moved all graphite code into features/graphite

This commit is contained in:
Torkel Ödegaard 2014-12-30 20:49:04 +01:00
parent 599a77c776
commit 0a4ccdcef2
16 changed files with 18 additions and 18 deletions

View File

@ -7,7 +7,6 @@ define([
'./pulldown', './pulldown',
'./search', './search',
'./metricKeys', './metricKeys',
'./graphiteTarget',
'./graphiteImport', './graphiteImport',
'./influxTargetCtrl', './influxTargetCtrl',
'./playlistCtrl', './playlistCtrl',

View File

@ -3,7 +3,7 @@ define([
'app', 'app',
'lodash', 'lodash',
'jquery', 'jquery',
'../services/graphite/gfunc', '../features/graphite/gfunc',
], ],
function (angular, app, _, $, gfunc) { function (angular, app, _, $, gfunc) {
'use strict'; 'use strict';

View File

@ -1,3 +1,4 @@
define([ define([
'./panellinkeditor/module', './panellinkeditor/module',
'./graphite/datasource',
], function () {}); ], function () {});

View File

@ -4,7 +4,8 @@ define([
'jquery', 'jquery',
'config', 'config',
'kbn', 'kbn',
'moment' 'moment',
'./queryCtrl',
], ],
function (angular, _, $, config, kbn, moment) { function (angular, _, $, config, kbn, moment) {
'use strict'; 'use strict';
@ -17,12 +18,12 @@ function (angular, _, $, config, kbn, moment) {
this.type = 'graphite'; this.type = 'graphite';
this.basicAuth = datasource.basicAuth; this.basicAuth = datasource.basicAuth;
this.url = datasource.url; 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.name = datasource.name;
this.render_method = datasource.render_method || 'POST'; this.render_method = datasource.render_method || 'POST';
this.supportAnnotations = true; this.supportAnnotations = true;
this.supportMetrics = 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.cacheTimeout = datasource.cacheTimeout;
this.withCredentials = datasource.withCredentials; this.withCredentials = datasource.withCredentials;
} }

View File

@ -3,7 +3,7 @@
<div ng-repeat="target in panel.targets" <div ng-repeat="target in panel.targets"
class="grafana-target" class="grafana-target"
ng-class="{'grafana-target-hidden': target.hide}" ng-class="{'grafana-target-hidden': target.hide}"
ng-controller="GraphiteTargetCtrl" ng-controller="GraphiteQueryCtrl"
ng-init="init()"> ng-init="init()">
<div class="grafana-target-inner"> <div class="grafana-target-inner">

View File

@ -2,8 +2,8 @@ define([
'angular', 'angular',
'lodash', 'lodash',
'config', 'config',
'../services/graphite/gfunc', './gfunc',
'../services/graphite/parser' './parser'
], ],
function (angular, _, config, gfunc, Parser) { function (angular, _, config, gfunc, Parser) {
'use strict'; 'use strict';
@ -11,7 +11,7 @@ function (angular, _, config, gfunc, Parser) {
var module = angular.module('grafana.controllers'); var module = angular.module('grafana.controllers');
var targetLetters = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O']; 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.init = function() {
$scope.target.target = $scope.target.target || ''; $scope.target.target = $scope.target.target || '';

View File

@ -2,7 +2,6 @@ define([
'angular', 'angular',
'lodash', 'lodash',
'config', 'config',
'./graphite/graphiteDatasource',
'./influxdb/influxdbDatasource', './influxdb/influxdbDatasource',
'./opentsdb/opentsdbDatasource', './opentsdb/opentsdbDatasource',
'./elasticsearch/es-datasource', './elasticsearch/es-datasource',

View File

@ -1,5 +1,5 @@
define([ define([
'services/graphite/gfunc' 'features/graphite/gfunc'
], function(gfunc) { ], function(gfunc) {
'use strict'; 'use strict';

View File

@ -1,6 +1,6 @@
define([ define([
'helpers', 'helpers',
'services/graphite/graphiteDatasource' 'features/graphite/datasource'
], function(helpers) { ], function(helpers) {
'use strict'; 'use strict';

View File

@ -1,16 +1,16 @@
define([ define([
'helpers', 'helpers',
'services/graphite/gfunc', 'features/graphite/gfunc',
'controllers/graphiteTarget' 'features/graphite/queryCtrl'
], function(helpers, gfunc) { ], function(helpers, gfunc) {
'use strict'; 'use strict';
describe('GraphiteTargetCtrl', function() { describe('GraphiteQueryCtrl', function() {
var ctx = new helpers.ControllerTestContext(); var ctx = new helpers.ControllerTestContext();
beforeEach(module('grafana.controllers')); beforeEach(module('grafana.controllers'));
beforeEach(ctx.providePhase()); beforeEach(ctx.providePhase());
beforeEach(ctx.createControllerPhase('GraphiteTargetCtrl')); beforeEach(ctx.createControllerPhase('GraphiteQueryCtrl'));
beforeEach(function() { beforeEach(function() {
ctx.scope.target = { ctx.scope.target = {

View File

@ -1,5 +1,5 @@
define([ define([
'services/graphite/lexer' 'features/graphite/lexer'
], function(Lexer) { ], function(Lexer) {
'use strict'; 'use strict';

View File

@ -1,5 +1,5 @@
define([ define([
'services/graphite/parser' 'features/graphite/parser'
], function(Parser) { ], function(Parser) {
'use strict'; 'use strict';