From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <d.csapak@proxmox.com>
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 0C09C81029
 for <pbs-devel@lists.proxmox.com>; Mon, 22 Nov 2021 09:10:07 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id F3CE51A0DD
 for <pbs-devel@lists.proxmox.com>; Mon, 22 Nov 2021 09:09:36 +0100 (CET)
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 52B441A0D3
 for <pbs-devel@lists.proxmox.com>; Mon, 22 Nov 2021 09:09:36 +0100 (CET)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 2B59B44040
 for <pbs-devel@lists.proxmox.com>; Mon, 22 Nov 2021 09:09:36 +0100 (CET)
From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Date: Mon, 22 Nov 2021 09:09:34 +0100
Message-Id: <20211122080935.577807-2-d.csapak@proxmox.com>
X-Mailer: git-send-email 2.30.2
In-Reply-To: <20211122080935.577807-1-d.csapak@proxmox.com>
References: <20211122080935.577807-1-d.csapak@proxmox.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.208 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 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
Subject: [pbs-devel] [PATCH proxmox-backup 2/3] ui: traffic-control: fix
 sending network value
X-BeenThere: pbs-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox Backup Server development discussion
 <pbs-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pbs-devel>, 
 <mailto:pbs-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pbs-devel/>
List-Post: <mailto:pbs-devel@lists.proxmox.com>
List-Help: <mailto:pbs-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel>, 
 <mailto:pbs-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Mon, 22 Nov 2021 08:10:07 -0000

we forgot to correclty send the network value as we changed from
the radiogroup to a simple text field

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 www/window/TrafficControlEdit.js | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/www/window/TrafficControlEdit.js b/www/window/TrafficControlEdit.js
index 53b15427..69b01f7d 100644
--- a/www/window/TrafficControlEdit.js
+++ b/www/window/TrafficControlEdit.js
@@ -194,9 +194,9 @@ Ext.define('PBS.window.TrafficControlEdit', {
 	    let me = this;
 	    let isCreate = me.up('window').isCreate;
 
-	    if (!values['network-select']) {
+	    if (!values.network) {
 		values.network = '0.0.0.0/0';
-	    } else if (values.network) {
+	    } else {
 		values.network = values.network.split(/\s*,\s*/);
 	    }
 
@@ -442,10 +442,7 @@ Ext.define('PBS.window.TrafficControlEdit', {
 		success: function(response) {
 		    let data = response.result.data;
 		    if (data.network?.length === 1 && data.network[0] === '0.0.0.0/0') {
-			data['network-select'] = 'all';
 			delete data.network;
-		    } else {
-			data['network-select'] = 'limit';
 		    }
 
 		    if (Ext.isArray(data.timeframe)) {
-- 
2.30.2