proxmox-backup/www/tape/window/LabelMedia.js
Dominik Csapak 80a3749088 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>
2021-01-28 15:07:29 +01:00

48 lines
943 B
JavaScript

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();
},
});