You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ak...@apache.org on 2018/09/17 14:08:08 UTC
[ambari] 01/02: AMBARI-24635. Web Client Chooses Wrong Version When
Reverting Configs (akovalenko)
This is an automated email from the ASF dual-hosted git repository.
akovalenko pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git
commit 74d801e99a58f5cb7d0bf6176fe1af19a1f4e8e8
Author: Aleksandr Kovalenko <ak...@apache.org>
AuthorDate: Thu Sep 13 19:18:37 2018 +0300
AMBARI-24635. Web Client Chooses Wrong Version When Reverting Configs (akovalenko)
---
ambari-web/app/templates/common/configs/config_versions_control.hbs | 2 +-
ambari-web/app/views/common/configs/config_versions_control_view.js | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/ambari-web/app/templates/common/configs/config_versions_control.hbs b/ambari-web/app/templates/common/configs/config_versions_control.hbs
index e5dbcef..90b3083 100644
--- a/ambari-web/app/templates/common/configs/config_versions_control.hbs
+++ b/ambari-web/app/templates/common/configs/config_versions_control.hbs
@@ -34,7 +34,7 @@
{{else}}
{{view App.ConfigVersionsDropdownView serviceVersionsBinding="view.serviceVersions"}}
{{#unless view.displayedServiceVersion.isCurrent}}
- <button class="btn btn-secondary make-current" {{action makeCurrent view.displayedServiceVersion target="view"}}>
+ <button class="btn btn-secondary make-current" {{action makeCurrent target="view"}}>
{{t dashboard.configHistory.info-bar.revert.button}}
</button>
{{/unless}}
diff --git a/ambari-web/app/views/common/configs/config_versions_control_view.js b/ambari-web/app/views/common/configs/config_versions_control_view.js
index 5fb9732..6cf4523 100644
--- a/ambari-web/app/views/common/configs/config_versions_control_view.js
+++ b/ambari-web/app/views/common/configs/config_versions_control_view.js
@@ -155,9 +155,9 @@ App.ConfigVersionsControlView = Em.View.extend({
/**
* revert config values to chosen version and apply reverted configs to server
*/
- makeCurrent: function (event) {
+ makeCurrent: function () {
const self = this;
- const serviceConfigVersion = event.contexts[0];
+ const serviceConfigVersion = this.get('displayedServiceVersion');
const versionText = serviceConfigVersion.get('versionText');
return App.ModalPopup.show({
header: Em.I18n.t('dashboard.configHistory.info-bar.makeCurrent.popup.title'),