mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
moved all graphite code into features/graphite
This commit is contained in:
parent
599a77c776
commit
0a4ccdcef2
@ -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';
|
||||
|
@ -1,3 +1,4 @@
|
||||
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',
|
||||
|
@ -1,5 +1,5 @@
|
||||
define([
|
||||
'services/graphite/gfunc'
|
||||
'features/graphite/gfunc'
|
||||
], function(gfunc) {
|
||||
'use strict';
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
define([
|
||||
'helpers',
|
||||
'services/graphite/graphiteDatasource'
|
||||
'features/graphite/datasource'
|
||||
], function(helpers) {
|
||||
'use strict';
|
||||
|
||||
|
@ -1,16 +1,16 @@
|
||||
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 = {
|
||||
|
@ -1,5 +1,5 @@
|
||||
define([
|
||||
'services/graphite/lexer'
|
||||
'features/graphite/lexer'
|
||||
], function(Lexer) {
|
||||
'use strict';
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
define([
|
||||
'services/graphite/parser'
|
||||
'features/graphite/parser'
|
||||
], function(Parser) {
|
||||
'use strict';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user