ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srima...@apache.org
Subject ambari git commit: AMBARI-10876. Original configs are editable while override processing (Richard Zang via srimanth)
Date Mon, 04 May 2015 22:33:24 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 1111996fe -> 002d9c286


AMBARI-10876. Original configs are editable while override processing (Richard Zang via srimanth)


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

Branch: refs/heads/trunk
Commit: 002d9c286d46f131b963613223ed15f189cf810f
Parents: 1111996
Author: Srimanth Gunturi <sgunturi@hortonworks.com>
Authored: Mon May 4 15:32:30 2015 -0700
Committer: Srimanth Gunturi <sgunturi@hortonworks.com>
Committed: Mon May 4 15:32:30 2015 -0700

----------------------------------------------------------------------
 ambari-web/app/templates/common/configs/widgets/controls.hbs  | 2 +-
 .../app/views/common/configs/widgets/config_widget_view.js    | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/002d9c28/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 268ab26..1ac8678 100644
--- a/ambari-web/app/templates/common/configs/widgets/controls.hbs
+++ b/ambari-web/app/templates/common/configs/widgets/controls.hbs
@@ -31,7 +31,7 @@
           </a>
         {{/if}}
       {{/if}}
-      {{#if view.supportSwitchToCheckBox}}
+      {{#if view.showPencil}}
         <a href="#"
           {{bindAttr class=":icon-pencil :widget-action :widget-action-switch-view view.isHover::hide
view.showAsTextBox::active"}}
           {{action "toggleWidgetView" target="view"}}>

http://git-wip-us.apache.org/repos/asf/ambari/blob/002d9c28/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 bfa64a2..a6d2960 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
@@ -89,6 +89,13 @@ App.ConfigWidgetView = Em.View.extend(App.SupportsDependentConfigs, App.WidgetPo
   supportSwitchToCheckBox: false,
 
   /**
+   * @type {boolean}
+   */
+  showPencil: function () {
+    return this.get('supportSwitchToCheckBox') && !this.get('disabled');
+  }.property('supportSwitchToCheckBox', 'disabled'),
+
+  /**
    * Alias to <code>config.isOriginalSCP</code>
    * Should be used in the templates
    * Don't use original <code>config.isOriginalSCP</code> in the widget-templates!!!


Mime
View raw message