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:19:10 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 270c23fb1 -> 9fc034fff


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/9fc034ff
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9fc034ff
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9fc034ff

Branch: refs/heads/branch-2.4
Commit: 9fc034fff2a36e13644e38b57a5c1986d55824db
Parents: 270c23f
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 21:18:55 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/9fc034ff/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/9fc034ff/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/9fc034ff/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