blob: 43a8a14cfafd41dbd66c50a12454d46d766490a6 [file] [log] [blame]
Matteo Scandolo68c2e722015-12-04 10:14:40 -08001'use strict';
2
3angular.module('xos.ceilometerDashboard', [
4 'ngResource',
5 'ngCookies',
Matteo Scandolo68c2e722015-12-04 10:14:40 -08006 'ui.router',
7 'xos.helpers',
Matteo Scandolo68856082015-12-08 14:35:55 -08008 'ngAnimate',
Matteo Scandoloc0582112015-12-09 16:09:59 -08009 'chart.js',
10 'ui.bootstrap.accordion'
Matteo Scandolo68c2e722015-12-04 10:14:40 -080011])
Matteo Scandolo68856082015-12-08 14:35:55 -080012.config(($stateProvider, $urlRouterProvider) => {
Matteo Scandolo68c2e722015-12-04 10:14:40 -080013 $stateProvider
14 .state('ceilometerDashboard', {
15 url: '/',
16 template: '<ceilometer-dashboard></ceilometer-dashboard>'
Matteo Scandolo7b80d842015-12-04 15:55:20 -080017 })
18 .state('samples', {
19 url: '/:name/:tenant/samples',
20 template: '<ceilometer-samples></ceilometer-samples>'
Matteo Scandolo68c2e722015-12-04 10:14:40 -080021 });
Matteo Scandolo68856082015-12-08 14:35:55 -080022 $urlRouterProvider.otherwise('/');
Matteo Scandolo68c2e722015-12-04 10:14:40 -080023})
24.config(function($httpProvider){
25 $httpProvider.interceptors.push('NoHyperlinks');
26})
Matteo Scandolo68856082015-12-08 14:35:55 -080027.run(function($rootScope){
28 $rootScope.stateName = 'ceilometerDashboard';
29 $rootScope.$on('$stateChangeStart', (event, toState) => {
Matteo Scandolo68856082015-12-08 14:35:55 -080030 $rootScope.stateName = toState.name;
31 })
Matteo Scandolof0577ac2016-03-21 17:27:42 -070032});