5
0
mirror of git://git.proxmox.com/git/proxmox-backup.git synced 2025-01-10 01:18:06 +03:00

DataStoreConfig.js: add verify button

This commit is contained in:
Dietmar Maurer 2020-06-30 13:28:42 +02:00
parent 8f6088c130
commit 40b63186a6

View File

@ -58,6 +58,27 @@ Ext.define('PBS.DataStoreConfig', {
}).show();
},
onVerify: function() {
var view = this.getView();
let rec = view.selModel.getSelection()[0];
if (!(rec && rec.data)) return;
let data = rec.data;
Proxmox.Utils.API2Request({
url: `/admin/datastore/${data.name}/verify`,
method: 'POST',
failure: function(response) {
Ext.Msg.alert(gettext('Error'), response.htmlStatus);
},
success: function(response, options) {
Ext.create('Proxmox.window.TaskViewer', {
upid: response.result.data,
}).show();
},
});
},
garbageCollect: function() {
let me = this;
let view = me.getView();
@ -115,6 +136,12 @@ Ext.define('PBS.DataStoreConfig', {
},
// remove_btn
'-',
{
xtype: 'proxmoxButton',
text: gettext('Verify'),
disabled: true,
handler: 'onVerify',
},
{
xtype: 'proxmoxButton',
text: gettext('Start GC'),