[pbs-devel] [PATCH proxmox-backup 2/8] ui: DataStoreContent: add 'Verify All' button

Dominik Csapak d.csapak at proxmox.com
Tue Oct 27 16:20:05 CET 2020


to verify the complete datastore

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/DataStoreContent.js | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/www/DataStoreContent.js b/www/DataStoreContent.js
index 28dfd743..870d6328 100644
--- a/www/DataStoreContent.js
+++ b/www/DataStoreContent.js
@@ -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',
-- 
2.20.1






More information about the pbs-devel mailing list