Return-Path: X-Original-To: apmail-ambari-commits-archive@www.apache.org Delivered-To: apmail-ambari-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E88C011FE5 for ; Wed, 2 Jul 2014 17:51:53 +0000 (UTC) Received: (qmail 80941 invoked by uid 500); 2 Jul 2014 17:51:53 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 80913 invoked by uid 500); 2 Jul 2014 17:51:53 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 80904 invoked by uid 99); 2 Jul 2014 17:51:53 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jul 2014 17:51:53 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 8BF5999416D; Wed, 2 Jul 2014 17:51:53 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: alexantonenko@apache.org To: commits@ambari.apache.org Message-Id: <331cd58552254789b9e4e6a41ebaaa69@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: AMBARI-6359. Hosts page : mysterious "selected hosts" keep coming back (alexantonenko) Date: Wed, 2 Jul 2014 17:51:53 +0000 (UTC) Repository: ambari Updated Branches: refs/heads/branch-1.6.1 46edd9cb0 -> a9c7e16aa AMBARI-6359. Hosts page : mysterious "selected hosts" keep coming back (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a9c7e16a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a9c7e16a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a9c7e16a Branch: refs/heads/branch-1.6.1 Commit: a9c7e16aae1e09232feadd6e09478d620d2e84ec Parents: 46edd9c Author: Alex Antonenko Authored: Wed Jul 2 20:10:56 2014 +0300 Committer: Alex Antonenko Committed: Wed Jul 2 20:10:56 2014 +0300 ---------------------------------------------------------------------- ambari-web/app/models/cluster_states.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/a9c7e16a/ambari-web/app/models/cluster_states.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/models/cluster_states.js b/ambari-web/app/models/cluster_states.js index 1fdb084..4eab62a 100644 --- a/ambari-web/app/models/cluster_states.js +++ b/ambari-web/app/models/cluster_states.js @@ -143,10 +143,12 @@ App.clusterStatus = Em.Object.create(App.UserPref, { // restore HAWizard data if process was started var isHAWizardStarted = App.get('isAdmin') && !App.isEmptyObject(response.localdb.HighAvailabilityWizard); if (params.data.overrideLocaldb || isHAWizardStarted) { + var localdbTables = (App.db.data.app && App.db.data.app.tables) ? App.db.data.app.tables : {}; App.db.data = response.localdb; App.db.setLocalStorage(); App.db.setUser(params.data.user); App.db.setLoginName(params.data.login); + App.db.data.app.tables = localdbTables; } } } @@ -189,7 +191,6 @@ App.clusterStatus = Em.Object.create(App.UserPref, { if (App.get('testMode')) return false; var user = App.db.getUser(); var login = App.db.getLoginName(); - var displayLength = App.db.data.app.tables.displayLength; var val = {clusterName: this.get('clusterName')}; if (newValue) { App.db.cleanTmp(); @@ -213,18 +214,17 @@ App.clusterStatus = Em.Object.create(App.UserPref, { delete newValue.localdb.app.user; if (newValue.localdb.app && newValue.localdb.app.loginName) delete newValue.localdb.app.loginName; - if (newValue.localdb.app && newValue.localdb.app.tables && newValue.localdb.app.tables.displayLength) - delete newValue.localdb.app.tables.displayLength; + if (newValue.localdb.app && newValue.localdb.app.tables) + delete newValue.localdb.app.tables; this.set('localdb', newValue.localdb); val.localdb = newValue.localdb; } else { delete App.db.data.app.user; delete App.db.data.app.loginName; - delete App.db.data.app.tables.displayLength; + delete App.db.data.app.tables; val.localdb = App.db.data; App.db.setUser(user); App.db.setLoginName(login); - App.db.data.app.tables.displayLength = displayLength; } if (opt) {