mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-07-17 07:39:58 +00:00
storage panel/browser: use insertNodes function
in preparation for dynamically loading nodes for content-type-specific views. Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
parent
a83c659a11
commit
1a763337a2
@ -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();
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user