Verified Commit 1d964a37 authored by Marek Sasek's avatar Marek Sasek
Browse files

Use QoS in LAN

parent 82e1de6c
Pipeline #81644 failed with stage
in 23 minutes and 24 seconds
/*
* Copyright (C) 2019 CZ.NIC z.s.p.o. (http://www.nic.cz/)
* Copyright (C) 2019-2021 CZ.NIC z.s.p.o. (http://www.nic.cz/)
*
* This is free software, licensed under the GNU General Public License v3.
* See /LICENSE for more information.
......@@ -82,6 +82,7 @@ function prepDataToSubmit(formData) {
delete formData.mode_managed.dhcp.clients;
if (!formData.mode_managed.dhcp.enabled)
formData.mode_managed.dhcp = { enabled: false };
/* if (!formData.qos.enabled) formData.qos = { enabled: false }; */
} else if (formData.mode === LAN_MODES.unmanaged) {
delete formData.mode_managed;
const lanType = formData.mode_unmanaged.lan_type;
......
......@@ -19,6 +19,7 @@ import API_URLs from "../common/API";
import LANManagedForm from "./LANManagedForm";
import LANUnmanagedForm from "./LANUnmanagedForm";
import QoSForm from "../common/network/QoSForm";
const HELP_TEXTS = {
managed: _(
......@@ -28,7 +29,15 @@ const HELP_TEXTS = {
`Computer mode means that this device acts as a client in this network.
It acts similarly to WAN, but it has opened ports for configuration interfaces and other services.`
),
};
qos: {
enabled: _(`This option enables you to set a bandwidth limit for the \
guest network, so that your main network doesn't get slowed-down by it.`),
download: _(
"Download speed in guest network (in kilobits per second)."
),
upload: _("Upload speed in guest network (in kilobits per second)."),
},
}; //změnit ty texty ještě pak
export const LAN_MODES = {
managed: "managed",
......@@ -139,6 +148,13 @@ export function LANFormSettings({
/>
)}
{lanForm}
<QoSForm
formData={formData.qos}
formErrors={errors.qos}
setFormValue={setFormValue}
disabled={disabled}
helpTexts={HELP_TEXTS.qos}
/>
</>
);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment