You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2013/05/29 03:57:37 UTC

svn commit: r1487192 - in /incubator/ambari/trunk: CHANGES.txt ambari-web/app/controllers/wizard/step12_controller.js ambari-web/app/messages.js ambari-web/app/templates/wizard/step13.hbs

Author: yusaku
Date: Wed May 29 01:57:37 2013
New Revision: 1487192

URL: http://svn.apache.org/r1487192
Log:
AMBARI-2204. Reassign Master Wizard: Review Config shouldn't show unchanged values. (yusaku)

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-web/app/controllers/wizard/step12_controller.js
    incubator/ambari/trunk/ambari-web/app/messages.js
    incubator/ambari/trunk/ambari-web/app/templates/wizard/step13.hbs

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1487192&r1=1487191&r2=1487192&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Wed May 29 01:57:37 2013
@@ -894,6 +894,9 @@ Trunk (unreleased changes):
  Farrellee via mahadev)
 
  BUG FIXES
+ 
+ AMBARI-2204.  Reassign Master Wizard: Review Config shouldn't show unchanged
+ values. (yusaku)
 
  AMBARI-2203.  Background operations popup does not automatically refresh the
  task log. (yusaku)

Modified: incubator/ambari/trunk/ambari-web/app/controllers/wizard/step12_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/wizard/step12_controller.js?rev=1487192&r1=1487191&r2=1487192&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/wizard/step12_controller.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/wizard/step12_controller.js Wed May 29 01:57:37 2013
@@ -19,11 +19,18 @@
 App.WizardStep12Controller = App.MainServiceInfoConfigsController.extend({
 
   modifiedConfigs: [],
+  oldConfigs: [],
 
   afterLoad: function () {
     if (this.get('dataIsLoaded')) {
       this.get('stepConfigs').objectAt(0).get('configs').filterProperty('isEditable', false).setEach('isEditable', true);
       this.get('stepConfigs').objectAt(0).get('configs').filterProperty('displayType', 'masterHost').setEach('isVisible', false);
+      this.get('oldConfigs').clear();
+      this.get('modifiedConfigs').clear();
+      this.get('stepConfigs').objectAt(0).get('configs').forEach(function (config) {
+            this.get('oldConfigs').push(jQuery.extend({}, config));
+          }, this
+      );
     }
   }.observes('dataIsLoaded'),
 
@@ -43,18 +50,16 @@ App.WizardStep12Controller = App.MainSer
     if (this.get('isSubmitDisabled')) {
       return false;
     }
-    var self = this;
-    this.get('modifiedConfigs').clear();
     this.get('stepConfigs').objectAt(0).get('configs').forEach(function (config) {
-      if (config.get('defaultValue') !== config.get('value')) {
-        self.get('modifiedConfigs').push({
+      var oldConfig = this.get('oldConfigs').filterProperty('name', config.get('name')).findProperty('id', config.get('id'));
+      if (!oldConfig || oldConfig.get('value') !== config.get('value')) {
+        this.get('modifiedConfigs').push({
           name: config.get('displayName'),
-          oldValue: config.get('defaultValue'),
-          value: config.get('value'),
-          unit: config.get('unit') || false
+          oldValue: !oldConfig ? 'null' : oldConfig.get('value') + ' ' + (oldConfig.get('unit') || ''),
+          value: config.get('value') + ' ' + (config.get('unit') || '')
         });
       }
-    });
+    }, this);
     App.router.send('next');
   }
 });

Modified: incubator/ambari/trunk/ambari-web/app/messages.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/messages.js?rev=1487192&r1=1487191&r2=1487192&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/messages.js (original)
+++ incubator/ambari/trunk/ambari-web/app/messages.js Wed May 29 01:57:37 2013
@@ -469,6 +469,8 @@ Em.I18n.translations = {
   'installer.step13.sourceHost':'Source Host:',
   'installer.step13.changes':'Configs to change:',
   'installer.step13.component':'Component name:',
+  'installer.step13.oldValue':'Old value',
+  'installer.step13.newValue':'New value',
   'installer.step14.task0':'{0} stop',
   'installer.step14.task1':'{0} create',
   'installer.step14.task2':'{0} configs create',

Modified: incubator/ambari/trunk/ambari-web/app/templates/wizard/step13.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/wizard/step13.hbs?rev=1487192&r1=1487191&r2=1487192&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/templates/wizard/step13.hbs (original)
+++ incubator/ambari/trunk/ambari-web/app/templates/wizard/step13.hbs Wed May 29 01:57:37 2013
@@ -39,8 +39,8 @@
       <ul><em> <b>{{item.name}}</b></em>
 
         <div>
-          <ul>Old value: &nbsp;<span class="text text-info">{{item.oldValue}} {{#if item.unit}}{{item.unit}}{{/if}}</span></ul>
-          <ul>New value: <span class="text text-info">{{item.value}} {{#if item.unit}}{{item.unit}}{{/if}}</span></ul>
+          <ul>{{t installer.step13.oldValue}}: &nbsp;<span class="text text-info">{{item.oldValue}}</span></ul>
+          <ul>{{t installer.step13.newValue}}: <span class="text text-info">{{item.value}}</span></ul>
         </div>
 
       </ul>