in preparation for dynamically loading nodes for content-type-specific views.

Signed-off-by: Fabian Ebner <[email protected]>
---
 www/manager6/storage/Browser.js | 35 +++++++++++++++++++--------------
 1 file changed, 20 insertions(+), 15 deletions(-)

diff --git a/www/manager6/storage/Browser.js b/www/manager6/storage/Browser.js
index e93aa8de..7537bdf1 100644
--- a/www/manager6/storage/Browser.js
+++ b/www/manager6/storage/Browser.js
@@ -35,27 +35,32 @@ Ext.define('PVE.storage.Browser', {
            hstateid: 'storagetab'
        });
 
+       // call here, so there is a root for insertNodes()
+       me.callParent();
+
        if (caps.storage['Datastore.Allocate'] ||
            caps.storage['Datastore.AllocateSpace'] ||
            caps.storage['Datastore.Audit']) {
-           me.items.push({
-               xtype: 'pveStorageContentView',
-               title: gettext('Content'),
-               iconCls: 'fa fa-th',
-               itemId: 'content'
-           });
+           me.insertNodes([
+               {
+                   xtype: 'pveStorageContentView',
+                   title: gettext('Content'),
+                   iconCls: 'fa fa-th',
+                   itemId: 'content'
+               },
+           ]);
        }
 
        if (caps.storage['Permissions.Modify']) {
-           me.items.push({
-               xtype: 'pveACLView',
-               title: gettext('Permissions'),
-               iconCls: 'fa fa-unlock',
-               itemId: 'permissions',
-               path: '/storage/' + storeid
-           });
+           me.insertNodes([
+               {
+                   xtype: 'pveACLView',
+                   title: gettext('Permissions'),
+                   iconCls: 'fa fa-unlock',
+                   itemId: 'permissions',
+                   path: '/storage/' + storeid
+               },
+           ]);
        }
-
-       me.callParent();
    }
 });
-- 
2.20.1



_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to