Remove redundancy file and do relative modification 69/38969/4
authorchenjiankun <chenjiankun1@huawei.com>
Wed, 9 Aug 2017 09:51:31 +0000 (09:51 +0000)
committerchenjiankun <chenjiankun1@huawei.com>
Fri, 11 Aug 2017 09:40:19 +0000 (09:40 +0000)
Change-Id: If6f672a2cbe218a20e3d8f3d093d31f6887d7ca3
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
15 files changed:
gui/app/scripts/controllers/container.controller.js
gui/app/scripts/controllers/content.controller.js
gui/app/scripts/controllers/detail.controller.js
gui/app/scripts/controllers/image.controller.js
gui/app/scripts/controllers/main.js
gui/app/scripts/controllers/pod.controller.js
gui/app/scripts/controllers/project.controller.js
gui/app/scripts/controllers/projectDetail.controller.js
gui/app/scripts/controllers/testcase.controller.js
gui/app/scripts/controllers/testsuit.controller.js
gui/app/scripts/router.config.js
gui/app/styles/main.css
gui/app/views/layout/sideNav.html
gui/app/views/layout/sideNav2.html [deleted file]
gui/app/views/main2.html [deleted file]

index 6c2ccd8..3ad200a 100644 (file)
@@ -128,7 +128,7 @@ angular.module('yardStickGui2App')
                 $scope.selectContainer = name;
             }
             $scope.goBack = function goBack() {
-                $state.go('app2.projectList');
+                $state.go('app.projectList');
             }
 
             $scope.openDeleteEnv = function openDeleteEnv(id, name) {
index d2bc19e..0288fa5 100644 (file)
@@ -2,7 +2,7 @@
 
 angular.module('yardStickGui2App')
     .controller('ContentController', ['$scope', '$state', '$stateParams', 'mainFactory', 'Upload', 'toaster', '$location', '$localStorage',
-        function($scope, $state, $stateParams, mainFactory, Upload, toaster, $location, $localStorage) {
+        function ($scope, $state, $stateParams, mainFactory, Upload, toaster, $location, $localStorage) {
 
 
 
@@ -11,10 +11,11 @@ angular.module('yardStickGui2App')
             $scope.showEnvironment = false;
             $scope.counldGoDetail = false;
             $scope.activeStatus = 0;
+            $scope.ifshowEnvChild = false;
 
-            $scope.$watch(function() {
+            $scope.$watch(function () {
                 return location.hash
-            }, function(newvalue, oldvalue) {
+            }, function (newvalue, oldvalue) {
                 if (location.hash.indexOf('project') > -1) {
                     $scope.projectShow = true;
                     $scope.taskShow = false;
@@ -26,6 +27,13 @@ angular.module('yardStickGui2App')
                     $scope.reportShow = true;
                     $scope.taskShow = true;
                     $scope.projectShow = true;
+                } else if (location.hash.indexOf('envDetail') > -1 || location.hash.indexOf('envimageDetail') > -1 ||
+                    location.hash.indexOf('envpodupload') > -1 || location.hash.indexOf('envcontainer') > -1) {
+                    $scope.ifshowEnvChild = true;
+                    $scope.activeStatus=0;
+                }else{
+                    $scope.ifshowEnvChild=false;
+                    $scope.activeStatus=-1;
                 }
 
             })
@@ -88,30 +96,30 @@ angular.module('yardStickGui2App')
             }
 
             function gotoTestcase() {
-                $state.go('app2.testcase');
+                $state.go('app.testcase');
             }
 
             function gotoEnviron() {
                 if ($location.path().indexOf('env') > -1 || $location.path().indexOf('environment') > -1) {
                     $scope.counldGoDetail = true;
                 }
-                $state.go('app2.environment');
+                $state.go('app.environment');
             }
 
             function gotoSuite() {
-                $state.go('app2.testsuite');
+                $state.go('app.testsuite');
             }
 
             function gotoProject() {
-                $state.go('app2.projectList');
+                $state.go('app.projectList');
             }
 
             function gotoTask() {
-                $state.go('app2.tasklist');
+                $state.go('app.tasklist');
             }
 
             function gotoReport() {
-                $state.go('app2.report');
+                $state.go('app.report');
             }
 
             function goBack() {
@@ -119,7 +127,7 @@ angular.module('yardStickGui2App')
                     return;
                 } else if ($location.path().indexOf('main/envDetail/') || $location.path().indexOf('main/imageDetail/') ||
                     $location.path().indexOf('main/podupload/') || $location.path().indexOf('main/container/')) {
-                    $state.go('app2.environment');
+                    $state.go('app.environment');
                     return;
                 } else {
                     window.history.back();
@@ -133,4 +141,4 @@ angular.module('yardStickGui2App')
 
 
         }
-    ]);
\ No newline at end of file
+    ]);
index 3e2eaa1..bfdb525 100644 (file)
@@ -108,6 +108,7 @@ angular.module('yardStickGui2App')
 
             //buildtoEnvInfo
             function buildToEnvInfo(object) {
+                $scope.envInfo=[];
                 var tempKeyArray = Object.keys(object);
 
                 for (var i = 0; i < tempKeyArray.length; i++) {
@@ -118,7 +119,11 @@ angular.module('yardStickGui2App')
                         value: tempValue
                     };
                     $scope.envInfo.push(temp);
+
                 }
+
+                console.log($scope.envInfo);
+                console.log($scope.openrcInfo);
             }
 
             function uploadFiles($file, $invalidFiles) {
index 53acff4..f6c9159 100644 (file)
@@ -149,7 +149,7 @@ angular.module('yardStickGui2App')
             }
 
             $scope.goBack = function goBack() {
-                $state.go('app2.projectList');
+                $state.go('app.projectList');
             }
 
             $scope.goNext = function goNext() {
index e3e880e..ab76bf0 100644 (file)
@@ -18,11 +18,7 @@ angular.module('yardStickGui2App')
             $scope.showNextPod = null;
             $scope.displayContainerInfo = [];
             $scope.containerList = [{ value: 'create_influxdb', name: "InfluxDB" }, { value: 'create_grafana', name: "Grafana" }]
-            $scope.items = [
-                'The first choice!',
-                'And another choice for you.',
-                'but wait! A third!'
-            ];
+
             $scope.$on('$destroy', function() {
                 $interval.cancel($scope.intervalImgae)
             });
@@ -381,7 +377,7 @@ angular.module('yardStickGui2App')
 
 
             $scope.goBack = function goBack() {
-                    $state.go('app2.projectList');
+                    $state.go('app.projectList');
                 }
             $scope.displayContainerInfo = [];
 
index 3ef2368..56dfee1 100644 (file)
@@ -113,7 +113,7 @@ angular.module('yardStickGui2App')
 
             }
             $scope.goBack = function goBack() {
-                $state.go('app2.projectList');
+                $state.go('app.projectList');
             }
 
 
index 0a7b8b9..1974745 100644 (file)
@@ -91,7 +91,7 @@ angular.module('yardStickGui2App')
             }
 
             function gotoDetail(id) {
-                $state.go('app2.projectdetail', { projectId: id })
+                $state.go('app.projectdetail', { projectId: id })
             }
 
 
