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