[pve-devel] [PATCH storage v3] Fix #582: Add delay to remove button

Dominic Jäger d.jaeger at proxmox.com
Thu Jul 4 12:54:10 CEST 2019


Using the standard remove button on the GUI now passes a delay of 5 to
to the API. Advanced users can still set the delay on the CLI themselves while
beginners are offered a default that should work for many cases.

Signed-off-by: Dominic Jäger <d.jaeger at proxmox.com>
---
 button/Button.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/button/Button.js b/button/Button.js
index dade477..f5ff2b9 100644
--- a/button/Button.js
+++ b/button/Button.js
@@ -104,6 +104,8 @@ Ext.define('Proxmox.button.StdRemoveButton', {
 
     disabled: true,
 
+    delay: 5,
+
     config: {
 	baseurl: undefined
     },
@@ -132,7 +134,7 @@ Ext.define('Proxmox.button.StdRemoveButton', {
 	var me = this;
 
 	Proxmox.Utils.API2Request({
-	    url: me.getUrl(rec),
+	    url: me.getUrl(rec) + "?delay="+me.delay,
 	    method: 'DELETE',
 	    waitMsgTarget: me.waitMsgTarget,
 	    callback: function(options, success, response) {
-- 
2.20.1




More information about the pve-devel mailing list