2021-01-28 11:59:46 +00:00
|
|
|
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'),
|
|
|
|
|
2021-02-08 10:10:09 +00:00
|
|
|
method: 'POST',
|
|
|
|
|
2021-01-28 11:59:46 +00:00
|
|
|
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();
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|