mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-05-09 14:17:15 +02:00
Fix emailMarketing reverse error + dashboardStatsController ctrlreg
- CyberCP/urls.py: when emailMarketing app is missing/broken, register placeholder path with name='emailMarketing' so {% url 'emailMarketing' %} never raises Reverse not found.
- public/static/baseTemplate/custom-js/system-status.js: replace old copy with full system-status.js that registers dashboardStatsController and systemStatusInfo (fixes Angular [:ctrlreg] and raw {{$ cpuUsage $}} on overview).
This commit is contained in:
@@ -26,12 +26,15 @@ from firewall import views as firewall_views
|
||||
# includes each installed plugin (under /plugins/<name>/) so settings and
|
||||
# other plugin pages work for any installed plugin.
|
||||
|
||||
# Optional app: may be missing after clean clone or git clean -fd (not in all repo trees)
|
||||
# Optional app: may be missing after clean clone or git clean -fd (not in all repo trees).
|
||||
# When missing or broken, register a placeholder so {% url 'emailMarketing' %} in templates never raises Reverse not found.
|
||||
_optional_email_marketing = []
|
||||
try:
|
||||
_optional_email_marketing.append(path('emailMarketing/', include('emailMarketing.urls')))
|
||||
except ModuleNotFoundError:
|
||||
pass
|
||||
except (ModuleNotFoundError, ImportError, AttributeError):
|
||||
_optional_email_marketing.append(
|
||||
path('emailMarketing/', RedirectView.as_view(url='/base/', permanent=False), name='emailMarketing')
|
||||
)
|
||||
|
||||
urlpatterns = [
|
||||
# Serve static files first (before catch-all routes)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user