2020-05-20 10:15:38 +00:00
|
|
|
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}`,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
|
2020-10-27 15:20:11 +00:00
|
|
|
stateId: 'pbs-datastore-panel',
|
|
|
|
stateful: true,
|
|
|
|
|
|
|
|
stateEvents: ['tabchange'],
|
|
|
|
|
|
|
|
applyState: function(state) {
|
|
|
|
let me = this;
|
|
|
|
if (state.tab !== undefined) {
|
|
|
|
me.setActiveTab(state.tab);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
getState: function() {
|
|
|
|
let me = this;
|
|
|
|
return {
|
|
|
|
tab: me.getActiveTab().getItemId(),
|
|
|
|
};
|
|
|
|
},
|
|
|
|
|
2020-05-20 10:15:38 +00:00
|
|
|
border: false,
|
|
|
|
defaults: {
|
|
|
|
border: false,
|
|
|
|
},
|
|
|
|
|
2020-11-10 08:15:12 +00:00
|
|
|
tools: [PBS.Utils.get_help_tool("datastore_intro")],
|
|
|
|
|
2020-05-20 10:15:38 +00:00
|
|
|
items: [
|
|
|
|
{
|
2020-10-27 15:20:07 +00:00
|
|
|
xtype: 'pbsDataStoreSummary',
|
|
|
|
title: gettext('Summary'),
|
|
|
|
itemId: 'summary',
|
2020-10-27 15:20:08 +00:00
|
|
|
iconCls: 'fa fa-book',
|
2020-10-27 15:20:06 +00:00
|
|
|
cbind: {
|
|
|
|
datastore: '{datastore}',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2020-10-27 15:20:07 +00:00
|
|
|
xtype: 'pbsDataStoreContent',
|
|
|
|
itemId: 'content',
|
2020-10-27 15:20:08 +00:00
|
|
|
iconCls: 'fa fa-th',
|
2020-05-20 10:15:38 +00:00
|
|
|
cbind: {
|
|
|
|
datastore: '{datastore}',
|
|
|
|
},
|
|
|
|
},
|
2020-05-26 10:19:04 +00:00
|
|
|
{
|
2020-10-27 16:42:29 +00:00
|
|
|
title: gettext('Prune & GC'),
|
2020-10-27 15:20:07 +00:00
|
|
|
xtype: 'pbsDataStorePruneAndGC',
|
|
|
|
itemId: 'prunegc',
|
2020-10-27 15:20:08 +00:00
|
|
|
iconCls: 'fa fa-trash-o',
|
|
|
|
cbind: {
|
|
|
|
datastore: '{datastore}',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
iconCls: 'fa fa-refresh',
|
|
|
|
itemId: 'syncjobs',
|
|
|
|
xtype: 'pbsSyncJobView',
|
|
|
|
cbind: {
|
|
|
|
datastore: '{datastore}',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
iconCls: 'fa fa-check-circle',
|
|
|
|
itemId: 'verifyjobs',
|
|
|
|
xtype: 'pbsVerifyJobView',
|
2020-05-26 10:19:04 +00:00
|
|
|
cbind: {
|
|
|
|
datastore: '{datastore}',
|
|
|
|
},
|
|
|
|
},
|
2020-11-06 16:51:52 +00:00
|
|
|
{
|
|
|
|
xtype: 'pbsDatastoreOptionView',
|
|
|
|
itemId: 'options',
|
|
|
|
title: gettext('Options'),
|
|
|
|
iconCls: 'fa fa-cog',
|
|
|
|
cbind: {
|
|
|
|
datastore: '{datastore}',
|
|
|
|
},
|
|
|
|
},
|
2020-05-20 10:15:38 +00:00
|
|
|
{
|
|
|
|
itemId: 'acl',
|
|
|
|
xtype: 'pbsACLView',
|
2020-10-27 15:20:08 +00:00
|
|
|
iconCls: 'fa fa-unlock',
|
2020-05-20 10:15:38 +00:00
|
|
|
cbind: {
|
|
|
|
aclPath: '{aclPath}',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
|
|
|
|
initComponent: function() {
|
|
|
|
let me = this;
|
2020-07-02 15:20:38 +00:00
|
|
|
me.title = `${gettext("Datastore")}: ${me.datastore}`;
|
2020-05-20 10:15:38 +00:00
|
|
|
me.callParent();
|
|
|
|
},
|
|
|
|
});
|