Browse Source

moved dashboard stuff into a feature folder, not sure about this, but need better structure and better way to organize dependencies

Torkel Ödegaard 11 years ago
parent
commit
39f3cfc1eb

+ 0 - 6
src/app/controllers/all.js

@@ -1,15 +1,9 @@
 define([
 define([
   './grafanaCtrl',
   './grafanaCtrl',
-  './dashboardCtrl',
-  './dashboardNavCtrl',
-  './row',
-  './submenuCtrl',
   './pulldown',
   './pulldown',
   './search',
   './search',
   './metricKeys',
   './metricKeys',
   './graphiteImport',
   './graphiteImport',
-  './playlistCtrl',
   './inspectCtrl',
   './inspectCtrl',
-  './sharePanelCtrl',
   './jsonEditorCtrl',
   './jsonEditorCtrl',
 ], function () {});
 ], function () {});

+ 1 - 0
src/app/features/all.js

@@ -6,4 +6,5 @@ define([
   './influxdb/datasource',
   './influxdb/datasource',
   './opentsdb/datasource',
   './opentsdb/datasource',
   './elasticsearch/datasource',
   './elasticsearch/datasource',
+  './dashboard/all',
 ], function () {});
 ], function () {});

+ 14 - 0
src/app/features/dashboard/all.js

@@ -0,0 +1,14 @@
+define([
+  './dashboardCtrl',
+  './dashboardNavCtrl',
+  './playlistCtrl',
+  './rowCtrl',
+  './sharePanelCtrl',
+  './submenuCtrl',
+  './dashboardSrv',
+  './keybindings',
+  './viewStateSrv',
+  './playlistSrv',
+  './panelSrv',
+  './timeSrv',
+], function () {});

+ 0 - 0
src/app/controllers/dashboardCtrl.js → src/app/features/dashboard/dashboardCtrl.js


+ 0 - 0
src/app/controllers/dashboardNavCtrl.js → src/app/features/dashboard/dashboardNavCtrl.js


+ 0 - 1
src/app/services/dashboard/dashboardSrv.js → src/app/features/dashboard/dashboardSrv.js

@@ -4,7 +4,6 @@ define([
   'kbn',
   'kbn',
   'lodash',
   'lodash',
   'moment',
   'moment',
-  '../timer',
 ],
 ],
 function (angular, $, kbn, _, moment) {
 function (angular, $, kbn, _, moment) {
   'use strict';
   'use strict';

+ 0 - 0
src/app/services/dashboard/dashboardKeyBindings.js → src/app/features/dashboard/keybindings.js


+ 0 - 0
src/app/services/panelSrv.js → src/app/features/dashboard/panelSrv.js


+ 0 - 0
src/app/controllers/playlistCtrl.js → src/app/features/dashboard/playlistCtrl.js


+ 0 - 0
src/app/services/playlistSrv.js → src/app/features/dashboard/playlistSrv.js


+ 0 - 0
src/app/controllers/row.js → src/app/features/dashboard/rowCtrl.js


+ 0 - 0
src/app/controllers/sharePanelCtrl.js → src/app/features/dashboard/sharePanelCtrl.js


+ 0 - 0
src/app/controllers/submenuCtrl.js → src/app/features/dashboard/submenuCtrl.js


+ 0 - 0
src/app/services/timeSrv.js → src/app/features/dashboard/timeSrv.js


+ 0 - 0
src/app/services/unsavedChangesSrv.js → src/app/features/dashboard/unsavedChangesSrv.js


+ 0 - 0
src/app/services/dashboard/dashboardViewStateSrv.js → src/app/features/dashboard/viewStateSrv.js


+ 0 - 1
src/app/panels/graph/module.js

@@ -7,7 +7,6 @@ define([
   'moment',
   'moment',
   'components/timeSeries',
   'components/timeSeries',
   'components/panelmeta',
   'components/panelmeta',
-  'services/panelSrv',
   './seriesOverridesCtrl',
   './seriesOverridesCtrl',
   './graph',
   './graph',
   './legend',
   './legend',

+ 0 - 1
src/app/panels/singlestat/module.js

@@ -5,7 +5,6 @@ define([
   'components/timeSeries',
   'components/timeSeries',
   'kbn',
   'kbn',
   'components/panelmeta',
   'components/panelmeta',
-  'services/panelSrv',
   './singleStatPanel',
   './singleStatPanel',
 ],
 ],
 function (angular, app, _, TimeSeries, kbn, PanelMeta) {
 function (angular, app, _, TimeSeries, kbn, PanelMeta) {

+ 0 - 7
src/app/services/all.js

@@ -2,15 +2,8 @@ define([
   './alertSrv',
   './alertSrv',
   './utilSrv',
   './utilSrv',
   './datasourceSrv',
   './datasourceSrv',
-  './timeSrv',
-  './panelSrv',
   './timer',
   './timer',
   './keyboardManager',
   './keyboardManager',
   './popoverSrv',
   './popoverSrv',
-  './playlistSrv',
-  './unsavedChangesSrv',
-  './dashboard/dashboardKeyBindings',
-  './dashboard/dashboardSrv',
-  './dashboard/dashboardViewStateSrv',
 ],
 ],
 function () {});
 function () {});

+ 1 - 1
src/test/specs/dashboardSrv-specs.js

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

+ 1 - 1
src/test/specs/dashboardViewStateSrv-specs.js

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

+ 1 - 0
src/test/specs/graph-ctrl-specs.js

@@ -1,5 +1,6 @@
 define([
 define([
   'helpers',
   'helpers',
+  'features/dashboard/panelSrv',
   'panels/graph/module'
   'panels/graph/module'
 ], function(helpers) {
 ], function(helpers) {
   'use strict';
   'use strict';

+ 1 - 1
src/test/specs/row-ctrl-specs.js

@@ -1,6 +1,6 @@
 define([
 define([
   'helpers',
   'helpers',
-  'controllers/row'
+  'features/dashboard/rowCtrl'
 ], function(helpers) {
 ], function(helpers) {
   'use strict';
   'use strict';
 
 

+ 1 - 1
src/test/specs/sharePanelCtrl-specs.js

@@ -1,6 +1,6 @@
 define([
 define([
   'helpers',
   'helpers',
-  'controllers/sharePanelCtrl'
+  'features/dashboard/sharePanelCtrl'
 ], function(helpers) {
 ], function(helpers) {
   'use strict';
   'use strict';
 
 

+ 2 - 1
src/test/specs/timeSrv-specs.js

@@ -2,7 +2,8 @@ define([
   'mocks/dashboard-mock',
   'mocks/dashboard-mock',
   'helpers',
   'helpers',
   'lodash',
   'lodash',
-  'services/timeSrv'
+  'services/timer',
+  'features/dashboard/timeSrv'
 ], function(dashboardMock, helpers, _) {
 ], function(dashboardMock, helpers, _) {
   'use strict';
   'use strict';
 
 

+ 0 - 1
src/test/test-main.js

@@ -109,7 +109,6 @@ require([
     }
     }
   }
   }
 
 
-
   angular.module('grafana', ['ngRoute']);
   angular.module('grafana', ['ngRoute']);
   angular.module('grafana.services', ['ngRoute', '$strap.directives']);
   angular.module('grafana.services', ['ngRoute', '$strap.directives']);
   angular.module('grafana.panels', []);
   angular.module('grafana.panels', []);