97d2fffae2
Change-Id: Iecadb65e68bb7707f0dbd3e52254f093d63c1f88
38 lines
1.1 KiB
JavaScript
38 lines
1.1 KiB
JavaScript
'use strict';
|
|
|
|
angular.module('bansho', [
|
|
'ngRoute',
|
|
'ngCookies',
|
|
'angular.filter',
|
|
'bansho.config',
|
|
'bansho.authentication',
|
|
'bansho.topbar',
|
|
'bansho.sidebar',
|
|
'bansho.surveil',
|
|
'bansho.datasource',
|
|
'bansho.directive',
|
|
'bansho.drupal',
|
|
'bansho.drupal.tile',
|
|
'bansho.drupal.info',
|
|
'bansho.view',
|
|
'bansho.view.page',
|
|
'bansho.view.drupalDashboard',
|
|
'bansho.view.drupal',
|
|
'bansho.grafana'
|
|
])
|
|
|
|
.config(['$routeProvider', function ($routeProvider) {
|
|
$routeProvider.otherwise({redirectTo: '/view'});
|
|
}])
|
|
|
|
// Reinitialise objects on url change
|
|
.run(['$rootScope', 'templateManager', 'reinitDrupalTiles', 'reinitDrupalInfo', 'componentsConfig',
|
|
function ($rootScope, templateManager, reinitDrupalTiles, reinitDrupalInfo, componentsConfig) {
|
|
componentsConfig.load();
|
|
$rootScope.$on('$locationChangeStart', function () {
|
|
templateManager.clearIntervals();
|
|
reinitDrupalTiles();
|
|
reinitDrupalInfo();
|
|
});
|
|
}]);
|