mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-05-06 20:47:35 +02:00
fix(firewall): pagination ng-show + firewall.js cache bust (cb=11)
ng-if on pagination bars created a child scope so ng-model for Per page and Go to page updated a shadowed copy; handlers read the controller scope — controls appeared to do nothing. Use ng-show instead. Bump firewall.js query cb after merge with upstream (cb=11) so browsers reload the script.
This commit is contained in:
@@ -2559,7 +2559,7 @@
|
||||
<script src="{% static 'managePHP/managePHP.js' %}?v={{ CP_VERSION }}" data-cfasync="false"></script>
|
||||
<script src="{% static 'serverLogs/serverLogs.js' %}?v={{ CP_VERSION }}" data-cfasync="false"></script>
|
||||
<script src="{% static 'serverStatus/serverStatus.js' %}?v={{ CP_VERSION }}" data-cfasync="false"></script>
|
||||
<script src="{% static 'firewall/firewall.js' %}?v={{ CP_VERSION }}&fw={{ FIREWALL_STATIC_VERSION|default:CP_VERSION }}&cb=6" data-cfasync="false"></script>
|
||||
<script src="{% static 'firewall/firewall.js' %}?v={{ CP_VERSION }}&fw={{ FIREWALL_STATIC_VERSION|default:CP_VERSION }}&cb=11" data-cfasync="false"></script>
|
||||
<script src="{% static 'emailPremium/emailPremium.js' %}?v={{ CP_VERSION }}" data-cfasync="false"></script>
|
||||
<script src="{% static 'manageServices/manageServices.js' %}?v={{ CP_VERSION }}&msModal=20260402d" data-cfasync="false"></script>
|
||||
<script src="{% static 'CLManager/CLManager.js' %}?v={{ CP_VERSION }}" data-cfasync="false"></script>
|
||||
|
||||
@@ -1475,8 +1475,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Firewall Rules Pagination (show when there are rules or a total count) -->
|
||||
<div class="pagination-bar" ng-if="(rules && rules.length > 0) || (rulesTotalCount > 0)">
|
||||
<!-- Firewall Rules Pagination: use ng-show (not ng-if) so ng-model binds to firewallController; ng-if creates a child scope and breaks Per page / Go to page. -->
|
||||
<div class="pagination-bar" ng-show="(rules && rules.length > 0) || (rulesTotalCount > 0)">
|
||||
<div class="pagination-info">
|
||||
<span>{% trans "Showing" %} {$ rulesRangeStart() || 0 $} – {$ rulesRangeEnd() || 0 $} {% trans "of" %} {$ rulesTotalCount || rules.length || 0 $}</span>
|
||||
<span class="pagination-size">
|
||||
@@ -1680,8 +1680,8 @@
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- Banned IPs Pagination (show when there are rows or a total count) -->
|
||||
<div class="pagination-bar" ng-if="(bannedIPs && bannedIPs.length > 0) || (bannedTotalCount > 0)">
|
||||
<!-- Banned IPs Pagination: ng-show avoids child scope from ng-if (same ng-model issue as rules). -->
|
||||
<div class="pagination-bar" ng-show="(bannedIPs && bannedIPs.length > 0) || (bannedTotalCount > 0)">
|
||||
<div class="pagination-info">
|
||||
<span>{% trans "Showing" %} {$ bannedRangeStart() || 0 $} – {$ bannedRangeEnd() || 0 $} {% trans "of" %} {$ bannedTotalCount || bannedIPs.length || 0 $}</span>
|
||||
<span class="pagination-size banned-ips-per-page">
|
||||
|
||||
Reference in New Issue
Block a user