Fixes for bridge support

This commit is contained in:
Jamie Cameron
2011-06-27 20:54:41 -07:00
parent 2aacfeeded
commit 9f51a78df1
6 changed files with 10 additions and 9 deletions

View File

@ -34,7 +34,7 @@ print &ui_hidden("idx", $in{'idx'});
print &ui_table_start(
$in{'virtual'} || $a && $a->{'virtual'} ne "" ? $text{'aifc_desc2'}
: $text{'aifc_desc1'},
"width=100%", 4);
undef, 4);
# Interface name, perhaps editable
if ($in{'new'} && $in{'virtual'}) {

View File

@ -59,8 +59,7 @@ print &ui_hidden("vlan", $in{'vlan'});
print &ui_hidden("bond", $in{'bond'});
print &ui_hidden("bridge", $in{'bridge'});
print &ui_table_start($in{'virtual'} || $b && $b->{'virtual'} ne "" ?
$text{'bifc_desc2'} : $text{'bifc_desc1'},
"width=100%", 4);
$text{'bifc_desc2'} : $text{'bifc_desc1'}, undef, 2);
# Comment, if allowed
if (defined(&can_iface_desc) && &can_iface_desc($b)) {
@ -81,7 +80,7 @@ elsif ($in{'new'}) {
$namefield = "auto".&ui_hidden("name", "auto");
}
elsif ($in{'bridge'}) {
$namefield = "br".&ui_textbox("name", ($bmax+1), 3);
$namefield = "br ".&ui_textbox("name", ($bmax+1), 3);
}
else {
$namefield = &ui_textbox("name", undef, 6);
@ -101,7 +100,7 @@ else {
$upfield = !$b ? $text{'yes'} :
$b->{'up'} ? $text{'yes'} : $text{'no'};
}
print &ui_table_row($text{'ifcs_act'}, $upfield);
print &ui_table_row($text{'bifc_act'}, $upfield);
# IP address source. This can either be DHCP, BootP or a fixed IP,
# netmask and broadcast
@ -278,7 +277,8 @@ if (($in{'new'} && $in{'virtual'} eq "" && !$in{'bridge'}) ||
# Real interface for bridge
if ($in{'bridge'} || $b && $b->{'bridge'}) {
@ethboot = grep { $_->{'fullname'} =~ /^eth(\d+)$/ } @boot;
@ethboot = map { $_->{'fullname'} }
grep { $_->{'fullname'} =~ /^eth(\d+)$/ } @boot;
print &ui_table_row($text{'bifc_bridgeto'},
&ui_select("bridgeto", $b->{'bridgeto'}, \@ethboot));
}

View File

@ -26,7 +26,7 @@ else {
print &ui_form_start("save_range.cgi");
print &ui_hidden("new", $in{'new'});
print &ui_hidden("idx", $in{'idx'});
print &ui_table_start($text{'range_header'}, "width=100%", 2);
print &ui_table_start($text{'range_header'}, undef, 2);
# OS-specific range input
&range_input($b);

View File

@ -13,7 +13,7 @@ foreach $i ('ifcs', 'routes', 'dns', 'hosts',
next if ($i eq "ifcs" && $zone);
if ($i eq "ifcs") {
push(@links, "list_${i}.cgi?mode=active");
push(@links, "list_${i}.cgi");
}
else {
push(@links, "list_${i}.cgi");

View File

@ -82,6 +82,7 @@ aifc_eclash6=IPv6 address in row $1 is already in use by interface $2
aifc_eaddresses6=No IPv6 addresses entered
bifc_create=Create Bootup Interface
bifc_act=Activate at boot?
bifc_edit=Edit Bootup Interface
bifc_desc1=Boot Time Interface Parameters
bifc_desc2=Boot Time Virtual Interface Parameters

View File

@ -127,7 +127,7 @@ if ($allow_add && defined(&supports_ranges) && &supports_ranges()) {
push(@links, "<a href='edit_range.cgi?new=1'>$text{'ifcs_radd'}</a>");
}
if ($allow_add && defined(&supports_bridges) && &supports_bridges()) {
push(@links, "<a href='edit_bifcs.cgi?new=1&bridge=1'>".
push(@links, "<a href='edit_bifc.cgi?new=1&bridge=1'>".
"$text{'ifcs_badd'}</a>");
}
print &ui_links_row(\@links);