Moved routes

This commit is contained in:
Torkel Ödegaard 2014-12-31 11:48:15 +01:00
parent 39f3cfc1eb
commit d1e33ec071
8 changed files with 25 additions and 30 deletions

View File

@ -50,7 +50,6 @@ function (angular, $, _, appLevelRequire, config) {
};
app.config(function ($routeProvider, $controllerProvider, $compileProvider, $filterProvider, $provide) {
$routeProvider.otherwise({ redirectTo: config.default_route });
// this is how the internet told me to dynamically add modules :/
register_fns.controller = $controllerProvider.register;
@ -86,7 +85,7 @@ function (angular, $, _, appLevelRequire, config) {
'directives/all',
'filters/all',
'components/partials',
'routes/all',
'routes/standalone/default',
];
_.each(config.plugins.dependencies, function(dep) {

View File

@ -1,7 +0,0 @@
define([
'./dashboard-from-db',
'./dashboard-from-file',
'./dashboard-from-script',
'./dashboard-default',
],
function () {});

View File

@ -1,20 +0,0 @@
define([
'angular',
'config',
'store'
],
function (angular, config, store) {
"use strict";
var module = angular.module('grafana.routes');
module.config(function($routeProvider) {
$routeProvider
.when('/', {
redirectTo: function() {
return store.get('grafanaDashboardDefault') || config.default_route;
}
});
});
});

View File

@ -0,0 +1,23 @@
define([
'angular',
'config',
'store',
'./fromDB',
'./fromFile',
'./fromScript',
],
function (angular, config, store) {
'use strict';
var module = angular.module('grafana.routes');
module.config(function($routeProvider) {
$routeProvider
.when('/', {
redirectTo: function() {
return store.get('grafanaDashboardDefault') || config.default_route;
}
});
});
});

View File

@ -62,7 +62,7 @@ module.exports = function(config,grunt) {
'directives/all',
'filters/all',
'controllers/all',
'routes/all',
'routes/standalone/default',
'components/partials',
]
}