ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rz...@apache.org
Subject [08/51] [abbrv] ambari git commit: AMBARI-19871 - Config version switch/compare/revert doesn't work (rzang)
Date Fri, 17 Feb 2017 22:56:46 GMT
AMBARI-19871 - Config version switch/compare/revert doesn't work (rzang)

(cherry picked from commit bcf76586b6da2a704a5b986958050a28fd0c6d26)

Change-Id: Iefaac4b4d070656319b8c4ee4eb2bae4d35d323c


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

Branch: refs/heads/branch-feature-BUG-74026
Commit: 8ffb9892468777f6f9d1fe42537d2a9a25008983
Parents: 7dbbffb
Author: Richard Zang <rzang@apache.org>
Authored: Mon Feb 6 11:30:15 2017 -0800
Committer: Zuul <releng@hortonworks.com>
Committed: Mon Feb 6 20:33:59 2017 -0800

----------------------------------------------------------------------
 .../app/views/common/configs/config_history_flow.js | 16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/8ffb9892/ambari-web/app/views/common/configs/config_history_flow.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/config_history_flow.js b/ambari-web/app/views/common/configs/config_history_flow.js
index a7b83b3..4f3ba97 100644
--- a/ambari-web/app/views/common/configs/config_history_flow.js
+++ b/ambari-web/app/views/common/configs/config_history_flow.js
@@ -45,11 +45,7 @@ App.ConfigHistoryFlowView = Em.View.extend({
     COMPARE: 'compare',
     REVERT: 'revert'
   },
-
-  /**
-   * serviceVersion object that is currently being hovered in the dropdown menu
-   */
-  hoveredServiceVersion: null,
+  
   /**
    * flag to check if sub-menu popup is currently being hovered
    */
@@ -303,11 +299,7 @@ App.ConfigHistoryFlowView = Em.View.extend({
    */
   switchVersion: function (event) {
     var version = event.context.get('version');
-    if(this.get('hoveredServiceVersion')) {
-      version = this.get('hoveredServiceVersion.version');
-    }
     var versionIndex = 0;
-
     this.set('compareServiceVersion', null);
     this.get('serviceVersions').forEach(function (serviceVersion, index) {
       if (serviceVersion.get('version') === version) {
@@ -326,7 +318,7 @@ App.ConfigHistoryFlowView = Em.View.extend({
    * add a second version-info-bar for the chosen version
    */
   compare: function (event) {
-    var serviceConfigVersion = this.get('hoveredServiceVersion') || event.context;
+    var serviceConfigVersion = event.context;
     this.set('controller.compareServiceVersion', serviceConfigVersion);
     this.set('compareServiceVersion', serviceConfigVersion);
 
@@ -363,7 +355,7 @@ App.ConfigHistoryFlowView = Em.View.extend({
    */
   revert: function (event) {
     var self = this;
-    var serviceConfigVersion = this.get('hoveredServiceVersion') || event.context || Em.Object.create({
+    var serviceConfigVersion = event.context || Em.Object.create({
       version: this.get('displayedServiceVersion.version'),
       serviceName: this.get('displayedServiceVersion.serviceName'),
       notes:''
@@ -591,9 +583,7 @@ App.ConfigHistoryDropdownRowView = Em.View.extend({
       var $el = $('#config_version_popup');
       var $currentTarget = $(event.currentTarget);
       var parentView = view.get('parentView');
-      parentView.set('hoveredServiceVersion', null);
       if (!serviceVersion.get("isDisplayed"))  {
-        parentView.set('hoveredServiceVersion', serviceVersion);
         parentView.set('isHovered', true);
         var elHeight = $el.outerHeight(),
           pagePosition = window.innerHeight + window.pageYOffset,


Mime
View raw message