e0f1606a5a
Change-Id: I5a5d93247dc5b9210f4ca7e4eafeb41f1239fac2
40 lines
1.1 KiB
JavaScript
40 lines
1.1 KiB
JavaScript
'use strict';
|
|
|
|
angular.module('bansho', [
|
|
'ngRoute',
|
|
'ngCookies',
|
|
'angular.filter',
|
|
'bansho.config',
|
|
'bansho.authentication',
|
|
'bansho.utils.promiseManager',
|
|
'bansho.topbar',
|
|
'bansho.sidebar',
|
|
'bansho.surveil',
|
|
'bansho.host',
|
|
'bansho.service',
|
|
'bansho.drupal',
|
|
'bansho.drupal.tile',
|
|
'bansho.view',
|
|
'bansho.view.dashboard',
|
|
'bansho.view.singleTable',
|
|
'bansho.view.host',
|
|
'bansho.view.service',
|
|
'bansho.view.drupalDashboard',
|
|
'bansho.view.drupal',
|
|
'bansho.grafana'
|
|
])
|
|
|
|
.config(['$routeProvider', function ($routeProvider) {
|
|
$routeProvider.otherwise({redirectTo: '/view'});
|
|
}])
|
|
|
|
// Reinitialise objects on url change
|
|
.run(['$rootScope', 'promisesManager', 'reinitTables', 'reinitDrupalTiles',
|
|
function ($rootScope, promisesManager, reinitTables, reinitDrupalTiles) {
|
|
$rootScope.$on('$locationChangeStart', function () {
|
|
reinitTables();
|
|
reinitDrupalTiles();
|
|
promisesManager.clearAllPromises();
|
|
});
|
|
}]);
|