c0ac207453
by introducing a datastorepanel (a TabPanel) which holds the content and acl panel for now. to be able to handle this in the router, we have to change the logic of how to select the datastore from using the subpath to putting it into the path (and extracting it when necessary) if we need this again (e.g. possibly for remotes), we can further refactor this logic to be more generic Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
41 lines
689 B
JavaScript
41 lines
689 B
JavaScript
Ext.define('PBS.DataStorePanel', {
|
|
extend: 'Ext.tab.Panel',
|
|
alias: 'widget.pbsDataStorePanel',
|
|
mixins: ['Proxmox.Mixin.CBind'],
|
|
|
|
cbindData: function(initalConfig) {
|
|
let me = this;
|
|
return {
|
|
aclPath: `/datastore/${me.datastore}`,
|
|
};
|
|
},
|
|
|
|
border: false,
|
|
defaults: {
|
|
border: false,
|
|
},
|
|
|
|
items: [
|
|
{
|
|
xtype: 'pbsDataStoreContent',
|
|
cbind: {
|
|
datastore: '{datastore}',
|
|
},
|
|
},
|
|
{
|
|
itemId: 'acl',
|
|
xtype: 'pbsACLView',
|
|
aclExact: true,
|
|
cbind: {
|
|
aclPath: '{aclPath}',
|
|
},
|
|
},
|
|
],
|
|
|
|
initComponent: function() {
|
|
let me = this;
|
|
me.title = `${gettext("Data Store")}: ${me.datastore}`;
|
|
me.callParent();
|
|
},
|
|
});
|