mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-07-17 18:06:06 +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'
|
hstateid: 'storagetab'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// call here, so there is a root for insertNodes()
|
||||||
|
me.callParent();
|
||||||
|
|
||||||
if (caps.storage['Datastore.Allocate'] ||
|
if (caps.storage['Datastore.Allocate'] ||
|
||||||
caps.storage['Datastore.AllocateSpace'] ||
|
caps.storage['Datastore.AllocateSpace'] ||
|
||||||
caps.storage['Datastore.Audit']) {
|
caps.storage['Datastore.Audit']) {
|
||||||
me.items.push({
|
me.insertNodes([
|
||||||
xtype: 'pveStorageContentView',
|
{
|
||||||
title: gettext('Content'),
|
xtype: 'pveStorageContentView',
|
||||||
iconCls: 'fa fa-th',
|
title: gettext('Content'),
|
||||||
itemId: 'content'
|
iconCls: 'fa fa-th',
|
||||||
});
|
itemId: 'content'
|
||||||
|
},
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (caps.storage['Permissions.Modify']) {
|
if (caps.storage['Permissions.Modify']) {
|
||||||
me.items.push({
|
me.insertNodes([
|
||||||
xtype: 'pveACLView',
|
{
|
||||||
title: gettext('Permissions'),
|
xtype: 'pveACLView',
|
||||||
iconCls: 'fa fa-unlock',
|
title: gettext('Permissions'),
|
||||||
itemId: 'permissions',
|
iconCls: 'fa fa-unlock',
|
||||||
path: '/storage/' + storeid
|
itemId: 'permissions',
|
||||||
});
|
path: '/storage/' + storeid
|
||||||
|
},
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
me.callParent();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user