interfaces: do not annotate disabled state for members

Recently did the same for Unbound.  The context for the user is clear
and we shouldn't be too concerned for what the user thinks about disabled
interfaces since he disabled them in the first place.

Use the same interface description source in the overview page.
This commit is contained in:
Franco Fichtner 2023-09-14 21:42:00 +02:00
parent 3dae3b507a
commit 49df30eb83
2 changed files with 6 additions and 4 deletions

View File

@ -114,7 +114,12 @@ legacy_html_escape_form_data($a_bridges);
<tbody>
<?php
$i = 0;
$ifdescrs = get_configured_interface_with_descr();
$ifdescrs = [];
foreach (legacy_config_get_interfaces(['virtual' => false]) as $intf => $intfdata) {
if (substr($intfdata['if'], 0, 3) != 'gre' && substr($intfdata['if'], 0, 2) != 'lo') {
$ifdescr[$intf] = $intfdata['descr'];
}
}
foreach ($a_bridges as $bridge): ?>
<tr>
<td><?= $bridge['bridgeif'] ?></td>

View File

@ -39,9 +39,6 @@ $ifacelist = [];
foreach (legacy_config_get_interfaces(['virtual' => false]) as $intf => $intfdata) {
if (substr($intfdata['if'], 0, 3) != 'gre' && substr($intfdata['if'], 0, 2) != 'lo') {
$ifacelist[$intf] = $intfdata['descr'];
if (!isset($intfdata['enable'])) {
$ifacelist[$intf] .= ' (' . gettext('disabled') . ')';
}
}
}