The current position inside the Workspace is saved via the StateProvider separately thus this clearing operation do not lose the previous selection.
This patch also fixes another bug: when logging out while the Syslog tab of the Node panel was displayed, you had to login twice due a to a race condition in the store load of the Syslog panel. ( The login call could complete successfully before a backgroup store load, causing the faild store load call to redisplay a login window) --- www/manager6/Workspace.js | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/www/manager6/Workspace.js b/www/manager6/Workspace.js index 61d345f..eea6ce4 100644 --- a/www/manager6/Workspace.js +++ b/www/manager6/Workspace.js @@ -208,13 +208,10 @@ Ext.define('PVE.StdWorkspace', { task.delay(10); } } - // else { - // TODO: display something useful - - // Note:: error mask has wrong zindex, so we do not - // use that - see bug 114 - // PVE.Utils.setErrorMask(cont, 'nothing selected'); - //} + else { + // helper for cleaning the content when logging out + cont.removeAll(); + } }, selectById: function(nodeid) { @@ -419,9 +416,17 @@ Ext.define('PVE.StdWorkspace', { handler: function() { PVE.data.ResourceStore.stopUpdate(); me.showLogin(); - me.setContent(); + me.setContent(null); var rt = me.down('pveResourceTree'); rt.clearTree(); + + // empty the stores of the StatusPanel child items + var statusPanels = Ext.ComponentQuery.query('pveStatusPanel grid'); + Ext.Array.forEach(statusPanels, function(comp) { + if (comp.getStore()) { + comp.getStore().loadData([], false); + } + }); } } ] -- 2.1.4 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel