[ambari] branch trunk updated: [AMBARI-25212] configs.py output and Ambari API output of config properties are not in same sorted order.

2019-04-04 Thread jaysensharma
This is an automated email from the ASF dual-hosted git repository.

jaysensharma pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 180a7a3  [AMBARI-25212] configs.py output and Ambari API output of 
config properties are not in same sorted order.
 new 23aab4c  Merge pull request #2889 from jaysensharma/AMBARI-25212
180a7a3 is described below

commit 180a7a3c1604e36e1b9f869fb42f4863d8f37926
Author: Jay SenSharma 
AuthorDate: Tue Mar 26 13:01:43 2019 +1100

[AMBARI-25212] configs.py output and Ambari API output of config properties 
are not in same sorted order.
---
 ambari-server/src/main/resources/scripts/configs.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ambari-server/src/main/resources/scripts/configs.py 
b/ambari-server/src/main/resources/scripts/configs.py
index 7c7ca0f..5ce7392 100644
--- a/ambari-server/src/main/resources/scripts/configs.py
+++ b/ambari-server/src/main/resources/scripts/configs.py
@@ -20,6 +20,7 @@ limitations under the License.
 
 import optparse
 from optparse import OptionGroup
+from collections import OrderedDict
 import sys
 import urllib2, ssl
 import time
@@ -134,7 +135,7 @@ def get_current_config(cluster, config_type, accessor):
   config_tag = get_config_tag(cluster, config_type, accessor)
   logger.info("### on (Site:{0}, Tag:{1})".format(config_type, config_tag))
   response = accessor(CONFIGURATION_URL.format(cluster, config_type, 
config_tag))
-  config_by_tag = json.loads(response)
+  config_by_tag = json.loads(response, object_pairs_hook=OrderedDict)
   current_config = config_by_tag[ITEMS][0]
   return current_config[PROPERTIES], current_config.get(ATTRIBUTES, {})
 



[ambari] branch branch-2.7 updated: [AMBARI-25187] Kerberos operations are shown in service action dropdown when not needed (#2909)

2019-04-04 Thread benyoka
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 @@
   {{t admin.security.enabled}}
   {{#isAuthorized "CLUSTER.TOGGLE_KERBEROS"}}
 {{#if App.supports.enableToggleKerberos}}
-  {{t 
admin.kerberos.button.disable}} 
-  {{#unless isManualKerberos}}
+  {{t 
admin.kerberos.button.disable}} 
+  {{#unless controller.isManualKerberos}}
 
+id="regenerate-keytabs" {{bindAttr 
disabled="controller.isKerberosButtonsDisabled"}} {{action regenerateKeytabs 
target="controller"}}>
{{t 
admin.kerberos.button.regenerateKeytabs}}
 {{#if App.isCredentialStorePersistent}}
   {{t 
admin.kerberos.credentials.store.menu.label}}