瀏覽代碼

AMBARI-6191. Error in saving local db to localStorage. (akovalenko)

Aleksandr Kovalenko 11 年之前
父節點
當前提交
ad1c712f83

+ 5 - 1
ambari-web/app/controllers/installer.js

@@ -59,7 +59,11 @@ App.InstallerController = App.WizardController.extend({
     'serviceConfigGroups',
     'serviceConfigProperties',
     'configsToUpdate',
-    'bootStatus'
+    'bootStatus',
+    'stacksVersions',
+    'currentStep',
+    'serviceInfo',
+    'hostInfo'
   ],
 
   init: function () {

+ 18 - 0
ambari-web/app/controllers/main/service/reassign_controller.js

@@ -60,6 +60,24 @@ App.ReassignMasterController = App.WizardController.extend({
     securityEnabled: false
   }),
 
+  /**
+   * Wizard properties in local storage, which should be cleaned right after wizard has been finished
+   */
+  dbPropertiesToClean: [
+    'cluster',
+    'hosts',
+    'installOptions',
+    'masterComponentHosts',
+    'serviceComponents',
+    'masterComponent',
+    'securityEnabled',
+    'currentStep',
+    'reassignHosts',
+    'tasksStatuses',
+    'tasksRequestIds',
+    'requestIds'
+  ],
+
   addManualSteps: function () {
     this.set('content.hasManualSteps', this.get('content.componentsWithManualCommands').contains(this.get('content.reassign.component_name')) || this.get('content.securityEnabled'));
   }.observes('content.reassign.component_name', 'content.securityEnabled'),

+ 2 - 2
ambari-web/app/utils/db.js

@@ -325,7 +325,7 @@ App.db.setReassignTasksRequestIds = function (requestIds) {
 
 App.db.setStacks = function (stacks) {
   App.db.data = localStorage.getObject('ambari');
-  App.db.data.app.stacksVersions = stacks;
+  App.db.data.Installer.stacksVersions = stacks;
   localStorage.setObject('ambari', App.db.data);
 };
 
@@ -736,7 +736,7 @@ App.db.getIsNameNodeHa = function (haStatus) {
 
 App.db.getStacks = function () {
   App.db.data = localStorage.getObject('ambari');
-  return App.db.data.app.stacksVersions;
+  return App.db.data.Installer.stacksVersions;
 };
 
 App.db.getServices = function () {