ui: DataStoreContent: add 'Verify All' button

to verify the complete datastore

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2020-10-27 16:20:05 +01:00 committed by Thomas Lamprecht
parent d58e6313e1
commit cd92fd7336
1 changed files with 23 additions and 0 deletions

View File

@ -285,6 +285,23 @@ Ext.define('PBS.DataStoreContent', {
win.show();
},
verifyAll: function() {
var view = this.getView();
Proxmox.Utils.API2Request({
url: `/admin/datastore/${view.datastore}/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();
},
});
},
onVerify: function(view, rI, cI, item, e, rec) {
let me = this;
view = me.getView();
@ -679,6 +696,12 @@ Ext.define('PBS.DataStoreContent', {
iconCls: 'fa fa-refresh',
handler: 'reload',
},
'-',
{
xtype: 'proxmoxButton',
text: gettext('Verify All'),
handler: 'verifyAll',
},
'->',
{
xtype: 'tbtext',