You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by vg...@apache.org on 2012/05/15 04:44:49 UTC

svn commit: r1338516 - in /incubator/ambari/branches/ambari-186: CHANGES.txt hmc/js/configureServicesUtils.js hmc/js/reviewAndDeploy.js

Author: vgogate
Date: Tue May 15 02:44:48 2012
New Revision: 1338516

URL: http://svn.apache.org/viewvc?rev=1338516&view=rev
Log:
AMBARI-232. Enable LZO should show checkbox instead of text by Vikram Dixit

Modified:
    incubator/ambari/branches/ambari-186/CHANGES.txt
    incubator/ambari/branches/ambari-186/hmc/js/configureServicesUtils.js
    incubator/ambari/branches/ambari-186/hmc/js/reviewAndDeploy.js

Modified: incubator/ambari/branches/ambari-186/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/CHANGES.txt?rev=1338516&r1=1338515&r2=1338516&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/CHANGES.txt (original)
+++ incubator/ambari/branches/ambari-186/CHANGES.txt Tue May 15 02:44:48 2012
@@ -2,6 +2,8 @@ Ambari Change log
 
 Release 0.x.x - unreleased
 
+  AMBARI-232. Enable LZO should show checkbox instead of text (by Vikram Dixit via vgogate)
+
   AMBARI-231. Support hadoop cleanup (by Ramya Sunil via vgogate)
 
   AMBARI-228. Ganglia reports on host types not present (Richard Pelavin via vgogate)

Modified: incubator/ambari/branches/ambari-186/hmc/js/configureServicesUtils.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/js/configureServicesUtils.js?rev=1338516&r1=1338515&r2=1338516&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/js/configureServicesUtils.js (original)
+++ incubator/ambari/branches/ambari-186/hmc/js/configureServicesUtils.js Tue May 15 02:44:48 2012
@@ -164,7 +164,7 @@ function generateUserOpts () {
     prop.each(function (proper) {
       var value = globalYui.Lang.trim(proper.get('value'));
       if ((proper.get('type') == "checkbox")) {
-        value = proper.get('checked');
+        value = proper.get('checked').toString();
       }
 
       var keyName = globalYui.Lang.trim(proper.get('id'));

Modified: incubator/ambari/branches/ambari-186/hmc/js/reviewAndDeploy.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/js/reviewAndDeploy.js?rev=1338516&r1=1338515&r2=1338516&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/js/reviewAndDeploy.js (original)
+++ incubator/ambari/branches/ambari-186/hmc/js/reviewAndDeploy.js Tue May 15 02:44:48 2012
@@ -32,11 +32,26 @@ function renderDeploySummary (deployInfo
           continue;
         }
         serviceHasToBeRendered = true;
-        propertySummary += '<label for=' + mPropertiesKey  + 'Id>' + perServiceInfo.properties[mPropertiesKey].displayName + '</label>' +
-                         '<input type=' + convertDisplayType(perServiceInfo.properties[mPropertiesKey].type) + ' name=' + mPropertiesKey + 'Name id=' + mPropertiesKey + 'Id readonly=readonly value=\"' + perServiceInfo.properties[mPropertiesKey].value +'\">';
+
+        readOnlyAttr = 'readonly=readonly';
+        valueAttr = 'value=\"' + perServiceInfo.properties[mPropertiesKey].valu
+        type = convertDisplayType(perServiceInfo.properties[mPropertiesKey].typ
+        if (type == "checkbox") {
+          readOnlyAttr = 'disabled="disabled"';
+          var checkVal = perServiceInfo.properties[mPropertiesKey].value;
+          if (checkVal) {
+            valueAttr = 'checked=yes';
+          }
+          valueAttr = '';
+        }
+
+        propertySummary += '<div class="formElement">' +
+                             '<label for=' + mPropertiesKey  + 'Id>' + perServiceInfo.properties[mPropertiesKey].displayName + '</label>' +
+                             '<input type=' + type + ' name=' + mPropertiesKey + 'Name id=' + mPropertiesKey + 'Id ' + readOnlyAttr + ' ' + valueAttr + '>' +
+                           '</div>';
       }
     }
-    
+
     if (serviceHasToBeRendered) {
       deploySummary += '<fieldset>' + '<legend>' + perServiceInfo.displayName + '</legend>';
       deploySummary += masterSummary;