public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 3/3] ui: datastore/Content: add 'Re-Verify after (days)' input to 'Verify All'
Date: Thu, 27 Jan 2022 15:13:21 +0100	[thread overview]
Message-ID: <20220127141321.1072674-3-d.csapak@proxmox.com> (raw)
In-Reply-To: <20220127141321.1072674-1-d.csapak@proxmox.com>

so that a user can select when snapshots should be re-verified

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 www/datastore/Content.js | 36 +++++++++++++++++++++++++-----------
 1 file changed, 25 insertions(+), 11 deletions(-)

diff --git a/www/datastore/Content.js b/www/datastore/Content.js
index d0498bc7..c04bf32a 100644
--- a/www/datastore/Content.js
+++ b/www/datastore/Content.js
@@ -329,17 +329,32 @@ Ext.define('PBS.DataStoreContent', {
 	verifyAll: function() {
 	    var view = this.getView();
 
-	    Proxmox.Utils.API2Request({
-		url: `/admin/datastore/${view.datastore}/verify`,
+	    Ext.create('Proxmox.window.Edit', {
+		title: Ext.String.format(gettext("Verify '{0}'"), view.datastore),
+
 		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();
-		},
+		submitText: gettext('OK'),
+		autoShow: true,
+		isCreate: true,
+		showTaskViewer: true,
+
+		taskDone: () => this.reload(),
+
+		url: `/api2/extjs/admin/datastore/${view.datastore}/verify`,
+
+		items: [
+		    {
+			xtype: 'proxmoxintegerfield',
+			name: 'outdated-after',
+			fieldLabel: gettext('Re-Verify After (days)'),
+			labelWidth: 150,
+			minValue: 1,
+			value: 30,
+			allowBlank: true,
+			emptyText: gettext('Never'),
+			deleteEmpty: false,
+		    },
+		],
 	    });
 	},
 
@@ -1004,7 +1019,6 @@ Ext.define('PBS.DataStoreContent', {
 	{
 	    xtype: 'proxmoxButton',
 	    text: gettext('Verify All'),
-	    confirmMsg: gettext('Do you want to verify all snapshots now?'),
 	    handler: 'verifyAll',
 	},
 	{
-- 
2.30.2





  parent reply	other threads:[~2022-01-27 14:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-27 14:13 [pbs-devel] [PATCH proxmox-backup 1/3] verify: allow '0' days for reverification Dominik Csapak
2022-01-27 14:13 ` [pbs-devel] [PATCH proxmox-backup 2/3] ui: datastore/Content: improve verification actions Dominik Csapak
2022-01-27 14:33   ` [pbs-devel] applied: " Thomas Lamprecht
2022-01-27 14:13 ` Dominik Csapak [this message]
2022-01-27 14:32 ` [pbs-devel] applied: [PATCH proxmox-backup 1/3] verify: allow '0' days for reverification Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220127141321.1072674-3-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal