ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From atk...@apache.org
Subject ambari git commit: AMBARI-16775 Add units (MB) to 'In-Memory Cache per Daemon' which is a 'Text Box' and 'YARN Memory per Daemon' which is a 'Label'.(atkach)
Date Thu, 19 May 2016 18:00:17 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 448097783 -> db899b514


AMBARI-16775 Add units (MB) to 'In-Memory Cache per Daemon' which is a 'Text Box' and 'YARN
Memory per Daemon' which is a 'Label'.(atkach)


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

Branch: refs/heads/trunk
Commit: db899b51438ee6ba317e37ac1508488b21f07a29
Parents: 4480977
Author: Andrii Tkach <atkach@apache.org>
Authored: Thu May 19 19:54:23 2016 +0300
Committer: Andrii Tkach <atkach@apache.org>
Committed: Thu May 19 20:59:36 2016 +0300

----------------------------------------------------------------------
 ambari-web/app/styles/widgets.less                   |  8 ++++++++
 .../configs/widgets/textfield_config_widget_view.js  | 15 +++++++++------
 ambari-web/app/views/common/controls_view.js         |  3 ++-
 3 files changed, 19 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/db899b51/ambari-web/app/styles/widgets.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/widgets.less b/ambari-web/app/styles/widgets.less
index 4f04108..263736d 100644
--- a/ambari-web/app/styles/widgets.less
+++ b/ambari-web/app/styles/widgets.less
@@ -482,6 +482,14 @@
   }
 }
 
+#serviceConfig {
+  .text-field-widget {
+    .with-unit input {
+      width: 75%;
+    }
+  }
+}
+
 .label-current.icon-ok {
   color: white;
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/db899b51/ambari-web/app/views/common/configs/widgets/textfield_config_widget_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/widgets/textfield_config_widget_view.js b/ambari-web/app/views/common/configs/widgets/textfield_config_widget_view.js
index bffaaf8..1bb97fa 100644
--- a/ambari-web/app/views/common/configs/widgets/textfield_config_widget_view.js
+++ b/ambari-web/app/views/common/configs/widgets/textfield_config_widget_view.js
@@ -28,14 +28,17 @@ App.TextFieldConfigWidgetView = App.ConfigWidgetView.extend({
   /**
    * Control to edit value.
    *
-   * @type {App.ServiceConfigTextField}
+   * @type {App.ServiceConfigTextField|App.ServiceConfigTextFieldWithUnit}
    * @property configView
    */
-  configView: App.ServiceConfigTextField.extend({
-    isPopoverEnabled: 'false',
-    textFieldClassName: 'span12',
-    serviceConfigBinding: 'parentView.config'
-  }),
+  configView: function() {
+    var fieldView = (this.get('config.unit')) ? App.ServiceConfigTextFieldWithUnit : App.ServiceConfigTextField;
+    return fieldView.extend({
+      isPopoverEnabled: 'false',
+      textFieldClassName: 'span12',
+      serviceConfigBinding: 'parentView.config'
+    });
+  }.property('config.unit'),
 
   didInsertElement: function() {
     this._super();

http://git-wip-us.apache.org/repos/asf/ambari/blob/db899b51/ambari-web/app/views/common/controls_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/controls_view.js b/ambari-web/app/views/common/controls_view.js
index d0cfdd1..4e90ead 100644
--- a/ambari-web/app/views/common/controls_view.js
+++ b/ambari-web/app/views/common/controls_view.js
@@ -868,8 +868,9 @@ App.ServiceConfigLabelView = Ember.View.extend(App.ServiceConfigHostPopoverSuppo
 
   classNames: ['master-host', 'span6'],
   valueBinding: 'serviceConfig.value',
+  unitBinding: 'serviceConfig.unit',
 
-  template: Ember.Handlebars.compile('<i>{{view.value}}</i>')
+  template: Ember.Handlebars.compile('<i>{{view.value}}&nbsp;{{view.unit}}</i>')
 });
 
 /**


Mime
View raw message