[pve-devel] r5509 - pve-manager/pve2/www/manager
svn-commits at proxmox.com
svn-commits at proxmox.com
Fri Feb 11 10:45:31 CET 2011
Author: dietmar
Date: 2011-02-11 10:45:31 +0100 (Fri, 11 Feb 2011)
New Revision: 5509
Modified:
pve-manager/pve2/www/manager/StorageBrowser.js
Log:
do not use Ext.StoreMgr
Modified: pve-manager/pve2/www/manager/StorageBrowser.js
===================================================================
--- pve-manager/pve2/www/manager/StorageBrowser.js 2011-02-11 09:39:54 UTC (rev 5508)
+++ pve-manager/pve2/www/manager/StorageBrowser.js 2011-02-11 09:45:31 UTC (rev 5509)
@@ -267,8 +267,19 @@
}
};
- var smid = Ext.util.base64.encode("storage.config." + storeid);
- var store = Ext.StoreMgr.lookup(smid);
+
+ var store = new PVE.data.ObjectStore({
+ url: "/api2/json/storage/" + storeid,
+ method: 'GET',
+ autoDestory: true,
+ rows: {
+ type: { header: 'Storage Type', renderer: PVE.Utils.format_storage_type },
+ path: { header: 'Path' },
+ shared: { header: 'Shared', renderer: PVE.Utils.format_boolean },
+ disable: { header: 'Disabled', renderer: PVE.Utils.format_boolean },
+ content: { header: 'Content', renderer: PVE.Utils.format_content_types }
+ }
+ });
var set_visible_tabs = function() {
var rec = store.getById('content');
@@ -284,21 +295,6 @@
cond_view_comp('vztmpl', cthash.vztmpl);
cond_view_comp('backup', cthash.backup);
};
-
- if (!store) {
- store = new PVE.data.ObjectStore({
- url: "/api2/json/storage/" + storeid,
- method: 'GET',
- id: smid,
- rows: {
- type: { header: 'Storage Type', renderer: PVE.Utils.format_storage_type },
- path: { header: 'Path' },
- shared: { header: 'Shared', renderer: PVE.Utils.format_boolean },
- disable: { header: 'Disabled', renderer: PVE.Utils.format_boolean },
- content: { header: 'Content', renderer: PVE.Utils.format_content_types }
- }
- });
- }
Ext.apply(self, {
title: title,
@@ -356,14 +352,8 @@
store.on('load', set_visible_tabs);
store.load();
-
+
PVE.StorageBrowser.superclass.initComponent.call(self);
-
- self.on('destroy', function () {
- store.un('load', set_visible_tabs);
- });
-
-
}
});
More information about the pve-devel
mailing list