tape: implement format/erase

This commit is contained in:
Dietmar Maurer
2021-03-31 09:19:19 +02:00
parent a79082a0dd
commit e29f456efc
10 changed files with 108 additions and 38 deletions

View File

@ -84,11 +84,11 @@ Ext.define('PBS.TapeManagement.DriveStatus', {
}).show();
},
erase: function() {
format: function() {
let me = this;
let view = me.getView();
let driveid = view.drive;
PBS.Utils.driveCommand(driveid, 'erase-media', {
PBS.Utils.driveCommand(driveid, 'format-media', {
waitMsgTarget: view,
method: 'POST',
success: function(response) {
@ -212,9 +212,9 @@ Ext.define('PBS.TapeManagement.DriveStatus', {
},
},
{
text: gettext('Erase'),
text: gettext('Format'),
xtype: 'proxmoxButton',
handler: 'erase',
handler: 'format',
iconCls: 'fa fa-trash-o',
dangerous: true,
confirmMsg: gettext('Are you sure you want to erase the inserted tape?'),

View File

@ -11,13 +11,13 @@ Ext.define('PBS.TapeManagement.EraseWindow', {
return {};
},
title: gettext('Erase'),
title: gettext('Format/Erase'),
url: `/api2/extjs/tape/drive`,
showProgress: true,
submitUrl: function(url, values) {
let drive = values.drive;
delete values.drive;
return `${url}/${drive}/erase-media`;
return `${url}/${drive}/format-media`;
},
method: 'POST',