From 20453802239530ff826a4c42f2408dbbe45dd09b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 12 Nov 2014 11:58:04 +0100 Subject: [PATCH] Graph: moved graph and graph tooltip directive into panels/graph folder --- src/app/directives/all.js | 1 - .../grafanaGraph.js => panels/graph/graph.js} | 10 +++++++++- .../graph/graph.tooltip.js} | 0 src/app/panels/graph/module.js | 13 +++---------- .../specs/{grafanaGraph-specs.js => graph-specs.js} | 2 +- src/test/specs/graph-tooltip-specs.js | 2 +- src/test/test-main.js | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) rename src/app/{directives/grafanaGraph.js => panels/graph/graph.js} (98%) rename src/app/{directives/grafanaGraph.tooltip.js => panels/graph/graph.tooltip.js} (100%) rename src/test/specs/{grafanaGraph-specs.js => graph-specs.js} (99%) diff --git a/src/app/directives/all.js b/src/app/directives/all.js index 7f7836728a6..d75410f3d33 100644 --- a/src/app/directives/all.js +++ b/src/app/directives/all.js @@ -10,7 +10,6 @@ define([ './confirmClick', './configModal', './spectrumPicker', - './grafanaGraph', './bootstrap-tagsinput', './bodyClass', './addGraphiteFunc', diff --git a/src/app/directives/grafanaGraph.js b/src/app/panels/graph/graph.js similarity index 98% rename from src/app/directives/grafanaGraph.js rename to src/app/panels/graph/graph.js index fd58473a1d5..e0ddfc76402 100755 --- a/src/app/directives/grafanaGraph.js +++ b/src/app/panels/graph/graph.js @@ -4,7 +4,15 @@ define([ 'kbn', 'moment', 'lodash', - './grafanaGraph.tooltip' + './graph.tooltip', + 'jquery.flot', + 'jquery.flot.events', + 'jquery.flot.selection', + 'jquery.flot.time', + 'jquery.flot.stack', + 'jquery.flot.stackpercent', + 'jquery.flot.fillbelow', + 'jquery.flot.crosshair' ], function (angular, $, kbn, moment, _, GraphTooltip) { 'use strict'; diff --git a/src/app/directives/grafanaGraph.tooltip.js b/src/app/panels/graph/graph.tooltip.js similarity index 100% rename from src/app/directives/grafanaGraph.tooltip.js rename to src/app/panels/graph/graph.tooltip.js diff --git a/src/app/panels/graph/module.js b/src/app/panels/graph/module.js index 9af80bcf7e2..9e4ee0fd336 100644 --- a/src/app/panels/graph/module.js +++ b/src/app/panels/graph/module.js @@ -7,19 +7,12 @@ define([ 'moment', 'components/timeSeries', 'components/panelmeta', - './seriesOverridesCtrl', - './legend', 'services/panelSrv', 'services/annotationsSrv', 'services/datasourceSrv', - 'jquery.flot', - 'jquery.flot.events', - 'jquery.flot.selection', - 'jquery.flot.time', - 'jquery.flot.stack', - 'jquery.flot.stackpercent', - 'jquery.flot.fillbelow', - 'jquery.flot.crosshair' + './seriesOverridesCtrl', + './graph', + './legend', ], function (angular, app, $, _, kbn, moment, TimeSeries, PanelMeta) { 'use strict'; diff --git a/src/test/specs/grafanaGraph-specs.js b/src/test/specs/graph-specs.js similarity index 99% rename from src/test/specs/grafanaGraph-specs.js rename to src/test/specs/graph-specs.js index 5344917ab31..71c04084e91 100644 --- a/src/test/specs/grafanaGraph-specs.js +++ b/src/test/specs/graph-specs.js @@ -3,7 +3,7 @@ define([ 'angular', 'jquery', 'components/timeSeries', - 'directives/grafanaGraph' + 'panels/graph/graph' ], function(helpers, angular, $, TimeSeries) { 'use strict'; diff --git a/src/test/specs/graph-tooltip-specs.js b/src/test/specs/graph-tooltip-specs.js index 2277426bc81..6d1b9a40a58 100644 --- a/src/test/specs/graph-tooltip-specs.js +++ b/src/test/specs/graph-tooltip-specs.js @@ -1,6 +1,6 @@ define([ 'jquery', - 'directives/grafanaGraph.tooltip' + 'panels/graph/graph.tooltip' ], function($, GraphTooltip) { 'use strict'; diff --git a/src/test/test-main.js b/src/test/test-main.js index cab40157677..63d70182aa5 100644 --- a/src/test/test-main.js +++ b/src/test/test-main.js @@ -127,7 +127,7 @@ require([ 'specs/influxQueryBuilder-specs', 'specs/influxdb-datasource-specs', 'specs/graph-ctrl-specs', - 'specs/grafanaGraph-specs', + 'specs/graph-specs', 'specs/graph-tooltip-specs', 'specs/seriesOverridesCtrl-specs', 'specs/sharePanelCtrl-specs',