Commit d1e33ec0 by Torkel Ödegaard

Moved routes

parent 39f3cfc1
...@@ -50,7 +50,6 @@ function (angular, $, _, appLevelRequire, config) { ...@@ -50,7 +50,6 @@ function (angular, $, _, appLevelRequire, config) {
}; };
app.config(function ($routeProvider, $controllerProvider, $compileProvider, $filterProvider, $provide) { app.config(function ($routeProvider, $controllerProvider, $compileProvider, $filterProvider, $provide) {
$routeProvider.otherwise({ redirectTo: config.default_route }); $routeProvider.otherwise({ redirectTo: config.default_route });
// this is how the internet told me to dynamically add modules :/ // this is how the internet told me to dynamically add modules :/
register_fns.controller = $controllerProvider.register; register_fns.controller = $controllerProvider.register;
...@@ -86,7 +85,7 @@ function (angular, $, _, appLevelRequire, config) { ...@@ -86,7 +85,7 @@ function (angular, $, _, appLevelRequire, config) {
'directives/all', 'directives/all',
'filters/all', 'filters/all',
'components/partials', 'components/partials',
'routes/all', 'routes/standalone/default',
]; ];
_.each(config.plugins.dependencies, function(dep) { _.each(config.plugins.dependencies, function(dep) {
......
define([
'./dashboard-from-db',
'./dashboard-from-file',
'./dashboard-from-script',
'./dashboard-default',
],
function () {});
define([ define([
'angular', 'angular',
'config', 'config',
'store' 'store',
'./fromDB',
'./fromFile',
'./fromScript',
], ],
function (angular, config, store) { function (angular, config, store) {
"use strict"; 'use strict';
var module = angular.module('grafana.routes'); var module = angular.module('grafana.routes');
module.config(function($routeProvider) { module.config(function($routeProvider) {
$routeProvider $routeProvider
.when('/', { .when('/', {
redirectTo: function() { redirectTo: function() {
return store.get('grafanaDashboardDefault') || config.default_route; return store.get('grafanaDashboardDefault') || config.default_route;
} }
}); });
}); });
}); });
...@@ -62,7 +62,7 @@ module.exports = function(config,grunt) { ...@@ -62,7 +62,7 @@ module.exports = function(config,grunt) {
'directives/all', 'directives/all',
'filters/all', 'filters/all',
'controllers/all', 'controllers/all',
'routes/all', 'routes/standalone/default',
'components/partials', 'components/partials',
] ]
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment