From 2173ceef7387ddd697db6003049351f2c96a0c58 Mon Sep 17 00:00:00 2001 From: Peter van Arkel Date: Thu, 3 Dec 2026 16:42:30 +0100 Subject: [PATCH 1/2] Support extension versions on the installation page --- docs/panel-design.md | 4 ++++ .../templates/hosting/installation.html | 5 ++++- src/coulobre/hosting/test_service_health.py | 22 +++++++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/docs/panel-design.md b/docs/panel-design.md index 78544a8..5241b0e 100644 --- a/docs/panel-design.md +++ b/docs/panel-design.md @@ -19,6 +19,10 @@ only use shared components available in its supported Core versions. - Use `.surface` for sections, `.section-heading` for ordinary section headers, and `.table-scroll` around tables. Keep horizontal overflow in the table wrapper and give empty or pending states an explicit label. +- Extensions may add their running software versions to **About Coulobre** + through the optional `panel_extension_versions` template context. Pass + pairs of plain-text labels and versions only after checking access to the + extension. Core does not load or inspect extension packages. ## Forms and actions diff --git a/src/coulobre/hosting/templates/hosting/installation.html b/src/coulobre/hosting/templates/hosting/installation.html index 793c7c7..a2c11bb 100644 --- a/src/coulobre/hosting/templates/hosting/installation.html +++ b/src/coulobre/hosting/templates/hosting/installation.html @@ -7,7 +7,10 @@

Installation

-
Installed version
{{ installed_version }}
+
{% if panel_extension_versions %}Core version{% else %}Installed version{% endif %}
{{ installed_version }}
+ {% for label, version in panel_extension_versions %} +
{{ label }}
{{ version }}
+ {% endfor %} {% if request.user.is_superuser %}
Release history
Changelog
{% endif %} diff --git a/src/coulobre/hosting/test_service_health.py b/src/coulobre/hosting/test_service_health.py index 4e9d5ca..06dc4cf 100644 --- a/src/coulobre/hosting/test_service_health.py +++ b/src/coulobre/hosting/test_service_health.py @@ -7,6 +7,7 @@ from unittest.mock import patch from django.contrib.auth import get_user_model from django.contrib.auth.models import Permission from django.core.management import call_command +from django.template.loader import render_to_string from django.test import SimpleTestCase, TestCase, override_settings from django.urls import reverse from django.utils import timezone @@ -237,6 +238,8 @@ class ServiceHealthPanelTests(TestCase): ): response = self.client.get(url) self.assertContains(response, "1.2.3") + self.assertContains(response, "
Installed version
", html=True) + self.assertNotContains(response, "
Core version
", html=True) self.assertContains(response, "Apache License 2.0") self.assertContains(response, reverse("panel:service_health")) features = { @@ -248,6 +251,25 @@ class ServiceHealthPanelTests(TestCase): self.assertNotContains(response, "test-only-bridge-key") self.assertNotContains(response, "https://webmail.example.net") + def test_installation_labels_core_and_extension_versions_separately(self): + self.client.force_login(self.operator) + response = self.client.get(reverse("panel:installation")) + html = render_to_string( + response.template_name, + response.context_data + | { + "installed_version": "1.2.3", + "panel_extension_versions": [("Example version", "4.5.6")], + }, + request=response.wsgi_request, + ) + self.assertInHTML( + "
Core version
1.2.3
", html + ) + self.assertInHTML( + "
Example version
4.5.6
", html + ) + @override_settings( LOCAL_DNS_PUBLISHING=True, HOSTING_NAMESERVERS=(), -- 2.43.0 From a94129b499c65bb32b18c7a6d2103e84cded45a9 Mon Sep 17 00:00:00 2001 From: Peter van Arkel Date: Thu, 3 Dec 2026 16:42:30 +0100 Subject: [PATCH 2/2] Prepare Coulobre Core 1.3.1 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8c65308..fb49e36 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "coulobre-panel" -version = "1.3.0" +version = "1.3.1" description = "A web hosting control panel for hosting providers and resellers." readme = "README.md" requires-python = ">=3.12" -- 2.43.0