ui: traffic-control edit: simple duplicate networks detection

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2021-11-22 10:26:13 +01:00
parent 5d5a53059f
commit 76ee3085a4

View File

@ -197,7 +197,7 @@ Ext.define('PBS.window.TrafficControlEdit', {
if (!values.network) { if (!values.network) {
values.network = ['0.0.0.0/0', '::/0']; values.network = ['0.0.0.0/0', '::/0'];
} else { } else {
values.network = values.network.split(/\s*,\s*/); values.network = [...new Set(values.network.split(/\s*,\s*/))];
} }
if ('timeframe' in values && !values.timeframe) { if ('timeframe' in values && !values.timeframe) {