ui: tape: add Restore Window
in the BackupOverview, when a media-set is selected Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
40590561fe
commit
85ac35aa9a
@ -20,6 +20,7 @@ TAPE_UI_FILES= \
|
||||
tape/window/LabelMedia.js \
|
||||
tape/window/PoolEdit.js \
|
||||
tape/window/TapeBackup.js \
|
||||
tape/window/TapeRestore.js \
|
||||
tape/BackupOverview.js \
|
||||
tape/ChangerConfig.js \
|
||||
tape/ChangerStatus.js \
|
||||
|
@ -148,6 +148,14 @@ Ext.define('PBS.TapeManagement.BackupOverview', {
|
||||
text: gettext('New Backup'),
|
||||
handler: 'backup',
|
||||
},
|
||||
{
|
||||
xtype: 'proxmoxButton',
|
||||
disabled: true,
|
||||
text: gettext('Restore Media Set'),
|
||||
handler: 'restore',
|
||||
parentXType: 'treepanel',
|
||||
enableFn: (rec) => !!rec.data.uuid,
|
||||
},
|
||||
],
|
||||
|
||||
columns: [
|
||||
|
45
www/tape/window/TapeRestore.js
Normal file
45
www/tape/window/TapeRestore.js
Normal file
@ -0,0 +1,45 @@
|
||||
Ext.define('PBS.TapeManagement.TapeRestoreWindow', {
|
||||
extend: 'Proxmox.window.Edit',
|
||||
alias: 'pbsTapeRestoreWindow',
|
||||
mixins: ['Proxmox.Mixin.CBind'],
|
||||
|
||||
width: 400,
|
||||
title: gettext('Restore Media Set'),
|
||||
url: '/api2/extjs/tape/restore',
|
||||
method: 'POST',
|
||||
showTaskViewer: true,
|
||||
isCreate: true,
|
||||
|
||||
defaults: {
|
||||
labelWidth: 120,
|
||||
},
|
||||
|
||||
items: [
|
||||
{
|
||||
xtype: 'displayfield',
|
||||
fieldLabel: gettext('Media Set'),
|
||||
cbind: {
|
||||
value: '{mediaset}',
|
||||
},
|
||||
},
|
||||
{
|
||||
xtype: 'displayfield',
|
||||
fieldLabel: gettext('Media Set UUID'),
|
||||
name: 'media-set',
|
||||
submitValue: true,
|
||||
cbind: {
|
||||
value: '{uuid}',
|
||||
},
|
||||
},
|
||||
{
|
||||
xtype: 'pbsDataStoreSelector',
|
||||
fieldLabel: gettext('Datastore'),
|
||||
name: 'store',
|
||||
},
|
||||
{
|
||||
xtype: 'pbsDriveSelector',
|
||||
fieldLabel: gettext('Drive'),
|
||||
name: 'drive',
|
||||
},
|
||||
],
|
||||
});
|
Loading…
Reference in New Issue
Block a user