summaryrefslogtreecommitdiffstats
path: root/utils/test/reporting/pages/app/scripts/config.router.js
blob: d3724b7659b1bdc94bd13b96330c6757b2a7d13f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
'use strict'
/**
 * @ngdoc function
 * @name opnfvdashBoardAngularApp.config:config.router.js
 * @description config of the ui router and lazy load setting
 * config of the opnfvdashBoardAngularApp
 */
angular.module('opnfvApp')
    .run([
        '$rootScope', '$state', '$stateParams',
        function($rootScope, $state, $stateParams) {

            $rootScope.$state = $state;
            $rootScope.$stateParams = $stateParams;

        }
    ]).config(['$stateProvider', '$urlRouterProvider',
        function($stateProvider, $urlRouterProvider) {

            $urlRouterProvider.otherwise('/landingpage/table');

            $stateProvider
                .state('landingpage', {
                    url: "/landingpage",
                    controller: 'MainController',
                    templateUrl: "views/main.html",
                    data: { pageTitle: '首页', specialClass: 'landing-page' },
                    resolve: {
                        controller: ['$ocLazyLoad', function($ocLazyLoad) {
                            return $ocLazyLoad.load([

                            ])
                        }]
                    }
                })
                .state('landingpage.table', {
                    url: "/table",
                    controller: 'TableController',
                    templateUrl: "views/commons/table.html",
                    resolve: {
                        controller: ['$ocLazyLoad', function($ocLazyLoad) {
                            return $ocLazyLoad.load([
                                // 'scripts/controllers/table.controller.js'


                            ])
                        }]
                    }
                })
                .state('select', {
                    url: '/select',
                    templateUrl: "views/testcase.html",
                    data: { specialClass: 'top-navigation' },

                })
                .state('select.selectTestCase', {
                    url: "/selectCase",
                    controller: 'CaseController',
                    templateUrl: "views/commons/selectTestcase.html",

                })
                .state('select.testlist', {
                    url: "/caselist",
                    templateUrl: "views/commons/testCaseList.html"
                })
                .state('select.admin', {
                    url: "/admin",
                    controller: 'AdminController',
                    templateUrl: "views/commons/admin.html"
                })
                .state('select.testVisual', {
                    url: "/visual",
                    controller: "testVisualController",
                    templateUrl: "views/commons/testCaseVisual.html"
                })
                // .state('admin', {
                //     url: '/admin',
                //     data: { specialClass: ' fixed-sidebar  pace-done' },
                //     templateUrl: "views/commons/admin.html"
                // })

        }
    ])
    .run();