]> git.proxmox.com Git - proxmox-backup.git/commitdiff
ui: DataStoreContent: add 'Verify All' button
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 27 Oct 2020 15:20:05 +0000 (16:20 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 27 Oct 2020 16:41:30 +0000 (17:41 +0100)
to verify the complete datastore

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
www/DataStoreContent.js

index 28dfd74379f682ca319616f3ab0cfe2a3b85671b..870d6328710445becdcc97f93748bef5a34205eb 100644 (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',