Bug #12174 » firewall_rules.php_02AUG2021.patch
| firewall_rules.php 2021-08-02 19:24:15.297799000 +0000 | ||
|---|---|---|
|
// More efficient than looping through the list of separators on every row.
|
||
|
$seprows = separator_rows($separators);
|
||
|
/* Cache gateway status for this page load.
|
||
|
* See https://redmine.pfsense.org/issues/12174 */
|
||
|
$gws = array();
|
||
|
$gateways_status = return_gateways_status(true);
|
||
|
foreach ($config['gateways']['gateway_group'] as $i => $gwgroup) {
|
||
|
foreach ($gwgroup['item'] as $x => $member) {
|
||
|
$membersplit = explode("|", $member);
|
||
|
$gwgroup['item'][$x] = $membersplit[0];
|
||
|
}
|
||
|
$content = "<table>\n";
|
||
|
$content .= "<thead>\n";
|
||
|
$content .= "<tr>\n";
|
||
|
$content .= "<th>" . gettext("Name") . "</th><th style='padding-left: 10px;'>" . gettext("Interface") . "</th>";
|
||
|
$content .= "<th style='padding-left: 10px;'>" . gettext("Gateway") . "</th></tr>\n";
|
||
|
$content .= "</thead>\n";
|
||
|
$content .= "<tbody>\n";
|
||
|
foreach ($gwgroup['item'] as $i => $gw) {
|
||
|
$content .= gateway_info_popup($gw, $gateways_status);
|
||
|
}
|
||
|
$content .= "</tbody>\n";
|
||
|
$content .= "</table>\n";
|
||
|
$gws[$gwgroup['name']] = $content;
|
||
|
}
|
||
|
$a_gateways = return_gateways_array();
|
||
|
foreach ($a_gateways as $i => $gw) {
|
||
|
$content = "<table>\n";
|
||
|
$content .= "<thead>\n";
|
||
|
$content .= "<tr>\n";
|
||
|
$content .= "<th>" . gettext("Name") . "</th><th style='padding-left: 10px;'>" . gettext("Interface") . "</th>";
|
||
|
$content .= "<th style='padding-left: 10px;'>" . gettext("Gateway") . "</th></tr>\n";
|
||
|
$content .= gateway_info_popup($i, $gateways_status);
|
||
|
$content .= "</thead>\n";
|
||
|
$content .= "<tbody>\n";
|
||
|
$gws[$i] = $content;
|
||
|
}
|
||
|
foreach ($a_filter as $filteri => $filterent):
|
||
|
if (($filterent['interface'] == $if && !isset($filterent['floating'])) || (isset($filterent['floating']) && "FloatingRules" == $if)) {
|
||
| ... | ... | |
|
</td>
|
||
|
<td>
|
||
|
<?php if (isset($filterent['gateway'])): ?>
|
||
|
<span data-toggle="popover" data-trigger="hover focus" title="<?=gettext('Gateways details')?>" data-content="<?=gateway_info_popup($filterent['gateway'])?>" data-html="true">
|
||
|
<span data-toggle="popover" data-trigger="hover focus" title="<?=gettext('Gateways details')?>" data-content="<?=$gws[$filterent['gateway']]?>" data-html="true">
|
||
|
<?php else: ?>
|
||
|
<span>
|
||
|
<?php endif; ?>
|
||
- « Previous
- 1
- 2
- 3
- Next »