--- firewall_rules.php.orig 2021-08-02 18:45:47.668195000 +0000
+++ firewall_rules.php 2021-08-02 19:24:15.297799000 +0000
@@ -487,6 +487,42 @@
// 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 = "
\n";
+ $content .= "\n";
+ $content .= "\n";
+ $content .= "" . gettext("Name") . " | " . gettext("Interface") . " | ";
+ $content .= "" . gettext("Gateway") . " |
\n";
+ $content .= "\n";
+ $content .= "\n";
+ foreach ($gwgroup['item'] as $i => $gw) {
+ $content .= gateway_info_popup($gw, $gateways_status);
+ }
+ $content .= "\n";
+ $content .= "
\n";
+ $gws[$gwgroup['name']] = $content;
+}
+$a_gateways = return_gateways_array();
+foreach ($a_gateways as $i => $gw) {
+ $content = "\n";
+ $content .= "\n";
+ $content .= "\n";
+ $content .= "" . gettext("Name") . " | " . gettext("Interface") . " | ";
+ $content .= "" . gettext("Gateway") . " |
\n";
+ $content .= gateway_info_popup($i, $gateways_status);
+ $content .= "\n";
+ $content .= "\n";
+ $gws[$i] = $content;
+}
+
foreach ($a_filter as $filteri => $filterent):
if (($filterent['interface'] == $if && !isset($filterent['floating'])) || (isset($filterent['floating']) && "FloatingRules" == $if)) {
@@ -820,7 +856,7 @@
-
+
|