Repository: ambari
Updated Branches:
  refs/heads/trunk 3d4ab478c -> ba8b03d72


AMBARI-17934. UI issue on clicking back while installing a cluster.(xiwang)


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

Branch: refs/heads/trunk
Commit: ba8b03d72468ea13e0ccfa83a314d39ffe31faf4
Parents: 3d4ab47
Author: Xi Wang <[email protected]>
Authored: Wed Jul 27 15:20:32 2016 -0700
Committer: Xi Wang <[email protected]>
Committed: Wed Jul 27 15:42:18 2016 -0700

----------------------------------------------------------------------
 ambari-web/app/controllers/installer.js | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ba8b03d7/ambari-web/app/controllers/installer.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/installer.js 
b/ambari-web/app/controllers/installer.js
index 3253de2..a2bac41 100644
--- a/ambari-web/app/controllers/installer.js
+++ b/ambari-web/app/controllers/installer.js
@@ -333,9 +333,12 @@ App.InstallerController = App.WizardController.extend({
     _oses.forEach(function (os) {
       App.OperatingSystem.find().findProperty('id', os.id).set('isSelected', 
os.is_selected);
     });
-    App.OperatingSystem.find().filterProperty('isSelected', 
false).forEach(function (os) {
-      App.stackMapper.deleteRecord(os);
-    });
+    //should delete the record on going to step 2, on going back to step 1, 
still need the record
+    if (App.router.get('currentState.name') != "step1") {
+      App.OperatingSystem.find().filterProperty('isSelected', 
false).forEach(function (os) {
+        App.stackMapper.deleteRecord(os);
+      });
+    }
     _stacks.forEach(function (_stack) {
       var stack = App.Stack.find().findProperty('id', _stack.id);
       if (stack) {

Reply via email to