From 92acb9a3b8ee3708c1449ddc20972c56006fb7b3 Mon Sep 17 00:00:00 2001 From: master3395 Date: Fri, 10 Apr 2026 21:38:51 +0200 Subject: [PATCH 1/5] fix(firewall): pagination ng-show + firewall.js cache bust (cb=11) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- baseTemplate/templates/baseTemplate/index.html | 2 +- firewall/templates/firewall/firewall.html | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/baseTemplate/templates/baseTemplate/index.html b/baseTemplate/templates/baseTemplate/index.html index fbb110020..eccdb25af 100644 --- a/baseTemplate/templates/baseTemplate/index.html +++ b/baseTemplate/templates/baseTemplate/index.html @@ -2559,7 +2559,7 @@ - + diff --git a/firewall/templates/firewall/firewall.html b/firewall/templates/firewall/firewall.html index 334062ef5..603defc24 100644 --- a/firewall/templates/firewall/firewall.html +++ b/firewall/templates/firewall/firewall.html @@ -1475,8 +1475,8 @@ - -
+ +
{% trans "Showing" %} {$ rulesRangeStart() || 0 $} – {$ rulesRangeEnd() || 0 $} {% trans "of" %} {$ rulesTotalCount || rules.length || 0 $} @@ -1680,8 +1680,8 @@
- -
+ +
{% trans "Showing" %} {$ bannedRangeStart() || 0 $} – {$ bannedRangeEnd() || 0 $} {% trans "of" %} {$ bannedTotalCount || bannedIPs.length || 0 $} From 46c972571523bba697e93197276d211f2de4961e Mon Sep 17 00:00:00 2001 From: master3395 Date: Sat, 11 Apr 2026 00:21:14 +0200 Subject: [PATCH 2/5] fix(emailPremium): Rspamd admin UI Angular binding and panel proxy URL Pass rspamd_ui_url from Rspamd view; safe machineIP read; bootstrap window.app before controllers; replace invalid {$ errorMessage $} with ng-bind; fix textareas; clarify HTTPS UI via CyberPanel proxy vs SSH tunnel localhost. --- .../static/emailPremium/emailPremium.js | 20 + .../templates/emailPremium/Rspamd.html | 28 +- emailPremium/views.py | 22 +- public/static/emailPremium/emailPremium.js | 1053 ++++++++++++++++- static/emailPremium/emailPremium.js | 20 + 5 files changed, 1123 insertions(+), 20 deletions(-) diff --git a/emailPremium/static/emailPremium/emailPremium.js b/emailPremium/static/emailPremium/emailPremium.js index 1facd756c..d5f38b6ab 100644 --- a/emailPremium/static/emailPremium/emailPremium.js +++ b/emailPremium/static/emailPremium/emailPremium.js @@ -2,6 +2,26 @@ * Created by usman on 6/22/18. */ +/* Ensure CyberCP Angular module exists (system-status.js normally sets window.app in ) */ +(function () { + if (typeof window === 'undefined' || typeof angular === 'undefined') { + return; + } + if (typeof window.app !== 'undefined' && window.app) { + return; + } + try { + window.app = angular.module('CyberCP'); + } catch (e) { + try { + window.app = angular.module('CyberCP', []); + } catch (e2) { + return; + } + } +})(); +var app = window.app; + /* Java script code to list accounts */ app.controller('listDomains', function ($scope, $http) { diff --git a/emailPremium/templates/emailPremium/Rspamd.html b/emailPremium/templates/emailPremium/Rspamd.html index 1769eb3bc..f052f992e 100644 --- a/emailPremium/templates/emailPremium/Rspamd.html +++ b/emailPremium/templates/emailPremium/Rspamd.html @@ -611,7 +611,7 @@
- {% trans "Failed to start installation. Error message:" %} {$ errorMessage $} + {% trans "Failed to start installation. Error message:" %}
@@ -621,7 +621,7 @@
- {% trans "Installation failed." %} {$ errorMessage $} + {% trans "Installation failed." %}
@@ -637,7 +637,7 @@

{% trans "Installation Progress" %}

- +
{% else %} @@ -663,20 +663,20 @@

- {% trans "Opens the official Rspamd web interface in a new tab (path /emailPremium/Rspamd/ui/ — proxied through CyberPanel, admin session required)." %} + {% trans "Opens the Rspamd controller UI over HTTPS using the same hostname and port as CyberPanel (path /emailPremium/Rspamd/ui/). Rspamd itself only speaks HTTP on 127.0.0.1:11334; the panel reverse-proxies it so you do not need https://YOUR_SERVER_IP:11334 (that URL is not served by Rspamd)." %}

{% trans "Alternative: SSH tunnel" %}

- {% trans "If the proxied UI misbehaves, connect to port 11334 on the server via SSH and use your local browser." %} + {% trans "If the proxied UI misbehaves, forward port 11334 to your machine and open the link below (HTTP on localhost only — not HTTPS)." %}

ssh -N -L 11334:127.0.0.1:11334 root@{{ ipAddress }}

- {% trans "Open Rspamd UI (when tunnel is active)" %} + {% trans "Open Rspamd UI (when tunnel is active — http://127.0.0.1:11334/)" %}

@@ -772,7 +772,7 @@
- {% trans "Failed to save RSPAMD configurations. Error message:" %} {$ errorMessage $} + {% trans "Failed to save RSPAMD configurations. Error message:" %}
@@ -848,7 +848,7 @@
- {% trans "Failed to save ClamAV configurations. Error message:" %} {$ errorMessage $} + {% trans "Failed to save ClamAV configurations. Error message:" %}
@@ -906,7 +906,7 @@
- {% trans "Failed to save Postfix configurations. Error message:" %} {$ errorMessage $} + {% trans "Failed to save Postfix configurations. Error message:" %}
@@ -964,7 +964,7 @@
- {% trans "Failed to save Redis configurations. Error message:" %} {$ errorMessage $} + {% trans "Failed to save Redis configurations. Error message:" %}
@@ -989,7 +989,7 @@
- {% trans "Failed to start uninstallation. Error message:" %} {$ errorMessage $} + {% trans "Failed to start uninstallation. Error message:" %}
@@ -999,7 +999,7 @@
- {% trans "Installation failed." %} {$ errorMessage $} + {% trans "Installation failed." %}
@@ -1015,7 +1015,7 @@

{% trans "Uninstallation Progress" %}

- +
@@ -1052,7 +1052,7 @@
+
+ +
+ +
+
+ + {% trans "Important:" %} + {% trans "Changing host ports requires checking the confirmation box below; the container will be recreated." %} +
+
+
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+
+ +

{% trans "No port mappings configured" %}

+
+
+
+ +
+
+
+
@@ -834,7 +874,7 @@
@@ -856,10 +896,10 @@

-
@@ -1246,77 +1286,6 @@
- -