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
50
www/tape/window/ChangerEdit.js
Normal file
50
www/tape/window/ChangerEdit.js
Normal file
@ -0,0 +1,50 @@
|
||||
Ext.define('PBS.TapeManagement.ChangerEditWindow', {
|
||||
extend: 'Proxmox.window.Edit',
|
||||
alias: 'widget.pbsChangerEditWindow',
|
||||
mixins: ['Proxmox.Mixin.CBind'],
|
||||
|
||||
isCreate: true,
|
||||
isAdd: true,
|
||||
subject: gettext('Changer'),
|
||||
cbindData: function(initialConfig) {
|
||||
let me = this;
|
||||
|
||||
let changerid = initialConfig.changerid;
|
||||
let baseurl = '/api2/extjs/config/changer';
|
||||
|
||||
me.isCreate = !changerid;
|
||||
me.url = changerid ? `${baseurl}/${encodeURIComponent(changerid)}` : baseurl;
|
||||
me.method = changerid ? 'PUT' : 'POST';
|
||||
|
||||
return { };
|
||||
},
|
||||
|
||||
items: [
|
||||
{
|
||||
fieldLabel: gettext('Name'),
|
||||
name: 'name',
|
||||
xtype: 'pmxDisplayEditField',
|
||||
renderer: Ext.htmlEncode,
|
||||
allowBlank: false,
|
||||
cbind: {
|
||||
editable: '{isCreate}',
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldLabel: gettext('Path'),
|
||||
xtype: 'pbsTapeDevicePathSelector',
|
||||
type: 'changers',
|
||||
name: 'path',
|
||||
allowBlank: false,
|
||||
},
|
||||
{
|
||||
fieldLabel: gettext('Import-Export Slots'),
|
||||
xtype: 'proxmoxtextfield',
|
||||
name: 'export-slots',
|
||||
cbind: {
|
||||
deleteEmpty: '{!isCreate}',
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
|
Reference in New Issue
Block a user