Author: yusaku
Date: Fri Jan 11 02:17:49 2013
New Revision: 1431811

URL: http://svn.apache.org/viewvc?rev=1431811&view=rev
Log:
AMBARI-1145. Cluster Management refactoring. (yusaku)

Modified:
    
incubator/ambari/trunk/ambari-web/app/controllers/main/service/info/configs.js
    incubator/ambari/trunk/ambari-web/app/controllers/main/service/item.js

Modified: 
incubator/ambari/trunk/ambari-web/app/controllers/main/service/info/configs.js
URL: 
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/main/service/info/configs.js?rev=1431811&r1=1431810&r2=1431811&view=diff
==============================================================================
--- 
incubator/ambari/trunk/ambari-web/app/controllers/main/service/info/configs.js 
(original)
+++ 
incubator/ambari/trunk/ambari-web/app/controllers/main/service/info/configs.js 
Fri Jan 11 02:17:49 2013
@@ -213,14 +213,12 @@ App.MainServiceInfoConfigsController = E
     console.log("TRACE: In setServiceTagNames function:");
     var newServiceConfigTags = [];
     var serviceConfigTags = this.get('serviceConfigTags');
-    var time = new Date().getMilliseconds();
-    console.log("The value of time is: " + time);
     for (var index in serviceConfigTags) {
       console.log("The value of serviceConfigTags[index]: " + 
serviceConfigTags[index]);
       newServiceConfigTags.pushObject({
         siteName: index,
         tagName: serviceConfigTags[index],
-        newTagName: serviceConfigTags[index] + time
+        newTagName: null
       }, this);
     }
     this.set('serviceConfigTags', newServiceConfigTags);
@@ -654,6 +652,9 @@ App.MainServiceInfoConfigsController = E
    * Set all site property that are derived from other site-properties
    */
   setConfigValue: function (uiConfig, config) {
+    if (config.value == null) {
+      return;
+    }
     var fkValue = config.value.match(/<(foreignKey.*?)>/g);
     if (fkValue) {
       fkValue.forEach(function (_fkValue) {
@@ -706,6 +707,7 @@ App.MainServiceInfoConfigsController = E
   createConfigurations: function () {
     var result = true;
     var serviceConfigTags = this.get('serviceConfigTags');
+    this.setNewTagNames(serviceConfigTags);
     serviceConfigTags.forEach(function (_serviceTags) {
       if (_serviceTags.siteName === 'global') {
         console.log("TRACE: Inside global");
@@ -720,6 +722,13 @@ App.MainServiceInfoConfigsController = E
     return result;
   },
 
+  setNewTagNames: function(serviceConfigs) {
+    var time = (new Date).getTime();
+    serviceConfigs.forEach(function(_serviceConfigs){
+      _serviceConfigs.newTagName =  'version' + time;
+    },this);
+  },
+
   createConfigSite: function (data) {
     var result;
     var realData = data;

Modified: incubator/ambari/trunk/ambari-web/app/controllers/main/service/item.js
URL: 
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/main/service/item.js?rev=1431811&r1=1431810&r2=1431811&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/main/service/item.js 
(original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/main/service/item.js Fri 
Jan 11 02:17:49 2013
@@ -108,6 +108,8 @@ App.MainServiceItemController = Em.Contr
           }
           App.router.get('backgroundOperationsController').showPopup();
         });
+        self.set('content.isStopDisabled',true);
+        self.set('content.isStartDisabled',true);
         this.hide();
       },
       onSecondary: function() {
@@ -162,6 +164,8 @@ App.MainServiceItemController = Em.Contr
           }
           App.router.get('backgroundOperationsController').showPopup();
         });
+        self.set('content.isStopDisabled',true);
+        self.set('content.isStartDisabled',true);
         this.hide();
       },
       onSecondary: function () {


Reply via email to