Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 806a62c78 -> 5fc7dbf42


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/5fc7dbf4
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5fc7dbf4
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5fc7dbf4

Branch: refs/heads/branch-2.4
Commit: 5fc7dbf425d0f2d8d3e9f1ed2c02d1c456ee8b22
Parents: 806a62c
Author: Xi Wang <xiw...@apache.org>
Authored: Wed Jul 27 15:20:32 2016 -0700
Committer: Xi Wang <xiw...@apache.org>
Committed: Wed Jul 27 15:20:42 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/5fc7dbf4/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