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:09 UTC

[ambari] branch trunk updated (9d307c8 -> f4417ff)

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

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


    from 9d307c8  AMBARI-24644. Log Search: support trusted knox proxy. (#2327)
     new 60f0b5e  AMBARI-24635. Web Client Chooses Wrong Version When Reverting Configs (akovalenko)
     new f4417ff  AMBARI-24635. Web Client Chooses Wrong Version When Reverting Configs (akovalenko)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../app/templates/common/configs/config_versions_control.hbs |  2 +-
 .../app/views/common/configs/config_versions_control_view.js |  4 ++--
 .../common/configs/config_versions_control_view_test.js      | 12 ++++++------
 3 files changed, 9 insertions(+), 9 deletions(-)


[ambari] 02/02: AMBARI-24635. Web Client Chooses Wrong Version When Reverting Configs (akovalenko)

Posted by ak...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit f4417ffa9b81c0072181295a6738129cf6a61bd8
Author: Aleksandr Kovalenko <ak...@apache.org>
AuthorDate: Fri Sep 14 18:36:40 2018 +0300

    AMBARI-24635. Web Client Chooses Wrong Version When Reverting Configs (akovalenko)
---
 .../common/configs/config_versions_control_view_test.js      | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/ambari-web/test/views/common/configs/config_versions_control_view_test.js b/ambari-web/test/views/common/configs/config_versions_control_view_test.js
index c3d2372..eff49ae 100644
--- a/ambari-web/test/views/common/configs/config_versions_control_view_test.js
+++ b/ambari-web/test/views/common/configs/config_versions_control_view_test.js
@@ -101,12 +101,12 @@ describe('App.ConfigVersionsControlView', function () {
       view.sendRevertCall.restore();
     });
     it('context passed', function () {
-      view.makeCurrent({contexts: [
-        Em.Object.create({
-          version: 1,
-          serviceName: 'S1'
-        })
-      ]});
+      view.set('displayedServiceVersion', Em.Object.create({
+        version: 1,
+        serviceName: 'S1'
+      }));
+
+      view.makeCurrent();
 
       expect(App.ModalPopup.show.calledOnce).to.be.true;
       expect(view.sendRevertCall.calledWith(Em.Object.create({


[ambari] 01/02: AMBARI-24635. Web Client Chooses Wrong Version When Reverting Configs (akovalenko)

Posted by ak...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 60f0b5edb2e5d53e47b008148678c56d5ff47b0e
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'),