ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ababiic...@apache.org
Subject ambari git commit: AMBARI-12499 Invalid controls placing for some widgets overrides. (ababiichuk)
Date Wed, 22 Jul 2015 10:14:04 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 c7bac53aa -> f2dfe882d


AMBARI-12499 Invalid controls placing for some widgets overrides. (ababiichuk)


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

Branch: refs/heads/branch-2.1
Commit: f2dfe882d3ba1996c141ca0cb843bb6022724d32
Parents: c7bac53
Author: aBabiichuk <ababiichuk@cybervisiontech.com>
Authored: Wed Jul 22 13:08:57 2015 +0300
Committer: aBabiichuk <ababiichuk@cybervisiontech.com>
Committed: Wed Jul 22 13:13:50 2015 +0300

----------------------------------------------------------------------
 ambari-web/app/styles/widgets.less                          | 3 +++
 .../app/templates/common/configs/widgets/controls.hbs       | 8 ++++----
 .../app/views/common/configs/widgets/config_widget_view.js  | 9 +++++++++
 3 files changed, 16 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/f2dfe882/ambari-web/app/styles/widgets.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/widgets.less b/ambari-web/app/styles/widgets.less
index eb2bad2..f8eb67c 100644
--- a/ambari-web/app/styles/widgets.less
+++ b/ambari-web/app/styles/widgets.less
@@ -113,6 +113,9 @@
       }
     }
   }
+  .clear-min-height {
+    min-height: 0;
+  }
   .widget-config-raw {
     width: calc(~"100% - 30px -"@controls-min-width);
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/f2dfe882/ambari-web/app/templates/common/configs/widgets/controls.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/widgets/controls.hbs b/ambari-web/app/templates/common/configs/widgets/controls.hbs
index 389006c..8b6f785 100644
--- a/ambari-web/app/templates/common/configs/widgets/controls.hbs
+++ b/ambari-web/app/templates/common/configs/widgets/controls.hbs
@@ -27,7 +27,7 @@
   {{/unless}}
 {{/if}}
 {{#if view.canEdit}}
-  <div class="widget-config-controls">
+  <div {{bindAttr class=":widget-config-controls view.referToSelectedGroup::clear-min-height"}}>
     <div {{bindAttr class=":widget-col :left view.config.isNotDefaultValue::not-show"}}>
       <a href="#"
         {{bindAttr class=":widget-action :widget-action-undo view.undoAllowed::not-show"}}
@@ -133,6 +133,7 @@
 
 {{#if view.isOriginalSCP}}
   {{#unless view.config.hasCompareDiffs}}
+    <div class="clearfix"></div>
     {{view App.ConfigWidgetOverrideView
     serviceConfigPropertyBinding="view.config"
     isDefaultGroupSelectedBinding="controller.selectedConfigGroup.isDefault"
@@ -141,7 +142,6 @@
 {{/if}}
 
 {{#if view.isComparison}}
+  <div class="clearfix"></div>
   {{view App.ConfigWidgetComparisonView serviceConfigPropertyBinding="view.config"}}
-{{/if}}
-
-<div class="clearfix"></div>
\ No newline at end of file
+{{/if}}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/f2dfe882/ambari-web/app/views/common/configs/widgets/config_widget_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/widgets/config_widget_view.js b/ambari-web/app/views/common/configs/widgets/config_widget_view.js
index 83f8ca0..2ca6aff 100644
--- a/ambari-web/app/views/common/configs/widgets/config_widget_view.js
+++ b/ambari-web/app/views/common/configs/widgets/config_widget_view.js
@@ -352,6 +352,15 @@ App.ConfigWidgetView = Em.View.extend(App.SupportsDependentConfigs, App.WidgetPo
     this.setValue(this.get('config.value'));
   }.observes('controller.recommendationTimeStamp'),
 
+  /**
+   * defines if config has same config group as selected
+   * @type {boolean}
+   */
+  referToSelectedGroup: function() {
+    return this.get('controller.selectedConfigGroup.isDefault') && this.get('config.group')
=== null
+    || this.get('controller.selectedConfigGroup.name') === this.get('config.group.name');
+  }.property('controller.selectedConfigGroup.name', 'controller.selectedConfigGroup.isDefault'),
+
   didInsertElement: function () {
     App.tooltip($(this.get('element')).find('span'));
     var self = this;


Mime
View raw message