From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id E9DEE799EE for ; Wed, 5 May 2021 11:33:51 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id E34EE12F22 for ; Wed, 5 May 2021 11:33:21 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 6E50F12F17 for ; Wed, 5 May 2021 11:33:21 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 4955F409FC for ; Wed, 5 May 2021 11:33:21 +0200 (CEST) From: Stoiko Ivanov To: pmg-devel@lists.proxmox.com Date: Wed, 5 May 2021 11:33:04 +0200 Message-Id: <20210505093304.32640-3-s.ivanov@proxmox.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210505093304.32640-1-s.ivanov@proxmox.com> References: <20210505093304.32640-1-s.ivanov@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.008 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [data.id] Subject: [pmg-devel] [PATCH pmg-gui 2/2] quarantineview: unify url generation X-BeenThere: pmg-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Mail Gateway development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2021 09:33:52 -0000 this patch adds the cleanup for the attachment quarantine from 0e26e20aa5522b3f7d05e68c96104b051419b901 to the virus- and spamquarantine. Signed-off-by: Stoiko Ivanov --- js/SpamQuarantine.js | 5 ++++- js/VirusQuarantine.js | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/js/SpamQuarantine.js b/js/SpamQuarantine.js index f580ab3..daa3a69 100644 --- a/js/SpamQuarantine.js +++ b/js/SpamQuarantine.js @@ -67,7 +67,10 @@ Ext.define('PMG.SpamQuarantine', { return; } - var url = '/api2/htmlmail/quarantine/content?id=' + rec.data.id + (raw?'&raw=1':''); + let url = `/api2/htmlmail/quarantine/content?id=${rec.data.id}`; + if (raw) { + url += '&raw=1'; + } preview.setDisabled(false); this.lookupReference('raw').setDisabled(false); this.lookupReference('spam').setDisabled(false); diff --git a/js/VirusQuarantine.js b/js/VirusQuarantine.js index 105a438..d5753dd 100644 --- a/js/VirusQuarantine.js +++ b/js/VirusQuarantine.js @@ -43,7 +43,10 @@ Ext.define('PMG.VirusQuarantine', { return; } - var url = '/api2/htmlmail/quarantine/content?id=' + rec.data.id + (raw?'&raw=1':''); + let url = `/api2/htmlmail/quarantine/content?id=${rec.data.id}`; + if (raw) { + url += '&raw=1'; + } preview.setDisabled(false); preview.update(""); }, -- 2.20.1