Commit Graph

24 Commits

Author SHA1 Message Date
Peter Müller
66c3619872 Early spring clean: Remove trailing whitespaces, and correct licence headers
Bumping across one of our scripts with very long trailing whitespaces, I
thought it might be a good idea to clean these up. Doing so, some
missing or inconsistent licence headers were fixed.

There is no need in shipping all these files en bloc, as their
functionality won't change.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-02-18 23:54:57 +00:00
Daniel Weismüller
73476dd9dc Drop support for macvtap
This has been broken because of other changes on the network scripts and
since we now have support for bridges there is no point in supporting
something else that has the same functionality.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-04-08 10:19:55 +00:00
Leo-Andres Hofmann
a2f77069aa zoneconf.cgi: Avoid unnecessary MAC address changes
Ensure that a bridge always has a MAC address configured, to prevent
udev/network-hotplug-bridges assigning random addresses at each start.
Cache previously generated MAC addresses so that they are not
regenerated each time the configuration is saved by the user.

Add more comments to existing code.

Fixes: #12583

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-03-25 09:21:59 +00:00
Leo-Andres Hofmann
715aa887b6 zoneconf.cgi: Fix VLAN tag range check
Use the correct VLAN tag range 1-4094 and add an error message
to the range check.
The missing error message was discovered by Jonatan.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-03-22 10:37:47 +00:00
Leo-Andres Hofmann
01139abbe1 zoneconf.cgi: Add default value for STP and require input
Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-02-22 18:59:12 +00:00
Leo-Andres Hofmann
5262805261 zoneconf.cgi: Import network-functions.pl
Remove custom functions and use network-functions.pl instead to detect
the available zones correctly. This also removes the requirement that
a device must be assigned for a zone to become visible/configurable.

Fixes: #12568

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-02-22 18:58:15 +00:00
Leo-Andres Hofmann
b4434345dc zoneconf.cgi: Add Javascript for new GUI elements
Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-02-22 18:58:13 +00:00
Leo-Andres Hofmann
8de94a23e0 zoneconf.cgi: Add STP options to GUI
Changes & new features:
- Add CSS for STP options, add texts to language files
- Read STP settings from ethernet configuration and display inputs
- Validate and save STP settings

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-02-22 18:58:12 +00:00
Leo-Andres Hofmann
5e6eba884b zoneconf.cgi: Modify CSS to allow additional rows
Simplify borders, load more colors from header and add dividers

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-02-22 18:58:10 +00:00
Leo-Andres Hofmann
63a1c81a63 zoneconf.cgi: Change NIC display order, improve code
Refactor duplicate perl code and add comments

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-02-22 18:58:08 +00:00
Leo-Andres Hofmann
5c33a76135 zoneconf.cgi: Add NIC selection highlighting
This improves the usability of the zone configuration by marking assigned
NICs in the zone color. The highlighting is initially applied to the static
HTML output, and JavaScript is used to follow changes made by the user.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-11-27 15:48:02 +00:00
Leo-Andres Hofmann
fc31c28d5c zoneconf.cgi: Improve CSS
- Add an element id so that the styling only affects the zone table
- Alternating row colors are now generated by CSS, remove unneeded Perl code

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-11-27 15:47:59 +00:00
Leo-Andres Hofmann
8797526d36 zoneconf.cgi: Make output HTML 5 standard compliant
This fixes two minor violations of the HTML standard:
- <a> elements may not contain nested <button> elements:
Replace the button with a simple hyperlink, because it was only used as a link anyway.

- "id" attributes may not contain whitespace:
Remove unneeded attribute, use hyphens instead of spaces.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-11-27 15:47:57 +00:00
Leo-Andres Hofmann
96d0c76154 zoneconf.cgi: Clean up HTML output
This adds missing brackets, cleans up the indentation and removes unnecessary CSS.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-11-27 15:47:55 +00:00
Michael Tremer
bb90622c2c zoneconf.cgi: Skip checks for non-existing zones
On systems with RED on PPP and no BLUE or ORANGE zones,
there would always be an error when handling non-existant input.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-04-07 08:58:48 +00:00
Alex Koch
7f44ec0478 zoneconf: reduce the width of inputs for vlanid
The inputs for the vlanids are overlapping the borders of their cells (using a recent Firefox on Linux Mint, Android or Windows 7). This patch fixes this by limiting the width to a fixed value.

Signed-off-by: Alex Koch <ipfire@starkstromkonsument.de>
Signed-off-by: Alex Koch <ipfire@starkstromkonsument.de>
Acked-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-09-12 10:19:14 +00:00
Michael Tremer
23b26ce5e3 zoneconf: Reindent with tabs
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-05-20 10:56:13 +01:00
Florian Bührle
7478903fb1 Added reboot notice
Added a reboot notice and made table rows more distinguishable by
alternating their background color. This improves usability.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-05-20 10:54:22 +01:00
Florian Bührle
0ec8e31ade zoneconf: Switch rows/columns
This change is necessary because the table can grow larger than the main
container if a user has many NICs on their machine.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-05-20 10:53:50 +01:00
Florian Bührle
a6695868d0 zoneconf: Fix bug that resultet from last fix
Fix bug that prevents users from assigning NIC to RED if RED is in PPP
mode
2019-05-11 14:38:39 +02:00
Florian Bührle
f60b61e04d zoneconf: Fix bug in NIC assignment; Change visibility of unused zones
Fix a bug that allows users to add multiple NICs to non-bridged zones.
This fix includes a new error message.

Unused zones are now invisible instead of grey.
2019-05-11 13:28:12 +02:00
Michael Tremer
1d6bc7a0dc zoneconf: Remove red warning
This is a bit shouty and there are various places where we do not
warn about this problem, so this patch makes it more consistent.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-05-09 17:16:35 +02:00
Michael Tremer
03fd68552d zoneconf: Move "None" option to the top
This is a more natural order of the options to me

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-05-09 17:11:24 +02:00
Florian Bührle
1dcf513a41 webif: Add a GUI for configuring VLAN interfaces
This patch adds a new CGI file which allows users to edit the
VLAN configuration as well as configuring zones as bridges.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-05-08 12:15:27 +01:00