From 64605f1cc7117854abb203375deee396e0d65cc1 Mon Sep 17 00:00:00 2001 From: chenjiankun Date: Sat, 24 Dec 2016 23:08:46 +0000 Subject: Create Test Reporting landing page JIRA: RELENG-165 In this patch, I do the follow things: 1.deploy tornado server(currently I haven't write any backend code, since the backend code depend on the testapi and I need to communicate with Serena). 2.landing page code(almostly finished. But I haven't the data, so for now, the data this page shows is a mock json. When the testapi and my backend code ready, this page will finally finished) 3.deployment: supervisor + nginx + tornado + angular usage: docker run -itd -p 8000:8000 opnfv/reporting: visit landing page: http://server_ip:8000/reporting/index.html test api: http://server_ip:8000/landing-page/filters visit old reporting page: http://server_ip:8000/display/master/yardstick/status-apex.html Change-Id: I527ab2661ce9e84b2942ebe673afbf5f2bc7878f Signed-off-by: chenjiankun --- .../reporting/pages/app/scripts/config.router.js | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 utils/test/reporting/pages/app/scripts/config.router.js (limited to 'utils/test/reporting/pages/app/scripts/config.router.js') diff --git a/utils/test/reporting/pages/app/scripts/config.router.js b/utils/test/reporting/pages/app/scripts/config.router.js new file mode 100644 index 000000000..641ea6a74 --- /dev/null +++ b/utils/test/reporting/pages/app/scripts/config.router.js @@ -0,0 +1,53 @@ +'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: 'MainCtrl', + 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' + + + ]) + }] + } + }) + + }]) + .run(); -- cgit 1.2.3-korg