Repository: ranger
Updated Branches:
  refs/heads/master 349a3593c -> c397d2141


RANGER-2258: Improve the policy list page to prompt users when the service is 
disabled

Signed-off-by: peng.jianhua <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/ranger/commit/c397d214
Tree: http://git-wip-us.apache.org/repos/asf/ranger/tree/c397d214
Diff: http://git-wip-us.apache.org/repos/asf/ranger/diff/c397d214

Branch: refs/heads/master
Commit: c397d21415958cb2949d383107e472b8dde06105
Parents: 349a359
Author: zhangqiang2 <[email protected]>
Authored: Fri Oct 19 15:59:11 2018 +0800
Committer: peng.jianhua <[email protected]>
Committed: Thu Oct 25 09:32:30 2018 +0800

----------------------------------------------------------------------
 .../webapp/scripts/views/policies/RangerPolicyTableLayout.js     | 4 ++--
 .../webapp/templates/policies/RangerPolicyTableLayout_tmpl.html  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ranger/blob/c397d214/security-admin/src/main/webapp/scripts/views/policies/RangerPolicyTableLayout.js
----------------------------------------------------------------------
diff --git 
a/security-admin/src/main/webapp/scripts/views/policies/RangerPolicyTableLayout.js
 
b/security-admin/src/main/webapp/scripts/views/policies/RangerPolicyTableLayout.js
index 1150838..90ad83e 100644
--- 
a/security-admin/src/main/webapp/scripts/views/policies/RangerPolicyTableLayout.js
+++ 
b/security-admin/src/main/webapp/scripts/views/policies/RangerPolicyTableLayout.js
@@ -56,7 +56,7 @@ define(function(require){
                                rangerPolicyType : 
this.collection.queryParams['policyType'],
                                isRenderAccessTab : 
XAUtil.isRenderMasking(this.rangerServiceDefModel.get('dataMaskDef')) ? true 
                                         : 
XAUtil.isRenderRowFilter(this.rangerServiceDefModel.get('rowFilterDef')) ? true 
: false,
-                isNotAuditorAdminOrKmsAuditor : 
!(XAUtil.isAuditorOrKMSAuditor(SessionMgr))
+                isAddNewPolicyButtonShow : 
!(XAUtil.isAuditorOrKMSAuditor(SessionMgr)) && 
this.rangerService.get('isEnabled')
                        };
                },
         
@@ -168,7 +168,7 @@ define(function(require){
                                gridOpts : {
                                        row: Backgrid.Row.extend({}),
                                        header : XABackgrid,
-                                       emptyText : 'No Policies found!'
+                                       emptyText : 'No Policies found!' + 
(this.rangerService.get('isEnabled') ? '' : ' The service is disabled!')
                                },
                        }));
                },

http://git-wip-us.apache.org/repos/asf/ranger/blob/c397d214/security-admin/src/main/webapp/templates/policies/RangerPolicyTableLayout_tmpl.html
----------------------------------------------------------------------
diff --git 
a/security-admin/src/main/webapp/templates/policies/RangerPolicyTableLayout_tmpl.html
 
b/security-admin/src/main/webapp/templates/policies/RangerPolicyTableLayout_tmpl.html
index bcd495c..a2b930f 100644
--- 
a/security-admin/src/main/webapp/templates/policies/RangerPolicyTableLayout_tmpl.html
+++ 
b/security-admin/src/main/webapp/templates/policies/RangerPolicyTableLayout_tmpl.html
@@ -45,7 +45,7 @@
             </div>
             <div class="span2">
                 <div class="clearfix btn-right">
-                    {{#if isNotAuditorAdminOrKmsAuditor}}
+                    {{#if isAddNewPolicyButtonShow}}
                             <a data-js="addNewPolicy" 
href="#!/service/{{rangerService.id}}/policies/create/{{this.rangerPolicyType}}"
 class="btn btn-primary " type="button">{{tt 'lbl.addNewPolicy'}} </a>
                     {{/if}}
                 </div>

Reply via email to