blob: 26cdcbc9c539b1fed69fe4214d843858735f5422 [file] [log] [blame]
'use strict';
angular.module('xos.ceilometerDashboard', [
'ngResource',
'ngCookies',
'ngLodash',
'ui.router',
'xos.helpers',
'ngAnimate',
'chart.js',
'ui.bootstrap.accordion'
])
.config(($stateProvider, $urlRouterProvider) => {
$stateProvider
.state('ceilometerDashboard', {
url: '/',
template: '<ceilometer-dashboard></ceilometer-dashboard>'
})
.state('samples', {
url: '/:name/:tenant/samples',
template: '<ceilometer-samples></ceilometer-samples>'
});
$urlRouterProvider.otherwise('/');
})
.config(function($httpProvider){
$httpProvider.interceptors.push('NoHyperlinks');
})
.run(function($rootScope){
$rootScope.stateName = 'ceilometerDashboard';
$rootScope.$on('$stateChangeStart', (event, toState) => {
$rootScope.stateName = toState.name;
})
});