ui: tape: add Edit Windows
includes edit windows for * Drives * Changers * Media Pools * Labeling Media * Making new Tape Backups Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
committed by
Dietmar Maurer
parent
c72fdb53ae
commit
80a3749088
64
www/tape/window/PoolEdit.js
Normal file
64
www/tape/window/PoolEdit.js
Normal file
@ -0,0 +1,64 @@
|
||||
Ext.define('PBS.TapeManagement.PoolEditWindow', {
|
||||
extend: 'Proxmox.window.Edit',
|
||||
alias: 'widget.pbsPoolEditWindow',
|
||||
mixins: ['Proxmox.Mixin.CBind'],
|
||||
|
||||
isCreate: true,
|
||||
isAdd: true,
|
||||
subject: gettext('Media Pool'),
|
||||
cbindData: function(initialConfig) {
|
||||
let me = this;
|
||||
|
||||
let poolid = initialConfig.poolid;
|
||||
let baseurl = '/api2/extjs/config/media-pool';
|
||||
|
||||
me.isCreate = !poolid;
|
||||
me.url = poolid ? `${baseurl}/${encodeURIComponent(poolid)}` : baseurl;
|
||||
me.method = poolid ? 'PUT' : 'POST';
|
||||
|
||||
return { };
|
||||
},
|
||||
|
||||
items: [
|
||||
{
|
||||
fieldLabel: gettext('Name'),
|
||||
name: 'name',
|
||||
xtype: 'pmxDisplayEditField',
|
||||
renderer: Ext.htmlEncode,
|
||||
allowBlank: false,
|
||||
cbind: {
|
||||
editable: '{isCreate}',
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldLabel: gettext('Drive'),
|
||||
xtype: 'pbsDriveSelector',
|
||||
name: 'drive',
|
||||
allowBlank: false,
|
||||
autoSelect: false,
|
||||
},
|
||||
{
|
||||
fieldLabel: gettext('Allocation'),
|
||||
xtype: 'pbsAllocationSelector',
|
||||
name: 'allocation',
|
||||
skipEmptyText: true,
|
||||
allowBlank: true,
|
||||
autoSelect: false,
|
||||
cbind: {
|
||||
deleteEmpty: '{!isCreate}',
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldLabel: gettext('Retention'),
|
||||
xtype: 'pbsRetentionSelector',
|
||||
name: 'retention',
|
||||
skipEmptyText: true,
|
||||
allowBlank: true,
|
||||
autoSelect: false,
|
||||
cbind: {
|
||||
deleteEmpty: '{!isCreate}',
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
|
Reference in New Issue
Block a user