index a616f3e..843f66c 100644 (file)
@@ -606,16 +606,16 @@ angular.module('yardStickGui2App')
             function gotoDetail(id) {
 
 
-                $state.go('app2.tasklist', { taskId: id });
+                $state.go('app.tasklist', { taskId: id });
 
             }
 
             function gotoReport(id) {
-                $state.go('app2.report', { taskId: id });
+                $state.go('app.report', { taskId: id });
             }
 
             function gotoModify(id) {
-                $state.go('app2.taskModify', { taskId: id });
+                $state.go('app.taskModify', { taskId: id });
             }
 
             function goBack() {
index 616ceb4..c93fd8c 100644 (file)
@@ -41,7 +41,7 @@ angular.module('yardStickGui2App')
             }
 
             function gotoDetail(name) {
-                $state.go('app2.testcasedetail', { name: name });
+                $state.go('app.testcasedetail', { name: name });
             }
 
 
@@ -93,7 +93,7 @@ angular.module('yardStickGui2App')
 
             }
             $scope.goBack = function goBack() {
-                $state.go('app2.projectList');
+                $state.go('app.projectList');
             }
 
             $scope.openDeleteEnv = function openDeleteEnv(id, name) {
index abc9095..a15daa7 100644 (file)
@@ -41,16 +41,16 @@ angular.module('yardStickGui2App')
             function gotoDetail(name) {
                 var temp = name.split('.')[0];
 
-                $state.go('app2.suitedetail', { name: temp })
+                $state.go('app.suitedetail', { name: temp })
 
             }
 
             function gotoCreateSuite() {
-                $state.go('app2.suitcreate');
+                $state.go('app.suitcreate');
             }
 
             $scope.goBack = function goBack() {
-                $state.go('app2.projectList');
+                $state.go('app.projectList');
             }
 
 
index 9d3c045..da2eb08 100644 (file)
@@ -20,14 +20,6 @@ angular.module('yardStickGui2App')
 
             $stateProvider
 
-                .state('app2', {
-                    url: "/main",
-                    controller: 'ContentController',
-                    templateUrl: "views/main2.html",
-                    ncyBreadcrumb: {
-                        label: 'Main'
-                    }
-                })
                 .state('app', {
                     url: "/main",
                     controller: 'ContentController',
@@ -37,7 +29,7 @@ angular.module('yardStickGui2App')
                     }
                 })
 
