You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by rz...@apache.org on 2017/02/06 19:36:48 UTC
ambari git commit: AMBARI-19871 - Config version
switch/compare/revert doesn't work (rzang)
Repository: ambari
Updated Branches:
refs/heads/trunk df8c06ca7 -> e35bfd32b
AMBARI-19871 - Config version switch/compare/revert doesn't work (rzang)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e35bfd32
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e35bfd32
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e35bfd32
Branch: refs/heads/trunk
Commit: e35bfd32b90282eae83fd14bbfaaf50e1bf47c87
Parents: df8c06c
Author: Richard Zang <rz...@apache.org>
Authored: Mon Feb 6 11:30:15 2017 -0800
Committer: Richard Zang <rz...@apache.org>
Committed: Mon Feb 6 11:31:15 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/e35bfd32/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 c216890..687d398 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,