hide create_pod function from anonymous user 85/40985/1
authorSerenaFeng <feng.xiaowei@zte.com.cn>
Mon, 4 Sep 2017 10:09:49 +0000 (18:09 +0800)
committerSerenaFeng <feng.xiaowei@zte.com.cn>
Mon, 4 Sep 2017 10:09:49 +0000 (18:09 +0800)
Querying pods is open to everybody
But only login users are allowed to create the new pod

Change-Id: I1c722580c2c51a8a8b0f84f1ffac451dff20b086
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
utils/test/testapi/3rd_party/static/testapi-ui/components/pods/pods.html
utils/test/testapi/3rd_party/static/testapi-ui/components/pods/podsController.js

index 7ce36ca..e366670 100644 (file)
@@ -1,8 +1,12 @@
-<h3>{{ctrl.pageHeader}}</h3>
-<p>{{ctrl.pageParagraph}}</p>
+<h3>Pods</h3>
+<p>This page is used to create or query pods.<br>
+    Querying pods is open to everybody.<br>
+    But only login users are granted the privilege to create the new pod.
+</p>
+
 <div class="row" style="margin-bottom:24px;"></div>
 
-<div class="pod-create">
+<div class="pod-create" ng-class="{ 'hidden': ! auth.isAuthenticated }">
     <h4>Create</h4>
     <div class="row">
         <div ng-repeat="require in ctrl.createRequirements">
index 2012586..894fcc1 100644 (file)
@@ -20,7 +20,7 @@
         .controller('PodsController', PodsController);
 
     PodsController.$inject = [
-        '$scope', '$http', '$filter', '$state', 'testapiApiUrl','raiseAlert'
+        '$rootScope', '$scope', '$http', '$filter', '$state', 'testapiApiUrl','raiseAlert'
     ];
 
     /**
@@ -52,9 +52,6 @@
         ctrl.mode = 'metal';
         ctrl.details = '';
 
-        ctrl.pageHeader = 'Pods';
-        ctrl.pageParagraph = 'This page is used to create or query pods.';
-
         /**
          * This is called when the date filter calendar is opened. It
          * does some event handling, and sets a scope variable so the UI