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
47
www/tape/window/LabelMedia.js
Normal file
47
www/tape/window/LabelMedia.js
Normal file
@ -0,0 +1,47 @@
|
||||
Ext.define('PBS.TapeManagement.LabelMediaWindow', {
|
||||
extend: 'Proxmox.window.Edit',
|
||||
alias: 'widget.pbsLabelMediaWindow',
|
||||
mixins: ['Proxmox.Mixin.CBind'],
|
||||
|
||||
isCreate: true,
|
||||
isAdd: true,
|
||||
title: gettext('Label Media'),
|
||||
submitText: gettext('OK'),
|
||||
|
||||
showProgress: true,
|
||||
|
||||
items: [
|
||||
{
|
||||
xtype: 'displayfield',
|
||||
fieldLabel: gettext('Drive'),
|
||||
cbind: {
|
||||
value: '{driveid}',
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldLabel: gettext('Label'),
|
||||
name: 'label-text',
|
||||
xtype: 'proxmoxtextfield',
|
||||
allowBlank: false,
|
||||
},
|
||||
{
|
||||
xtype: 'pbsMediaPoolSelector',
|
||||
fieldLabel: gettext('Media Pool'),
|
||||
name: 'pool',
|
||||
allowBlank: true,
|
||||
skipEmptyText: true,
|
||||
},
|
||||
],
|
||||
|
||||
initComponent: function() {
|
||||
let me = this;
|
||||
if (!me.driveid) {
|
||||
throw "no driveid given";
|
||||
}
|
||||
|
||||
let driveid = encodeURIComponent(me.driveid);
|
||||
me.url = `/api2/extjs/tape/drive/${driveid}/label-media`;
|
||||
me.callParent();
|
||||
},
|
||||
});
|
||||
|
Reference in New Issue
Block a user