diff --git a/src/app/controllers/all.js b/src/app/controllers/all.js index 6e052ee445e..8703cf0f2bf 100644 --- a/src/app/controllers/all.js +++ b/src/app/controllers/all.js @@ -1,15 +1,9 @@ define([ './grafanaCtrl', - './dashboardCtrl', - './dashboardNavCtrl', - './row', - './submenuCtrl', './pulldown', './search', './metricKeys', './graphiteImport', - './playlistCtrl', './inspectCtrl', - './sharePanelCtrl', './jsonEditorCtrl', ], function () {}); diff --git a/src/app/features/all.js b/src/app/features/all.js index 6860e3de932..55f7f607131 100644 --- a/src/app/features/all.js +++ b/src/app/features/all.js @@ -6,4 +6,5 @@ define([ './influxdb/datasource', './opentsdb/datasource', './elasticsearch/datasource', + './dashboard/all', ], function () {}); diff --git a/src/app/features/dashboard/all.js b/src/app/features/dashboard/all.js new file mode 100644 index 00000000000..74c2fa0bb80 --- /dev/null +++ b/src/app/features/dashboard/all.js @@ -0,0 +1,14 @@ +define([ + './dashboardCtrl', + './dashboardNavCtrl', + './playlistCtrl', + './rowCtrl', + './sharePanelCtrl', + './submenuCtrl', + './dashboardSrv', + './keybindings', + './viewStateSrv', + './playlistSrv', + './panelSrv', + './timeSrv', +], function () {}); diff --git a/src/app/controllers/dashboardCtrl.js b/src/app/features/dashboard/dashboardCtrl.js similarity index 100% rename from src/app/controllers/dashboardCtrl.js rename to src/app/features/dashboard/dashboardCtrl.js diff --git a/src/app/controllers/dashboardNavCtrl.js b/src/app/features/dashboard/dashboardNavCtrl.js similarity index 100% rename from src/app/controllers/dashboardNavCtrl.js rename to src/app/features/dashboard/dashboardNavCtrl.js diff --git a/src/app/services/dashboard/dashboardSrv.js b/src/app/features/dashboard/dashboardSrv.js similarity index 99% rename from src/app/services/dashboard/dashboardSrv.js rename to src/app/features/dashboard/dashboardSrv.js index 21789fc1740..94448265cca 100644 --- a/src/app/services/dashboard/dashboardSrv.js +++ b/src/app/features/dashboard/dashboardSrv.js @@ -4,7 +4,6 @@ define([ 'kbn', 'lodash', 'moment', - '../timer', ], function (angular, $, kbn, _, moment) { 'use strict'; diff --git a/src/app/services/dashboard/dashboardKeyBindings.js b/src/app/features/dashboard/keybindings.js similarity index 100% rename from src/app/services/dashboard/dashboardKeyBindings.js rename to src/app/features/dashboard/keybindings.js diff --git a/src/app/services/panelSrv.js b/src/app/features/dashboard/panelSrv.js similarity index 100% rename from src/app/services/panelSrv.js rename to src/app/features/dashboard/panelSrv.js diff --git a/src/app/controllers/playlistCtrl.js b/src/app/features/dashboard/playlistCtrl.js similarity index 100% rename from src/app/controllers/playlistCtrl.js rename to src/app/features/dashboard/playlistCtrl.js diff --git a/src/app/services/playlistSrv.js b/src/app/features/dashboard/playlistSrv.js similarity index 100% rename from src/app/services/playlistSrv.js rename to src/app/features/dashboard/playlistSrv.js diff --git a/src/app/controllers/row.js b/src/app/features/dashboard/rowCtrl.js similarity index 100% rename from src/app/controllers/row.js rename to src/app/features/dashboard/rowCtrl.js diff --git a/src/app/controllers/sharePanelCtrl.js b/src/app/features/dashboard/sharePanelCtrl.js similarity index 100% rename from src/app/controllers/sharePanelCtrl.js rename to src/app/features/dashboard/sharePanelCtrl.js diff --git a/src/app/controllers/submenuCtrl.js b/src/app/features/dashboard/submenuCtrl.js similarity index 100% rename from src/app/controllers/submenuCtrl.js rename to src/app/features/dashboard/submenuCtrl.js diff --git a/src/app/services/timeSrv.js b/src/app/features/dashboard/timeSrv.js similarity index 100% rename from src/app/services/timeSrv.js rename to src/app/features/dashboard/timeSrv.js diff --git a/src/app/services/unsavedChangesSrv.js b/src/app/features/dashboard/unsavedChangesSrv.js similarity index 100% rename from src/app/services/unsavedChangesSrv.js rename to src/app/features/dashboard/unsavedChangesSrv.js diff --git a/src/app/services/dashboard/dashboardViewStateSrv.js b/src/app/features/dashboard/viewStateSrv.js similarity index 100% rename from src/app/services/dashboard/dashboardViewStateSrv.js rename to src/app/features/dashboard/viewStateSrv.js diff --git a/src/app/panels/graph/module.js b/src/app/panels/graph/module.js index 2f82dafcd3d..a1ae2bf2b4f 100644 --- a/src/app/panels/graph/module.js +++ b/src/app/panels/graph/module.js @@ -7,7 +7,6 @@ define([ 'moment', 'components/timeSeries', 'components/panelmeta', - 'services/panelSrv', './seriesOverridesCtrl', './graph', './legend', diff --git a/src/app/panels/singlestat/module.js b/src/app/panels/singlestat/module.js index 788db3c6229..3568cc53c64 100644 --- a/src/app/panels/singlestat/module.js +++ b/src/app/panels/singlestat/module.js @@ -5,7 +5,6 @@ define([ 'components/timeSeries', 'kbn', 'components/panelmeta', - 'services/panelSrv', './singleStatPanel', ], function (angular, app, _, TimeSeries, kbn, PanelMeta) { diff --git a/src/app/services/all.js b/src/app/services/all.js index daf889d1cd3..bd9150a3b8f 100644 --- a/src/app/services/all.js +++ b/src/app/services/all.js @@ -2,15 +2,8 @@ define([ './alertSrv', './utilSrv', './datasourceSrv', - './timeSrv', - './panelSrv', './timer', './keyboardManager', './popoverSrv', - './playlistSrv', - './unsavedChangesSrv', - './dashboard/dashboardKeyBindings', - './dashboard/dashboardSrv', - './dashboard/dashboardViewStateSrv', ], function () {}); diff --git a/src/test/specs/dashboardSrv-specs.js b/src/test/specs/dashboardSrv-specs.js index 6dc19b1a2ce..739d66871bc 100644 --- a/src/test/specs/dashboardSrv-specs.js +++ b/src/test/specs/dashboardSrv-specs.js @@ -1,5 +1,5 @@ define([ - 'services/dashboard/dashboardSrv' + 'features/dashboard/dashboardSrv' ], function() { 'use strict'; diff --git a/src/test/specs/dashboardViewStateSrv-specs.js b/src/test/specs/dashboardViewStateSrv-specs.js index 1ade349610d..056ab8c9152 100644 --- a/src/test/specs/dashboardViewStateSrv-specs.js +++ b/src/test/specs/dashboardViewStateSrv-specs.js @@ -1,5 +1,5 @@ define([ - 'services/dashboard/dashboardViewStateSrv' + 'features/dashboard/viewStateSrv' ], function() { 'use strict'; diff --git a/src/test/specs/graph-ctrl-specs.js b/src/test/specs/graph-ctrl-specs.js index 13cd56857f5..a1a372006a3 100644 --- a/src/test/specs/graph-ctrl-specs.js +++ b/src/test/specs/graph-ctrl-specs.js @@ -1,5 +1,6 @@ define([ 'helpers', + 'features/dashboard/panelSrv', 'panels/graph/module' ], function(helpers) { 'use strict'; diff --git a/src/test/specs/row-ctrl-specs.js b/src/test/specs/row-ctrl-specs.js index bfb61c1ab9b..b64f5cd1065 100644 --- a/src/test/specs/row-ctrl-specs.js +++ b/src/test/specs/row-ctrl-specs.js @@ -1,6 +1,6 @@ define([ 'helpers', - 'controllers/row' + 'features/dashboard/rowCtrl' ], function(helpers) { 'use strict'; diff --git a/src/test/specs/sharePanelCtrl-specs.js b/src/test/specs/sharePanelCtrl-specs.js index 7bab63adc3a..6cb0a732d6e 100644 --- a/src/test/specs/sharePanelCtrl-specs.js +++ b/src/test/specs/sharePanelCtrl-specs.js @@ -1,6 +1,6 @@ define([ 'helpers', - 'controllers/sharePanelCtrl' + 'features/dashboard/sharePanelCtrl' ], function(helpers) { 'use strict'; diff --git a/src/test/specs/timeSrv-specs.js b/src/test/specs/timeSrv-specs.js index 86ee37ebac4..231f50afeb8 100644 --- a/src/test/specs/timeSrv-specs.js +++ b/src/test/specs/timeSrv-specs.js @@ -2,7 +2,8 @@ define([ 'mocks/dashboard-mock', 'helpers', 'lodash', - 'services/timeSrv' + 'services/timer', + 'features/dashboard/timeSrv' ], function(dashboardMock, helpers, _) { 'use strict'; diff --git a/src/test/test-main.js b/src/test/test-main.js index 5783b885d59..0caba61ae03 100644 --- a/src/test/test-main.js +++ b/src/test/test-main.js @@ -109,7 +109,6 @@ require([ } } - angular.module('grafana', ['ngRoute']); angular.module('grafana.services', ['ngRoute', '$strap.directives']); angular.module('grafana.panels', []);