From 23b26ce5e342de51b0b677cbe92b8a276e19aa18 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Mon, 20 May 2019 10:56:13 +0100 Subject: [PATCH] zoneconf: Reindent with tabs Signed-off-by: Michael Tremer --- html/cgi-bin/zoneconf.cgi | 130 +++++++++++++++++++------------------- 1 file changed, 65 insertions(+), 65 deletions(-) diff --git a/html/cgi-bin/zoneconf.cgi b/html/cgi-bin/zoneconf.cgi index 8480dad06b..40239c14ed 100644 --- a/html/cgi-bin/zoneconf.cgi +++ b/html/cgi-bin/zoneconf.cgi @@ -30,17 +30,17 @@ my $css = < table { width: 100%; - border-collapse: collapse; - table-layout: fixed; + border-collapse: collapse; + table-layout: fixed; } tr { height: 4em; } - tr.thin { - height: 3em; - } + tr.thin { + height: 3em; + } td.narrow { width: 11em; @@ -53,9 +53,9 @@ my $css = < - - -
+ + + "; my $slightlygrey = ""; foreach (@nics) { - my $mac = $_->[0]; + my $mac = $_->[0]; my $nic = $_->[1]; - my $wlan = $_->[2]; + my $wlan = $_->[2]; print ""; - # Iterate through all zones and check if the current NIC is assigned to it - foreach (@zones) { - my $uc = uc $_; - my $dev_name = $ethsettings{"${uc}_DEV"}; + # Iterate through all zones and check if the current NIC is assigned to it + foreach (@zones) { + my $uc = uc $_; + my $dev_name = $ethsettings{"${uc}_DEV"}; - if ($dev_name eq "") { # Again, skip the zone if it is not activated - next; - } + if ($dev_name eq "") { # Again, skip the zone if it is not activated + next; + } - if ($uc eq "RED") { - my $red_type = $ethsettings{"RED_TYPE"}; - my $red_restricted = ($uc eq "RED" && ! ($red_type eq "STATIC" || $red_type eq "DHCP")); + if ($uc eq "RED") { + my $red_type = $ethsettings{"RED_TYPE"}; + my $red_restricted = ($uc eq "RED" && ! ($red_type eq "STATIC" || $red_type eq "DHCP")); - # VLANs/Bridging is not possible if the RED interface is set to PPP, PPPoE, VDSL, ... - if ($red_restricted) { - my $checked = ""; + # VLANs/Bridging is not possible if the RED interface is set to PPP, PPPoE, VDSL, ... + if ($red_restricted) { + my $checked = ""; if ($mac eq $ethsettings{"${uc}_MACADDR"}) { $checked = "checked"; } print ""; - next; # We're done here - } - } - - my %access_selected = (); - my $zone_mode = $ethsettings{"${uc}_MODE"}; - my $zone_parent_dev = $vlansettings{"${uc}_PARENT_DEV"}; # ZONE_PARENT_DEV is set if this zone accesses any interface via a VLAN - my $field_disabled = "disabled"; # Only enable the VLAN ID input field if the current access mode is VLAN + next; # We're done here + } + } + + my %access_selected = (); + my $zone_mode = $ethsettings{"${uc}_MODE"}; + my $zone_parent_dev = $vlansettings{"${uc}_PARENT_DEV"}; # ZONE_PARENT_DEV is set if this zone accesses any interface via a VLAN + my $field_disabled = "disabled"; # Only enable the VLAN ID input field if the current access mode is VLAN my $zone_vlan_id = ""; - # If ZONE_PARENT_DEV is set to a NICs name (e.g. green0 or eth0) instead of a MAC address, we have to find out this NICs MAC address - $zone_parent_dev = &Network::get_mac_by_name($zone_parent_dev); + # If ZONE_PARENT_DEV is set to a NICs name (e.g. green0 or eth0) instead of a MAC address, we have to find out this NICs MAC address + $zone_parent_dev = &Network::get_mac_by_name($zone_parent_dev); - # If the current NIC is accessed by the current zone via a VLAN, the ZONE_PARENT_DEV option corresponds to the current NIC - if ($mac eq $zone_parent_dev) { + # If the current NIC is accessed by the current zone via a VLAN, the ZONE_PARENT_DEV option corresponds to the current NIC + if ($mac eq $zone_parent_dev) { $access_selected{"VLAN"} = "selected"; $field_disabled = ""; $zone_vlan_id = $vlansettings{"${uc}_VLAN_ID"}; @@ -422,36 +422,36 @@ foreach (@nics) { $access_selected{"NATIVE"} = "selected"; } - $access_selected{"NONE"} = ($access_selected{"NATIVE"} eq "") && ($access_selected{"VLAN"} eq "") ? "selected" : ""; + $access_selected{"NONE"} = ($access_selected{"NATIVE"} eq "") && ($access_selected{"VLAN"} eq "") ? "selected" : ""; my $vlan_disabled = ($wlan) ? "disabled" : ""; - print < - - - + print < + + + END ; - } + } - print ""; + print ""; - if ($slightlygrey) { - $slightlygrey = ""; - } else { - $slightlygrey = "slightlygrey"; - } + if ($slightlygrey) { + $slightlygrey = ""; + } else { + $slightlygrey = "slightlygrey"; + } } print <
- $restart_notice + $restart_notice
-- 2.39.2
END ; # Fill the table header with all activated zones foreach (@zones) { my $uc = uc $_; - my $dev_name = $ethsettings{"${uc}_DEV"}; + my $dev_name = $ethsettings{"${uc}_DEV"}; - if ($dev_name eq "") { # If the zone is not activated, don't show it - next; - } + if ($dev_name eq "") { # If the zone is not activated, don't show it + next; + } - # If the zone is in PPP mode, don't show a mode dropdown - if ($uc eq "RED") { + # If the zone is in PPP mode, don't show a mode dropdown + if ($uc eq "RED") { my $red_type = $ethsettings{"RED_TYPE"}; my $red_restricted = ($uc eq "RED" && ! ($red_type eq "STATIC" || $red_type eq "DHCP")); @@ -360,49 +360,49 @@ print "
$nic
$mac