This is an automated email from the ASF dual-hosted git repository.

benyoka pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-2.7 by this push:
     new 4046ebd  [AMBARI-25187] Kerberos operations are shown in service 
action dropdown when not needed (#2909)
4046ebd is described below

commit 4046ebd93f7a7a1adedfbe5d568769cc38421629
Author: payert <35402259+pay...@users.noreply.github.com>
AuthorDate: Thu Apr 4 17:33:11 2019 +0200

    [AMBARI-25187] Kerberos operations are shown in service action dropdown 
when not needed (#2909)
    
    * [AMBARI-25187] Fixed Kerberos page template to disable kerberos related 
buttons when Ambari is not managing Kerberos identities.
    
    Kerberos page template is fixed to properly reach isManualKerberos and 
isKerberosButtonsDisabled variables.
    
    Change-Id: I9084f56a1397a080494a5ba34cddd77d2cf59f3a
    
    * Remove "Regenerate Keytabs" menu items from "ACTIONS" dropdown menu when 
Kerberos is not managed by Ambari
    
    Change-Id: Iff78afbfbe8d49587e4ffa780054887d1e49b2c6
    
    * Fix reaching "isManualKerberos" variable
    
    The "isManualKerberos" variable in "host_components.js" is not reachable
    via App.get.
    
    Change-Id: I74ad043fbdf5147ec3000778a7caa68051cd1655
---
 ambari-web/app/models/host_component.js          | 2 +-
 ambari-web/app/templates/main/admin/kerberos.hbs | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/ambari-web/app/models/host_component.js 
b/ambari-web/app/models/host_component.js
index 55122b7..1c5a933 100644
--- a/ambari-web/app/models/host_component.js
+++ b/ambari-web/app/models/host_component.js
@@ -372,7 +372,7 @@ App.HostComponentActionMap = {
         action: 'regenerateKeytabFileOperations',
         label: Em.I18n.t('admin.kerberos.button.regenerateKeytabs'),
         cssClass: 'glyphicon glyphicon-repeat',
-        isHidden: !App.get('isKerberosEnabled')
+        isHidden: !App.get('isKerberosEnabled') || 
Em.computed.bool('App.router.mainAdminKerberosController.isManualKerberos')
       },
       REFRESHQUEUES: {
         action: 'refreshYarnQueues',
diff --git a/ambari-web/app/templates/main/admin/kerberos.hbs 
b/ambari-web/app/templates/main/admin/kerberos.hbs
index e74a90c..1552c63 100644
--- a/ambari-web/app/templates/main/admin/kerberos.hbs
+++ b/ambari-web/app/templates/main/admin/kerberos.hbs
@@ -21,10 +21,10 @@
       <span class="text-success">{{t admin.security.enabled}}</span>
       {{#isAuthorized "CLUSTER.TOGGLE_KERBEROS"}}
         {{#if App.supports.enableToggleKerberos}}
-          <button class="btn btn-padding btn-warning 
admin-disable-security-btn" {{bindAttr disabled="isKerberosButtonsDisabled"}} 
{{action notifySecurityOffPopup target="controller"}}>{{t 
admin.kerberos.button.disable}} </button>
-          {{#unless isManualKerberos}}
+          <button class="btn btn-padding btn-warning 
admin-disable-security-btn" {{bindAttr 
disabled="controller.isKerberosButtonsDisabled"}} {{action 
notifySecurityOffPopup target="controller"}}>{{t 
admin.kerberos.button.disable}} </button>
+          {{#unless controller.isManualKerberos}}
             <button class="btn btn-success"
-                    id="regenerate-keytabs" {{bindAttr 
disabled="isKerberosButtonsDisabled"}} {{action regenerateKeytabs 
target="controller"}}>
+                    id="regenerate-keytabs" {{bindAttr 
disabled="controller.isKerberosButtonsDisabled"}} {{action regenerateKeytabs 
target="controller"}}>
               <i class="glyphicon glyphicon-repeat"></i>&nbsp; {{t 
admin.kerberos.button.regenerateKeytabs}}</button>
             {{#if App.isCredentialStorePersistent}}
               <button class="btn btn-primary" {{action 
showManageKDCCredentialsPopup target="controller"}}>{{t 
admin.kerberos.credentials.store.menu.label}}</button>

Reply via email to