-            .state('app2.environment', {
+            .state('app.environment', {
                     url: '/environment',
                     templateUrl: 'views/environmentList.html',
                     controller: 'MainCtrl',
@@ -45,7 +37,7 @@ angular.module('yardStickGui2App')
                         label: 'Environment'
                     }
                 })
-                .state('app2.testcase', {
+                .state('app.testcase', {
                     url: '/testcase',
                     templateUrl: 'views/testcaselist.html',
                     controller: 'TestcaseController',
@@ -53,7 +45,7 @@ angular.module('yardStickGui2App')
                         label: 'Test Case'
                     }
                 })
-                .state('app2.testsuite', {
+                .state('app.testsuite', {
                     url: '/suite',
                     templateUrl: 'views/suite.html',
                     controller: 'SuiteListController',
@@ -61,7 +53,7 @@ angular.module('yardStickGui2App')
                         label: 'Test Suite'
                     }
                 })
-                .state('app2.suitcreate', {
+                .state('app.suitcreate', {
                     url: '/suitcreate',
                     templateUrl: 'views/testcasechoose.html',
                     controller: 'suitcreateController',
@@ -69,7 +61,7 @@ angular.module('yardStickGui2App')
                         label: 'Suite Create'
                     }
                 })
-                .state('app2.testcasedetail', {
+                .state('app.testcasedetail', {
                     url: '/testdetail/:name',
                     templateUrl: 'views/testcasedetail.html',
                     controller: 'testcaseDetailController',
@@ -78,7 +70,7 @@ angular.module('yardStickGui2App')
                     },
                     params: { name: null }
                 })
-                .state('app2.suitedetail', {
+                .state('app.suitedetail', {
                     url: '/suitedetail/:name',
                     templateUrl: 'views/suitedetail.html',
                     controller: 'suiteDetailController',
@@ -124,7 +116,7 @@ angular.module('yardStickGui2App')
                         label: 'Container Manage'
                     }
                 })
-                .state('app2.projectList', {
+                .state('app.projectList', {
                     url: '/project',
                     templateUrl: 'views/projectList.html',
                     controller: 'ProjectController',
@@ -133,7 +125,7 @@ angular.module('yardStickGui2App')
                     }
 
                 })
-                .state('app2.tasklist', {
+                .state('app.tasklist', {
                     url: '/task/:taskId',
                     templateUrl: 'views/taskList.html',
                     controller: 'TaskController',
@@ -143,7 +135,7 @@ angular.module('yardStickGui2App')
                     }
 
                 })
-                .state('app2.taskLog', {
+                .state('app.taskLog', {
                     url: '/task/:taskId/log',
                     templateUrl: 'views/taskLog.html',
                     controller: 'TaskLogController',
@@ -153,7 +145,7 @@ angular.module('yardStickGui2App')
                     }
 
                 })
-                .state('app2.report', {
+                .state('app.report', {
                     url: '/report/:taskId',
                     templateUrl: 'views/report.html',
                     controller: 'ReportController',
@@ -163,7 +155,7 @@ angular.module('yardStickGui2App')
                     }
 
                 })
-                .state('app2.projectdetail', {
+                .state('app.projectdetail', {
                     url: '/projectdetail/:projectId',
                     templateUrl: 'views/projectdetail.html',
                     controller: 'ProjectDetailController',
@@ -173,7 +165,7 @@ angular.module('yardStickGui2App')
                     }
 
                 })
-                .state('app2.taskModify', {
+                .state('app.taskModify', {
                     url: '/taskModify/:taskId',
                     templateUrl: 'views/taskmodify.html',
                     controller: 'TaskModifyController',
index e13a66b..d2ea8ba 100644 (file)
@@ -20,6 +20,8 @@ body {
 }
 
 
+
+
 /* Custom page header */
 
 .header {
@@ -206,3 +208,7 @@ input:focus{outline: 0}
     overflow: hidden;
 }
 
+.bs-sidenav{
+    margin-top:21px !important;
+}
+
index 4fc99cd..6c44263 100644 (file)
@@ -18,7 +18,7 @@
 
             </div>
         </div>
-        <div class="panel-group" role="tablist" aria-multiselectable="true" bs-collapse style="margin-bottom:0px;" ng-model="activeStatus">
+        <div class="panel-group" role="tablist" aria-multiselectable="true" bs-collapse style="margin-bottom:0px;" ng-model="activeStatus" ng-if="ifshowEnvChild">
             <div class="panel panel-default">
                 <div class="panel-heading" role="tab">
                     <h4 class="panel-title">
                 </div>
             </div>
         </div>
+        <div class="panel-group" role="tablist" aria-multiselectable="false" bs-collapse style="margin-bottom:0px;" ng-if="!ifshowEnvChild">
+            <div class="panel panel-default">
+                <div class="panel-heading" role="tab">
+                    <h4 class="panel-title">
+                        <a bs-collapse-toggle style=" text-decoration: none;">
+                            <div style="display:inline;" ng-click="gotoEnviron()">Environment </div>
+                            <!--<i class="fa fa-sort-asc" aria-hidden="true" style="margin-left: 71px;display:inline"></i>-->
+                        </a>
+                    </h4>
+                </div>
+
+            </div>
+        </div>
 
         <div class="panel-group " role="tablist " aria-multiselectable="true " bs-collapse style="margin-bottom:0px; ">
             <div class="panel panel-default ">
     .active.panel-body {
         background-color: #dfe3e4;
     }
-</style>
+</style>
\ No newline at end of file
diff --git a/gui/app/views/layout/sideNav2.html b/gui/app/views/layout/sideNav2.html
deleted file mode 100644 (file)
index 93e0de4..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-<div class="naviSide">
-
-
-    <ul class="nav bs-sidenav">
-
-        <div class="panel-group " role="tablist " aria-multiselectable="true " bs-collapse style="margin-bottom:0px; ">
-            <div class="panel panel-default ">
-                <div class="panel-heading " role="tab ">
-                    <h4 class="panel-title ">
-                        <a bs-collapse-toggle style=" text-decoration: none;" ng-click="gotoProject();">
-        Project
-        </a>
-                    </h4>
-
-                </div>
-
-            </div>
-        </div>
-        <div class="panel-group" role="tablist" aria-multiselectable="false" bs-collapse style="margin-bottom:0px;">
-            <div class="panel panel-default">
-                <div class="panel-heading" role="tab">
-                    <h4 class="panel-title">
-                        <a bs-collapse-toggle style=" text-decoration: none;">
-                            <div style="display:inline;" ng-click="gotoEnviron()">Environment </div>
-                            <!--<i class="fa fa-sort-asc" aria-hidden="true" style="margin-left: 71px;display:inline"></i>-->
-                        </a>
-                    </h4>
-                </div>
-
-            </div>
-        </div>
-
-        <div class="panel-group " role="tablist " aria-multiselectable="true " bs-collapse style="margin-bottom:0px; ">
-            <div class="panel panel-default ">
-                <div class="panel-heading " role="tab ">
-                    <h4 class="panel-title ">
-                        <a bs-collapse-toggle style=" text-decoration: none;" ng-click="gotoTestcase()">
-         Test Case
-        </a>
-                    </h4>
-
-                </div>
-
-            </div>
-        </div>
-
-        <div class="panel-group " role="tablist " aria-multiselectable="true " bs-collapse style="margin-bottom:0px; ">
-            <div class="panel panel-default ">
-                <div class="panel-heading " role="tab ">
-                    <h4 class="panel-title ">
-                        <a bs-collapse-toggle style=" text-decoration: none;" ng-click="gotoSuite()">
-        Test Suite
-        </a>
-                    </h4>
-
-                </div>
-
-            </div>
-        </div>
-
-
-
-    </ul>
-
-</div>
-
-<style>
-    .bs-sidenav {
-        margin-top: 21px;
-        margin-bottom: 20px;
-        width: 124px;
-    }
-
-    .nav {
-        margin-bottom: 0;
-        padding-left: 0;
-        list-style: none;
-    }
-
-    .nav>li {
-        position: relative;
-        display: block;
-    }
-
-    li {
-        display: list-item;
-        text-align: -webkit-match-parent;
-    }
-
-    a {
-        cursor: pointer;
-    }
-
-    a.active {
-        background-color: #EEEEEE;
-        border-radius: 5px;
-        width: 165px;
-    }
-    /*a:hover {
-        width: 165px;
-    }*/
-
-    .nav>li>a:hover,
-    .nav>li>a:focus {
-        text-decoration: underline;
-        background-color: transparent;
-    }
-</style>
diff --git a/gui/app/views/main2.html b/gui/app/views/main2.html
deleted file mode 100644 (file)
index 3f49e82..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-<div>
-    <div ng-include="'views/layout/header.html'"></div>
-</div>
-<div ng-include="'views/layout/sideNav2.html'"></div>
-
-
-<div style="margin-top:80px;margin-left:220px;">
-    <!--<div ncy-breadcrumb></div>-->
-    <div>
-        <ol class="progressDefine">
-            <li data-step="1" ng-click="gotoProject();" style="cursor:pointer" ng-class="{'is-complete':projectShow}">
-                Project
-            </li>
-            <li data-step="2" ng-class="{'is-complete':taskShow}">
-                Task
-            </li>
-
-            <li data-step="3" ng-class="{'is-complete':reportShow}">
-                Reporting
-            </li>
-
-        </ol>
-    </div>
-
-
-</div>
-
-
-
-
-
-
-
-
-
-<div ui-view></div>
-
-
-
-<style>
-    .stepsContent {
-        display: flex;
-        flex-direction: row;
-        justify-content: space-around;
-        margin-left: 120px;
-        margin-top: 100px;
-    }
-
-    .stepItem {
-        display: flex;
-        flex-direction: column;
-    }
-
-    .nextButton {
-        margin-left: 500px;
-    }
-
-    .progressDefine {
-        list-style: none;
-        margin: 0;
-        padding: 0;
-        display: table;
-        table-layout: fixed;
-        width: 100%;
-        color: #849397;
-    }
-
-    .progressDefine>li {
-        position: relative;
-        display: table-cell;
-        text-align: center;
-        font-size: 0.8em;
-    }
-
-    .progressDefine>li:before {
-        content: attr(data-step);
-        display: block;
-        margin: 0 auto;
-        background: #DFE3E4;
-        width: 3em;
-        height: 3em;
-        text-align: center;
-        margin-bottom: 0.25em;
-        line-height: 3em;
-        border-radius: 100%;
-        position: relative;
-        z-index: 5;
-    }
-
-    .progressDefine>li:after {
-        content: '';
-        position: absolute;
-        display: block;
-        background: #DFE3E4;
-        width: 100%;
-        height: 0.5em;
-        top: 1.25em;
-        left: 50%;
-        margin-left: 1.5em\9;
-        z-index: -1;
-    }
-
-    .progressDefine>li:last-child:after {
-        display: none;
-    }
-
-    .progressDefine>li.is-complete {
-        color: #4dc5cf;
-    }
-
-    .progressDefine>li.is-complete:before,
-    .progressDefine>li.is-complete:after {
-        color: #FFF;
-        background: #4dc5cf;
-    }
-
-    .progressDefine>li.is-active {
-        color: #3498DB;
-    }
-
-    .progressDefine>li.is-active:before {
-        color: #FFF;
-        background: #3498DB;
-    }
-    /**
- * Needed for IE8
- */
-
-    .progressDefine__last:after {
-        display: none !important;
-    }
-    /**
- * Size Extensions
- */
-
-    .progressDefine--medium {
-        font-size: 1.5em;
-    }
-
-    .progressDefine--large {
-        font-size: 2em;
-    }
-    /**
- * Some Generic Stylings
- */
-
-    *,
-    *:after,
-    *:before {
-        box-sizing: border-box;
-    }
-
-    h1 {
-        margin-bottom: 1.5em;
-    }
-
-    .progressDefine {
-        margin-bottom: 3em;
-    }
-
-    a {
-        color: #3498DB;
-        text-decoration: none;
-    }
-
-    a:hover {
-        text-decoration: underline;
-    }
-    /*
-    body {
-        text-align: center;
-        color: #444;
-    }*/
-</style>