ui: improve media pool config grid - add comment field

This commit is contained in:
Dietmar Maurer 2021-03-02 11:43:25 +01:00
parent db04d10d14
commit 6c92449702
2 changed files with 80 additions and 47 deletions

View File

@ -1,6 +1,15 @@
Ext.define('pbs-model-media-pool', {
extend: 'Ext.data.Model',
fields: ['name', 'allocation', 'retention', 'template', 'encrypt'],
fields: [
'name', 'allocation', 'retention', 'template', 'encrypt', 'comment',
{
name: 'encryption',
type: 'bool',
calculate: function(data) {
return !!data.encrypt;
},
},
],
idProperty: 'name',
});
@ -102,18 +111,26 @@ Ext.define('PBS.TapeManagement.PoolPanel', {
{
text: gettext('Allocation'),
dataIndex: 'allocation',
flex: 1,
},
{
text: gettext('Retention'),
dataIndex: 'retention',
flex: 1,
},
{
text: gettext('Encryption'),
dataIndex: 'encryption',
renderer: Proxmox.Utils.format_boolean,
},
{
text: gettext('Encryption Fingerprint'),
dataIndex: 'encrypt',
hidden: true,
flex: 3,
},
{
text: gettext('Comment'),
dataIndex: 'comment',
flex: 3,
},
],
});

View File

@ -19,7 +19,9 @@ Ext.define('PBS.TapeManagement.PoolEditWindow', {
return { };
},
items: [
items: {
xtype: 'inputpanel',
column1: [
{
fieldLabel: gettext('Name'),
name: 'name',
@ -52,6 +54,9 @@ Ext.define('PBS.TapeManagement.PoolEditWindow', {
deleteEmpty: '{!isCreate}',
},
},
],
column2: [
{
fieldLabel: gettext('Encryption Key'),
xtype: 'pbsTapeKeySelector',
@ -64,5 +69,16 @@ Ext.define('PBS.TapeManagement.PoolEditWindow', {
},
},
],
});
columnB: [
{
fieldLabel: gettext('Comment'),
xtype: 'proxmoxtextfield',
name: 'comment',
cbind: {
deleteEmpty: '{!isCreate}',
},
},
],
},
});