Compare commits

..
33 Commits
Author SHA1 Message Date
parkel 7d0365e54f Merge pull request 'Prepare Coulobre 0.13.0 release candidate 3' (#179) from release/0.13.0-rc.3 into main
Coulobre Panel CI / Checks (Python 3.12) (push) Canceled after 0s
Coulobre Panel CI / Checks (Python 3.14) (push) Canceled after 0s
Reviewed-on: #179
2026-11-24 11:05:46 +01:00
parkel 5fdc47bf1a Prepare Coulobre 0.13.0 release candidate 3
Coulobre Panel CI / Checks (Python 3.12) (pull_request) Canceled after 0s
Coulobre Panel CI / Checks (Python 3.14) (pull_request) Canceled after 0s
2026-11-24 10:58:11 +01:00
parkel 20b24aef4e Merge pull request 'Use a consistent compact type scale throughout the panel' (#178) from feature/panel-typography into main
Coulobre Panel CI / Checks (Python 3.12) (push) Canceled after 0s
Coulobre Panel CI / Checks (Python 3.14) (push) Canceled after 0s
Reviewed-on: #178
2026-11-24 10:43:35 +01:00
parkel c5c2e9e419 Use a consistent compact type scale throughout the panel
Coulobre Panel CI / Checks (Python 3.12) (pull_request) Canceled after 0s
Coulobre Panel CI / Checks (Python 3.14) (pull_request) Canceled after 0s
2026-11-24 10:42:08 +01:00
parkel cede3c1948 Merge pull request 'Show published release notes in the panel changelog' (#176) from feature/release-changelog into main
Coulobre Panel CI / Checks (Python 3.12) (push) Canceled after 0s
Coulobre Panel CI / Checks (Python 3.14) (push) Canceled after 0s
Reviewed-on: #176
2026-11-24 10:29:00 +01:00
parkel dbac22b0ce Show published release notes in the panel changelog
Coulobre Panel CI / Checks (Python 3.12) (pull_request) Canceled after 0s
Coulobre Panel CI / Checks (Python 3.14) (pull_request) Canceled after 0s
2026-11-24 10:14:04 +01:00
parkel ca2dc7604c Merge pull request 'Prepare Coulobre 0.13.0 release candidate 2' (#174) from release/0.13.0-rc.2 into main
Coulobre Panel CI / Checks (Python 3.12) (push) Canceled after 0s
Coulobre Panel CI / Checks (Python 3.14) (push) Canceled after 0s
Reviewed-on: #174
2026-11-24 09:32:13 +01:00
parkel 5358ba74b2 Send and preview formatted welcome invitations
Coulobre Panel CI / Checks (Python 3.12) (pull_request) Canceled after 0s
Coulobre Panel CI / Checks (Python 3.14) (pull_request) Canceled after 0s
2026-11-24 09:02:08 +01:00
parkel 287daf5036 Group account creation links and use consistent package labels 2026-11-24 08:57:25 +01:00
parkel 1c3ee425d1 Prepare Coulobre 0.13.0 release candidate 2 2026-11-24 08:52:10 +01:00
parkel 006c85d327 Distinguish workspaces in the role switcher 2026-11-24 08:52:10 +01:00
parkel d9a85fd8d7 Build Debian artifacts directly from annotated release tags 2026-11-24 08:50:45 +01:00
parkel 165f3cf7db Merge pull request 'Prepare Coulobre 0.13 deployment and packaging' (#173) from release/0.13 into main
Coulobre Panel CI / Checks (Python 3.12) (push) Canceled after 0s
Coulobre Panel CI / Checks (Python 3.14) (push) Canceled after 0s
Reviewed-on: #173
2026-11-24 08:31:20 +01:00
parkel eeee0136c6 Validate remote scopes against receiver account rules
Coulobre Panel CI / Checks (Python 3.12) (pull_request) Canceled after 0s
Coulobre Panel CI / Checks (Python 3.14) (pull_request) Canceled after 0s
2026-11-24 02:17:17 +01:00
parkel 09672ef18e Preserve installed release metadata and receiver assignments 2026-11-24 02:07:23 +01:00
parkel 8f5f9ef510 Install Coulobre hosts from the operator panel 2026-11-24 02:01:09 +01:00
parkel 2d6ac5ac43 Build Debian packages and apply upgrades through APT 2026-11-24 02:01:09 +01:00
parkel e240cbc64f Merge pull request 'Prepare Coulobre 0.12.0' (#172) from release/0.12.0 into main
Coulobre Panel CI / Checks (Python 3.12) (push) Canceled after 0s
Coulobre Panel CI / Checks (Python 3.14) (push) Canceled after 0s
Reviewed-on: #172
2026-11-24 01:40:56 +01:00
parkel 454945c328 Document Coulobre release versioning
Coulobre Panel CI / Checks (Python 3.12) (pull_request) Canceled after 0s
Coulobre Panel CI / Checks (Python 3.14) (pull_request) Canceled after 0s
2026-11-24 01:38:44 +01:00
parkel 0803db8e5f Prepare Coulobre 0.12.0 2026-11-24 01:36:43 +01:00
parkel 29246b7114 Merge pull request 'Add operator-owned hosting and fix table card corners' (#171) from feature/operator-own-hosting into main
Coulobre Panel CI / Checks (Python 3.12) (push) Canceled after 0s
Coulobre Panel CI / Checks (Python 3.14) (push) Canceled after 0s
Reviewed-on: #171
2026-11-24 01:35:36 +01:00
parkel b76e6c78a3 Clip table surfaces at their outer corners
Coulobre Panel CI / Checks (Python 3.12) (pull_request) Canceled after 0s
Coulobre Panel CI / Checks (Python 3.14) (pull_request) Canceled after 0s
2026-11-24 01:33:23 +01:00
parkel 6ed566f1ee Let operators create hosting for their own login 2026-11-24 01:33:23 +01:00
parkel b215cd0ab1 Merge pull request 'Prepare Coulobre 0.12.0 release candidate 3' (#170) from release/0.12.0-rc.3 into main
Coulobre Panel CI / Checks (Python 3.12) (push) Canceled after 0s
Coulobre Panel CI / Checks (Python 3.14) (push) Canceled after 0s
Reviewed-on: #170
2026-11-24 01:22:07 +01:00
parkel ccbc2ad931 Prepare Coulobre 0.12.0 release candidate 3
Coulobre Panel CI / Checks (Python 3.12) (pull_request) Canceled after 0s
Coulobre Panel CI / Checks (Python 3.14) (pull_request) Canceled after 0s
2026-11-24 01:19:20 +01:00
parkel 7e68b9928c Merge pull request 'Improve package status and sidebar navigation' (#169) from fix/package-review-and-sidebar into main
Coulobre Panel CI / Checks (Python 3.12) (push) Canceled after 0s
Coulobre Panel CI / Checks (Python 3.14) (push) Canceled after 0s
Reviewed-on: #169
2026-11-24 01:16:22 +01:00
parkel 664087f18b Report package update progress and configuration
Coulobre Panel CI / Checks (Python 3.12) (pull_request) Canceled after 0s
Coulobre Panel CI / Checks (Python 3.14) (pull_request) Canceled after 0s
2026-11-24 01:14:23 +01:00
parkel e56cb9dcd9 Refine sidebar navigation and service visibility 2026-11-24 01:14:23 +01:00
parkel 7ff51aa20e Merge pull request 'Prepare Coulobre 0.12.0 release candidate 2' (#168) from release/0.12.0-rc.2 into main
Coulobre Panel CI / Checks (Python 3.12) (push) Canceled after 0s
Coulobre Panel CI / Checks (Python 3.14) (push) Canceled after 0s
Reviewed-on: #168
2026-11-24 00:58:12 +01:00
parkel 22d7d0ce41 Prepare Coulobre 0.12.0 release candidate 2
Coulobre Panel CI / Checks (Python 3.12) (pull_request) Canceled after 0s
Coulobre Panel CI / Checks (Python 3.14) (pull_request) Canceled after 0s
2026-11-24 00:48:18 +01:00
parkel db049d2b48 Merge pull request 'Standardize panel layouts and improve live service views' (#167) from fix/consistent-panel-page-layout into main
Coulobre Panel CI / Checks (Python 3.12) (push) Canceled after 0s
Coulobre Panel CI / Checks (Python 3.14) (push) Canceled after 0s
Reviewed-on: #167
2026-11-24 00:45:27 +01:00
parkel 605e4f9ffd Show live database status and local service actions
Coulobre Panel CI / Checks (Python 3.12) (pull_request) Canceled after 0s
Coulobre Panel CI / Checks (Python 3.14) (pull_request) Canceled after 0s
2026-11-24 00:42:43 +01:00
parkel 634296d988 Standardize signed-in panel layouts and navigation 2026-11-24 00:42:43 +01:00
152 changed files with 4099 additions and 1021 deletions

No files matched your search

+11
View File
@@ -44,6 +44,9 @@ jobs:
ruff format --check .
sh -n tests/web-node/smoke.sh
sh -n deploy/certbot/reload-apache.sh
sh -n deploy/debian/postinst
sh -n deploy/debian/prerm
sh -n deploy/debian/coulobre-install
- name: Check Django configuration and migrations
run: |
@@ -61,3 +64,11 @@ jobs:
python -m pip install build
python -m build
python tools/check_core_release.py dist/*.tar.gz dist/*.whl
python tools/build_deb.py dist/*.tar.gz dist/*.whl
umask 077
git -c user.name='Coulobre CI' -c user.email='ci@hippogrief.nl' \
tag --annotate coulobre-ci-artifacts -m 'Verify tagged build'
python tools/build_deb.py dist/*.tar.gz dist/*.whl \
--ref coulobre-ci-artifacts --output rebuilt
cmp dist/*.deb rebuilt/*.deb
dpkg-deb --info dist/*.deb
+77 -3
View File
@@ -28,11 +28,39 @@
release. Issues without a milestone stay in the backlog. Add a due date
when a release date has been agreed.
### Choose a release version
Use [Semantic Versioning][semver] for Coulobre releases. Consider the
documented interfaces people depend on, including configuration, CLI commands,
upgrade paths, and the protocols between the panel and its service nodes.
| Change | Version increment from 1.0 onward |
| --- | --- |
| Compatible bug fixes, including compatible security fixes | Patch (`1.2.3` → `1.2.4`) |
| Compatible features or deprecations | Minor (`1.2.3` → `1.3.0`) |
| Incompatible changes to a documented interface | Major (`1.2.3` → `2.0.0`) |
Before 1.0, use `0.Y.Z`. Increment `Y` and reset `Z` for a feature release or
an incompatible change. Increment `Z` for compatible fixes. Document any
incompatible change and its upgrade steps in the release notes.
Start release candidates at 1 for each target version and increment the
candidate number for each release. Use [Python version specifiers][versions]
in `pyproject.toml` and the matching tag in Git and Gitea.
| Release | Python package version | Git tag |
| --- | --- | --- |
| First candidate for 0.12.0 | `0.12.0rc1` | `v0.12.0-rc.1` |
| Next candidate for 0.12.0 | `0.12.0rc2` | `v0.12.0-rc.2` |
| Final 0.12.0 release | `0.12.0` | `v0.12.0` |
Keep published release tags and artifacts fixed. Publish a new version for
subsequent changes.
### Prepare a release
1. Update the package version in `pyproject.toml`. For a release candidate,
use a Python version such as `0.1.0rc1` and a matching Git tag such as
`v0.1.0-rc.1`. [Python version specifiers][versions]
1. Update the package version in `pyproject.toml` using the versioning rules
above.
2. From a clean checkout, use `python -m build` to build the source
distribution and wheel. Run
`python tools/check_core_release.py dist/*.tar.gz dist/*.whl` to compare
@@ -47,6 +75,44 @@
instructions, and known limitations. Mark a release candidate as a
prerelease. Close the milestone when its target version is published.
Gitea release notes are the project changelog. The panel displays published
notes under **System → Updates → Changelog**. Use short Markdown sections for
user-visible features, improvements, fixes, and upgrade instructions as
applicable.
### Build and publish the Debian package
Build from the same verified source distribution and wheel used for the
release. The builder reads the package version and timestamp from the reviewed
Git revision, and rejects inputs which differ from it.
```sh
python tools/build_deb.py dist/*.tar.gz dist/*.whl --ref "$tag"
sha256sum dist/coulobre-panel_*.deb
```
Verify a fresh installation and an upgrade with existing data on Ubuntu 26.04
and Debian 13. Include the checked package and its SHA-256 checksum in the
release. After release review, publish the same file to each supported suite
in the [Hippogrief Debian registry][debian-registry]. Use `resolute` and
`trixie` as the suites, `main` as the component for final versions, and
`candidate` for release candidates.
```sh
registry=https://code.hosting.hippogrief.nl/api/packages/hippogrief/debian
for suite in resolute trixie; do
curl --fail-with-body --user "$GITEA_USER" --upload-file "$deb" \
"$registry/pool/$suite/$component/upload"
done
```
Set `deb` to the checked artifact. When prompted by curl, use a Gitea token
with permission to publish packages. In the registry, link the package to
`hippogrief/coulobre` and verify that clients can install it using the
[documented signed APT configuration][apt-installation].
### Prepare a web update
For a release tested through the web updater, generate and attach
`web-update.json` alongside the matching wheel. List each tested starting
package version after the wheel path. Only list versions that can upgrade
@@ -71,6 +137,7 @@ python tools/web_update_manifest.py dist/coulobre_panel-0.10.2rc1-py3-none-any.w
[issues]: https://code.hosting.hippogrief.nl/hippogrief/coulobre/issues
[milestones]: https://code.hosting.hippogrief.nl/hippogrief/coulobre/milestones
[releases]: https://code.hosting.hippogrief.nl/hippogrief/coulobre/releases
[semver]: https://semver.org/
[versions]: https://packaging.python.org/en/latest/specifications/version-specifiers/#pre-releases
[build]: https://build.pypa.io/en/stable/
[deployment-checks]: docs/deployment.md#verify-a-new-installation
@@ -130,8 +197,15 @@ python tools/web_update_manifest.py dist/coulobre_panel-0.10.2rc1-py3-none-any.w
- Reuse existing templates and styles for controls, focus states, and
status labels. Keep form inputs labelled and validation errors close to
the field that needs attention.
- Use the shared workspace template for signed-in pages. Place the page
heading first, followed by local tabs and any account, domain, or list
filters. Start the main content below the divider. Keep status updates
separate from forms the operator or customer may be editing.
[Workspace template](src/coulobre/hosting/templates/hosting/workspace_page.html)
## Checks
Run the development checks before submitting a pull request. Gitea Actions
checks Python 3.12 and 3.14. [Development checks](docs/development.md#checks)
[debian-registry]: https://docs.gitea.com/usage/packages/debian/
[apt-installation]: docs/deployment.md#use-the-gitea-apt-repository
+3
View File
@@ -0,0 +1,3 @@
#!/bin/sh
set -eu
exec /usr/bin/python3 /usr/share/coulobre-panel/source/deploy/install-panel.py "$@"
+14
View File
@@ -0,0 +1,14 @@
#!/bin/sh
set -eu
if [ "$1" != configure ] || [ ! -e /etc/coulobre/panel.env ]; then
exit 0
fi
systemd-run --quiet --wait --pipe --collect \
--property=EnvironmentFile=/etc/coulobre/panel.env \
--setenv=PYTHONPATH=/usr/share/coulobre-panel/source/src \
/opt/coulobre/bin/python -P -m coulobre.package_upgrade
systemctl daemon-reload
systemctl enable --now coulobre-remote-deploy.socket
+6
View File
@@ -0,0 +1,6 @@
#!/bin/sh
set -eu
if [ "$1" = remove ] && [ -d /run/systemd/system ]; then
systemctl disable --now coulobre-remote-deploy.socket
fi
+10
View File
@@ -279,6 +279,14 @@ def install_release(release, *, step=nullcontext):
if installed and ready == "1":
return
with_extras = f"{SOURCE}[server,mariadb]"
if Path("/usr/share/coulobre-panel/source") == SOURCE:
bundled = (
SOURCE.parent
/ "wheel"
/ (f"coulobre_panel-{release}-py3-none-any.whl")
)
root_file(bundled, 0o644)
with_extras = f"{bundled}[server,mariadb]"
pip_env = {
key: os.environ[key]
for key in ("PIP_NO_INDEX", "PIP_FIND_LINKS")
@@ -887,6 +895,8 @@ class Installer:
install_unit("coulobre-update.socket")
install_unit("coulobre-update@.service")
workers.append("coulobre-update.socket")
if Path("/usr/share/coulobre-panel/source") == SOURCE:
workers.append("coulobre-remote-deploy.socket")
systemctl("daemon-reload")
systemctl(
"enable", "--now", *PANEL_UNITS, *workers, "apache2.service"
+133 -26
View File
@@ -3,21 +3,30 @@ import json
import os
import shlex
import tarfile
import tomllib
from pathlib import Path
from tempfile import TemporaryDirectory
from types import SimpleNamespace
from . import certificates, engine, roles
from .config import InstallError, certificate, platform_settings
from .config import (
REMOTE_MODES,
InstallError,
certificate,
check_password,
parse_plan,
platform_settings,
)
BOOTSTRAP = """set -eu
umask 077
work=$(mktemp -d /var/tmp/coulobre-node.XXXXXXXX)
work=$(mktemp -d /run/coulobre-node.XXXXXXXX)
trap 'rm -rf -- "$work"' EXIT
cd "$work"
tar --extract --gzip --no-same-owner --no-same-permissions
umask 022
/usr/bin/flock -n /run/lock/coulobre-bootstrap.lock \\
/usr/bin/systemd-cat -t coulobre-bootstrap \\
/usr/bin/python3 -m deploy.panel_installer.remote
"""
SOURCE_ITEMS = (
@@ -56,23 +65,13 @@ def bootstrap_archive(settings):
return output.getvalue()
def install(name, target, email):
def ssh_bootstrap(target, settings, *, check=False):
identity = Path(target.ssh_identity)
engine.root_file(identity, 0o600)
host_read = Path(target.host_key).read_text(encoding="ascii").split()
if len(host_read) < 2:
raise InstallError("Supply a verified SSH host key.")
host_key = " ".join(host_read[:2])
public = Path(f"/etc/coulobre-remote/{name}/id_ed25519.pub").read_text()
settings = {
"role": name,
"panel_key": public,
"email": email,
"hostname": target.mail_hostname,
"tls": target.tls,
"certificate": target.certificate,
"key": target.key,
}
host = (
target.host if target.port == 22 else f"[{target.host}]:{target.port}"
)
@@ -95,6 +94,8 @@ def install(name, target, email):
"-o",
"IdentitiesOnly=yes",
"-o",
"ClearAllForwardings=yes",
"-o",
"IdentityAgent=none",
"-o",
"ConnectTimeout=15",
@@ -106,16 +107,39 @@ def install(name, target, email):
f"UserKnownHostsFile={known_hosts}",
"--",
target.host,
shlex.join(("sudo", "-n", "/bin/sh", "-c", BOOTSTRAP)),
source=bootstrap_archive(settings),
label=(
f"Install the remote {name} node. "
"Check administrator SSH, sudo and the node logs"
shlex.join(
("sudo", "-n", "/usr/bin/true")
if check
else ("sudo", "-n", "/bin/sh", "-c", BOOTSTRAP)
),
timeout=3600,
source=None if check else bootstrap_archive(settings),
label=(
"Check SSH host identity, administrator key and sudo access"
if check
else "Install the destination. Check SSH, sudo and its journal"
),
timeout=25 if check else 3600,
)
def install(name, target, email, *, scope="", domains=()):
public = Path(f"/etc/coulobre-remote/{name}/id_ed25519.pub").read_text()
ssh_bootstrap(
target,
{
"role": name,
"panel_key": public,
"email": email,
"hostname": target.mail_hostname if name == "mail" else "",
"tls": target.tls if name == "mail" else "provided",
"certificate": target.certificate if name == "mail" else "",
"key": target.key if name == "mail" else "",
"scope": scope,
"domains": domains,
},
)
def prepare_node(settings):
name = settings["role"]
_, modern_mail = platform_settings()
@@ -150,12 +174,84 @@ def prepare_node(settings):
roles.configure_mail(target, modern_mail)
def standalone_plan(settings):
plan = parse_plan(tomllib.loads(settings["plan"]))
if REMOTE_MODES.intersection((plan.dns.mode, plan.mail.mode)):
raise InstallError("Use local or disabled roles on the new panel.")
return plan
def check_destination(settings):
platform_settings()
machine = Path("/etc/machine-id").read_text().strip()
if machine == settings["origin_machine"]:
raise InstallError("Choose a destination other than the origin.")
python = engine.BINDIR / "python"
if python.is_file():
installed = engine.run(
python,
"-I",
"-c",
(
"from importlib.metadata import distributions; "
"print(next((p.version for p in distributions() "
"if p.metadata['Name'] == 'coulobre-panel'), ''))"
),
label="Check the installed destination release",
).strip()
if installed and installed != settings["release"]:
raise InstallError("Use the same release on the destination.")
if settings["roles"]:
if engine.ENV_FILE.exists():
raise InstallError("Choose a dedicated mail or DNS receiver.")
if "mail" in settings["roles"] and settings["tls"] == "provided":
certificate(settings, "mail")
for role in settings["roles"]:
unit = engine.SYSTEMD / f"coulobre-{role}-apply@.service"
state_file = NODE_STATE / f"{role}.json"
if unit.is_file() and (
not state_file.is_file()
or json.loads(state_file.read_text())["complete"]
):
engine.run(
engine.BINDIR / "coulobre-node-setup",
"check-receiver",
role,
label=f"Check the existing {role} service",
)
else:
standalone_plan(settings)
if (
engine.ENV_FILE.exists()
and not (engine.STATE / "installation.json").exists()
):
raise InstallError("Use the upgrade guide for the existing panel.")
if (
any(
(engine.SYSTEMD / f"coulobre-{role}-apply@.service").is_file()
for role in roles.WORKERS
)
and not (engine.STATE / "installation.json").exists()
):
raise InstallError("Choose a host without existing receivers.")
def install_on_node(settings):
name = settings["role"]
if name == "check":
check_destination(settings)
return
if name == "panel":
plan = standalone_plan(settings)
engine.Installer(
plan, check_password(settings["password"]), print
).install()
return
if name not in roles.WORKERS:
raise InstallError("Choose a supported node role.")
engine.root_directory(NODE_STATE, mode=0o700)
state_file = NODE_STATE / f"{name}.json"
node_setup = engine.BINDIR / "coulobre-node-setup"
requested = {
field: settings[field]
for field in (
@@ -168,14 +264,18 @@ def install_on_node(settings):
if os.path.lexists(state_file):
engine.root_file(state_file, 0o600)
state = json.loads(state_file.read_text())
if requested != state["configuration"]:
if requested != state["configuration"] and (
name != "dns" or not state["complete"]
):
raise InstallError("Use the settings of the configured node.")
elif os.path.lexists(engine.SYSTEMD / f"coulobre-{name}-apply@.service"):
# An existing receiver owns its service configuration.
state = {"complete": True}
else:
state = {"configuration": requested, "complete": False}
engine.put_file(state_file, json.dumps(state), mode=0o600)
if not state["complete"]:
prepare_node(settings)
node_setup = engine.BINDIR / "coulobre-node-setup"
engine.run(
node_setup, "check-receiver", name, label=f"Check the {name} receiver"
)
@@ -185,12 +285,19 @@ def install_on_node(settings):
with TemporaryDirectory(prefix="coulobre-panel-key-") as directory:
key = Path(directory) / "panel.pub"
key.write_text(settings["panel_key"])
if settings.get("scope"):
command = (
"authorize-scoped-panel",
name,
settings["scope"],
key,
*settings["domains"],
"--keep-domains",
)
else:
command = ("authorize-panel", name, key)
engine.run(
node_setup,
"authorize-panel",
name,
key,
label=f"Authorize the panel for {name}",
node_setup, *command, label=f"Authorize the panel for {name}"
)
@@ -0,0 +1,14 @@
[Unit]
Description=Coulobre remote installation socket
[Socket]
ListenStream=/run/coulobre-remote-deploy.sock
SocketUser=coulobre-panel
SocketGroup=root
SocketMode=0600
Accept=yes
MaxConnections=8
RemoveOnStop=true
[Install]
WantedBy=sockets.target
@@ -0,0 +1,21 @@
[Unit]
Description=Coulobre remote installation
After=network-online.target
CollectMode=inactive-or-failed
[Service]
Type=exec
User=root
WorkingDirectory=/opt/coulobre
StateDirectory=coulobre-remote-deploy
StateDirectoryMode=0700
RuntimeDirectory=coulobre-remote-deploy-%i
RuntimeDirectoryMode=0700
UMask=0077
ExecStart=/opt/coulobre/bin/python -I -m coulobre.remote_deployment
StandardInput=socket
StandardOutput=journal
StandardError=journal
RuntimeMaxSec=130min
NoNewPrivileges=true
ProtectHome=true
+155 -15
View File
@@ -125,6 +125,135 @@ When two panels share a node, keep separate role keys and give each hosted
domain one panel owner. Review the installed receiver configuration before
adding an independent role to an existing server.
## Install or upgrade from a Debian package
The `coulobre-panel` package targets Ubuntu 26.04 and Debian 13. Both use
the same architecture-independent artifact. For a local download, verify
the SHA-256 checksum in the release notes, then use APT from a root console
on the target host.
```sh
sudo apt install ./coulobre-panel_VERSION_all.deb
sudo coulobre-install --interactive
```
On a fresh server the package stages the release wheel, installer, and remote
installation service. Run `coulobre-install` after APT exits. It accepts the
same `--interactive`, `--config`, and `--web` options as the source installer
and installs the selected operating system services and Python dependencies.
### Use the Gitea APT repository
Use the `resolute` suite on Ubuntu 26.04 or `trixie` on Debian 13. The `main`
component carries final releases. Use `candidate` on a test host to opt in to
release candidates. A version like `0.13.0~rc1` sorts before `0.13.0` in APT.
```sh
suite=resolute
component=main
registry=https://code.hosting.hippogrief.nl/api/packages/hippogrief/debian
sudo install -d -m 0755 /etc/apt/keyrings
sudo curl -fsS "$registry/repository.key" -o /etc/apt/keyrings/hippogrief.asc
sudo chmod 0644 /etc/apt/keyrings/hippogrief.asc
printf 'deb [signed-by=/etc/apt/keyrings/hippogrief.asc] %s %s %s\n' \
"$registry" "$suite" "$component" | sudo tee /etc/apt/sources.list.d/hippogrief.list
sudo apt update
sudo apt install coulobre-panel
```
Set `component=candidate` when testing a release candidate. Gitea adds the
`main` component to each suite when its first final package is published.
[Gitea Debian registry documentation](https://docs.gitea.com/usage/packages/debian/)
### Upgrade an installer-managed panel
Install the reviewed local package or run
`sudo apt install --only-upgrade coulobre-panel` from the server console.
The first package can also adopt a compatible source-based installation.
In either case the installer must have completed and the panel must use
the local MariaDB database. Pause provisioning work and stage linked
receivers at the target version first using the
[linked-node upgrade procedure](#coordinate-a-release-across-linked-mail-and-dns-receivers).
Schedule a maintenance window and keep an independent backup or snapshot.
During package configuration, Coulobre takes its existing recovery backup,
installs the packaged wheel in `/opt/coulobre`, applies Django migrations,
collects static files, restarts services, and checks the panel response.
The host configuration and hosted data remain in their original locations.
The virtual environment must satisfy the incoming wheel's dependencies.
For a release requiring dependency changes, install those dependencies per
its release instructions before retrying package configuration. **Updates**
in the panel shows the installed version and last upgrade result. For
APT-managed installs, apply Coulobre updates through APT.
If an upgrade fails, inspect `/var/lib/coulobre-update/` as root and use
the [recovery procedure](#install-a-compatible-release-from-the-panel) when recovery is
required. Once the issue is resolved, run `sudo dpkg --configure -a` to
finish configuration. For a full downgrade, restore the server snapshot
including the package database. Removing the package removes its staged
installer and remote installation service. The configured panel runtime,
service configuration and customer data remain on the server.
## Install a host from the web panel
On a packaged installation, open **Server Manager → Connected Nodes →
Install a remote server** as an operator with verified two-factor
authentication. Source deployments can [enable the same installer](#enable-web-installation-from-source).
1. Choose a standalone panel, DNS receiver, mail receiver, or both receivers
on one host. Coulobre deploys the source matching the running version.
2. Enter the destination and an administrator with noninteractive `sudo`.
Use a dedicated temporary OpenSSH key without a passphrase. Copy the
destination's host public key directly from its console, omitting the
trailing comment. The panel checks the pinned host key before running
anything over SSH.
3. For mail, provide the public mail hostname and choose a certificate.
Existing certificate paths refer to the destination. For a standalone
panel, paste the CLI's [TOML installation plan](#automated-command-line)
with local or disabled roles and enter the new administrator's password.
The web form supplies the password directly and ignores
`admin.password_file` in this plan.
4. For a shared receiver, set a different scope for each panel and list
the domains it owns. Review the
[shared receiver procedure](#limit-linked-provisioning-to-assigned-domains) before
adding scope-based access to a receiver with an unrestricted key.
5. Start the installation and follow the progress on the same page.
Revoke the temporary SSH key on the destination when complete. Coulobre
keeps only progress metadata. The restricted role keys are used for
subsequent DNS and mailbox operations.
A mail or DNS install enrols the receiver on the originating panel and
checks its configuration and release before reporting completion. Use this
for an unconfigured role or to resume linking the same host. Move an existing
local or remote role through the documented migration procedure first.
The standalone option sets up a separate panel with its own accounts and
services. After an interrupted installation, retry the same settings.
Review `journalctl -t coulobre-bootstrap` on the destination and
`journalctl -u 'coulobre-remote-deploy@*.service'` on the originating host
for details.
### Enable web installation from source
Extract the verified distribution matching the installed Coulobre version
below a root-controlled directory such as `/opt/coulobre-deployment`. Install
the socket and instance service from its `deploy/systemd` directory.
```sh
source_dir=/opt/coulobre-deployment
sudo install -m 0644 "$source_dir"/deploy/systemd/coulobre-remote-deploy.socket \
"$source_dir"/deploy/systemd/coulobre-remote-deploy@.service /etc/systemd/system/
sudo install -d /etc/systemd/system/coulobre-remote-deploy@.service.d
printf '[Service]\nEnvironment=COULOBRE_BOOTSTRAP_SOURCE=%s\n' "$source_dir" | \
sudo tee /etc/systemd/system/coulobre-remote-deploy@.service.d/source.conf
sudo systemctl daemon-reload
sudo systemctl enable --now coulobre-remote-deploy.socket
```
Replace the extracted source with the matching reviewed version after
upgrading the panel. When adopting the Debian package, remove any local
bootstrap source override to use the package-managed source.
## Install the package and configure local services
Run these commands from a Coulobre checkout or an unpacked source release
@@ -502,8 +631,8 @@ A verified superuser can assign a Customer or Manager role to an
active login from **Customers** or **Managers**. Choose **Assign
to existing login** and enter the username. Customer roles use their own
assigned hosting accounts. Managers use their own hosting account
assignments and hosting plan policy. New manager assignments use the default
manager profile when one is configured.
assignments and hosting package policy. New manager assignments use the default
manager package when one is configured.
Logins with multiple roles can choose **Panel role** in the account area.
The role applies to the session, including direct page requests and actions.
@@ -532,6 +661,12 @@ components, typography, and spacing. Override these values in `:root` and
`:root[data-appearance="dark"]`. Keep theme assets self-contained and review
third-party styles before installing them.
The same type scale applies to sign-in and all panel roles. Use
`--font-size-title` for page titles, `--font-size-heading` for section
headings, `--font-size-body` for content and controls, and
`--font-size-small` for secondary labels. Override `--font-family` and
`--font-family-mono` to customize the two font stacks.
## Upgrade an existing panel
Download and unpack the new source release. Back up the panel database and
@@ -826,7 +961,7 @@ first mailbox adds the signing key's public DKIM record.
## Verify a new installation
Use a test hosting plan, account, and domain for these checks. Enable the
Use a test hosting package, account, and domain for these checks. Enable the
local services that the installation will offer before checking them.
1. Sign in through the hostname clients will use. Check the HTTPS certificate,
@@ -923,7 +1058,7 @@ to see the latest result. [Website storage measurement](development.md#measure-w
To enforce hard limits, prepare a dedicated ext4 volume with user quotas for
the managed sites. Use **Change storage limit** on the deployed account to
apply the hosting plan's default or choose a per-site value.
apply the hosting package's default or choose a per-site value.
[Website storage quotas](development.md#apply-a-website-storage-limit)
### Choose PHP versions for hosted websites
@@ -943,7 +1078,7 @@ sudo apt install php8.5-fpm php8.6-fpm
sudo systemctl enable --now php8.5-fpm php8.6-fpm
```
Under **Hosting plans**, enter the **Allowed PHP series** as a comma-separated
Under **Hosting packages**, enter the **Allowed PHP series** as a comma-separated
list, such as `8.5, 8.6`. A blank list makes every installed stable series
available. New website activations select the newest installed stable series
in the plan. Each active site retains its recorded series when a package or
@@ -975,7 +1110,7 @@ jobs use their own configured runtimes. Use a versioned command such as
### Configure PHP pool limits per website
Under **Hosting plans**, set default PHP memory, upload size, request timeout,
Under **Hosting packages**, set default PHP memory, upload size, request timeout,
or PHP-FPM worker limits. The panel captures these values when an operator
first requests local activation. A repeat activation preserves an installed
pool's settings.
@@ -1028,7 +1163,7 @@ serves no tenant content when unknown hosts should be rejected.
## Host independent websites
Set a hosting plan's **Website limit** above one to allow additional
Set a hosting package's **Website limit** above one to allow additional
websites under an account. The limit includes the primary website. Existing
plans start with one website. In **Independent websites**, choose **Add
website** to provision a domain or subdomain with its own document root,
@@ -1995,7 +2130,7 @@ To locate that file, download the manifest and use the node's `apply` command.
Reapplying the manifest preserves the password and prints the file path.
[Show mailbox connection details in the panel](#show-local-database-and-mailbox-connection-details)
Set a per-mailbox storage limit on the hosting plan for new mailbox requests.
Set a per-mailbox storage limit on the hosting package for new mailbox requests.
Enable Dovecot quota enforcement on the mail node before provisioning them.
[Mailbox storage limits](development.md#enforce-mailbox-storage-limits)
@@ -2038,7 +2173,7 @@ smtpd_reject_unlisted_recipient = yes
Run `sudo postfix check` and `sudo postfix reload`. Set
`COULOBRE_MAIL_ROUTING=1` in `/etc/coulobre/panel.env`. Operators can opt a
hosting plan into catch-all and external forwarding separately. Plan changes
hosting package into catch-all and external forwarding separately. Plan changes
are checked when saving the next routing revision. To revoke an active
forwarder or catch-all, remove the rule and apply the update.
@@ -2560,9 +2695,9 @@ remote receiver, while databases still use the local credential service.
## Set up manager access
Open **Managers** to add a manager login or change an existing manager's
panel access, account limit, and allowed hosting plans. The detail page shows
panel access, account limit, and allowed hosting packages. The detail page shows
allocated accounts and audit history. Viewing account names and plan details
requires the corresponding hosting account and hosting plan permissions.
requires the corresponding hosting account and hosting package permissions.
The account limit and allowed plans apply when a manager creates a hosting
account. Reducing the limit or removing a plan takes effect on the next
@@ -2573,13 +2708,17 @@ changes to manager policy and account assignments made through the panel.
### Onboard customers
Managers can open **My users** to create a customer login and its first
hosting account together. Choose an allowed hosting plan and give the
Managers can open **Add User** to create a customer login and its first
hosting account together. Choose an allowed hosting package and give the
customer's email address to send a welcome email with a link to set their
password. Preview the email before creating the account. To add a login
for an existing unassigned hosting account, open the account and choose
**Add customer login** or **Link existing customer**.
Operators can open **Contact and invitation** from **Show All Users** to
review the welcome email and send a fresh password setup link to a pending
login. Sending a new invitation replaces the previous link.
Managers handle customer onboarding and hosting assignments in their
portfolio. Customers manage their own website files, databases, mailboxes,
and other hosting resources in the customer workspace. Operators can
@@ -2888,8 +3027,9 @@ sudo systemctl enable --now coulobre-operator-apply.socket \
```
To enable APT actions, set `COULOBRE_SERVER_PACKAGE_UPDATES=1` in
`/etc/coulobre/panel.env`. Open **System → Updates → Server package updates**
and request a preview. The receiver refreshes package indexes and records the
`/etc/coulobre/panel.env` and restart `coulobre-panel`. Open
**System → Updates → Server packages** and check for updates. The receiver
refreshes package indexes and records the
proposed versions. Applying a preview requires confirmation and a fresh
matching package plan. Use the job history and the host's package logs to
review the result.
+14 -8
View File
@@ -19,11 +19,11 @@ Select **Add hosting account** and enter a name and a primary domain such as
`example.org`. Open an account from the list to edit its details or request an
Apache preview. Manage users, groups, and permissions at `/admin/`.
Use **Hosting plans** to add named plans with an optional description. Choose a
Use **Hosting packages** to add named plans with an optional description. Choose a
plan when creating or editing an account. Existing accounts start unassigned.
Operators need permission to view hosting plans before they can assign one.
Operators need permission to view hosting packages before they can assign one.
Set a database limit and a mailbox limit on a hosting plan to cap how many
Set a database limit and a mailbox limit on a hosting package to cap how many
requests each assigned account can make through the panel. A blank limit allows
unlimited requests. Zero blocks new requests of that type. Accounts without a
plan have unlimited requests. The account page shows usage for configured
@@ -39,7 +39,7 @@ Set **Website storage limit (MiB)** to supply the initial value when an
operator applies a website quota from the account page.
[Apply a website storage limit](#apply-a-website-storage-limit)
Set optional PHP resource defaults on a hosting plan. Coulobre applies them
Set optional PHP resource defaults on a hosting package. Coulobre applies them
on first local activation and when an operator reapplies the plan on the
account page. See [website PHP settings](deployment.md#configure-php-pool-limits-per-website).
@@ -56,11 +56,11 @@ Then open a hosting account in Coulobre Panel and select the manager when
editing the account. Existing accounts start with no manager assigned.
Managers can sign in to Coulobre Panel to see their assigned hosting accounts
and plans. They can also onboard customers and assign an allowed hosting plan
and plans. They can also onboard customers and assign an allowed hosting package
to an existing account.
To let the manager add accounts, set a positive account limit and select the
available hosting plans in the manager's admin record. The manager's account
available hosting packages in the manager's admin record. The manager's account
list shows their allowance. The limit applies to self-service creation, and
operator assignments also count toward the allowance. New hosting accounts
automatically belong to the manager and require an allowed plan. A limit of
@@ -83,7 +83,7 @@ should be able to access. To give an existing user customer access, add a
The customer signs in after setting or receiving their password.
Their account list shows only the hosting accounts assigned to them. Each
account page shows its hosting plan, database requests, DNS zones, and mailbox
account page shows its hosting package, database requests, DNS zones, and mailbox
requests. Customers can request databases and mailboxes for their own accounts
within their plan limits. Operators deploy those requests on the hosting nodes.
@@ -96,6 +96,12 @@ and select a customer on hosting accounts they can create or edit. **Can add
customer** enables customer creation. **Can change customer** enables
sign-in suspension and restoration.
To create an account for your own hosting, sign in as a verified server
administrator. On **Add hosting account**, leave **Customer** unassigned and
select **For my own hosting**. The panel links the account to your login and
creates a customer profile if needed. Use the role selector to switch to
**Customer** and manage the hosting assigned to that profile.
If local credential access is enabled, customers can choose **Connection
details** for databases and mailboxes on their assigned accounts. The panel
requires password confirmation for each reveal.
@@ -1089,7 +1095,7 @@ user quotas are active with
On the local installation, open a deployed hosting account and select
**Change storage limit** under **Website storage**. An operator with **Can
change site storage limit** can apply the hosting plan's default or enter
change site storage limit** can apply the hosting package's default or enter
another value in MiB. Clear the field to remove the space limit. The page
shows the last confirmed limit and any pending update.
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "coulobre-panel"
version = "0.12.0rc1"
version = "0.13.0rc3"
description = "A web hosting control panel for hosting providers and resellers."
readme = "README.md"
requires-python = ">=3.12"
+1 -1
View File
@@ -74,7 +74,7 @@ def panel_access(request):
(
label
for label, links in groups
if any(url == active_link for url, _ in links)
if any(url == active_link for url, _, _ in links)
),
"",
)
@@ -51,7 +51,7 @@ class ManagerOnboardingForm(InviteLoginForm):
"primary_domain"
).formfield(required=True)
plan = forms.ModelChoiceField(
queryset=HostingPlan.objects.none(), label="Hosting plan"
queryset=HostingPlan.objects.none(), label="Hosting package"
)
manage_dns = forms.BooleanField(
required=False, label="Manage DNS in Coulobre"
@@ -122,7 +122,7 @@ class ManagerOnboardingView(UserPassesTestMixin, FormView):
form_class = ManagerOnboardingForm
template_name = "hosting/workspace_form.html"
extra_context = {
"title": "Add a new user",
"title": "Add user",
"submit_label": "Create customer and hosting account",
"invitation_preview": True,
}
@@ -277,6 +277,10 @@ class AllUsersView(OperatorOnlyMixin, PermissionRequiredMixin, ListView):
(login, measurements.get(profile.pk) if profile else None)
for login, profile in zip(context["logins"], profiles, strict=True)
]
actor = self.request.user
context["may_manage_invitations"] = actor.has_perm(
"hosting.change_customer"
) or actor.has_perm("hosting.change_reseller")
return context
@@ -301,7 +305,7 @@ class OperatorCreateView(OperatorAuthorization, FormView):
template_name = "hosting/workspace_form.html"
success_url = reverse_lazy("panel:all_users")
extra_context = {
"title": "Add an operator",
"title": "Add operator",
"submit_label": "Create operator",
}
@@ -332,7 +336,7 @@ class MoveHostingForm(forms.Form):
)
confirm = forms.BooleanField(
required=False,
label="I reviewed the destination and its hosting plan policy",
label="I reviewed the destination and its hosting package policy",
)
@@ -398,7 +402,7 @@ class MoveHostingView(OperatorAuthorization, FormView):
item.hosting_plan_id not in allowed_plans for item in moving
):
raise ValidationError(
"The destination must have room and allow every hosting plan."
"The destination needs room and must allow all packages."
)
revision = [
destination.pk,
+53 -1
View File
@@ -1,18 +1,28 @@
from datetime import timedelta
from pathlib import Path
from django.conf import settings
from django.contrib import messages
from django.contrib.auth.mixins import PermissionRequiredMixin
from django.core.exceptions import PermissionDenied
from django.http import HttpResponseBadRequest
from django.shortcuts import redirect
from django.utils import timezone
from django.utils.decorators import method_decorator
from django.views.decorators.cache import never_cache
from django.views.generic import TemplateView
from coulobre.operator_node import SERVICES as CONTROL_UNITS
from coulobre.operator_node import SOCKET, OperatorRequest
from coulobre.service_health import HEALTH_DETAILS, SERVICES, HealthResult
from .access import OperatorOnlyMixin
from .models import ServiceHealth
from .models import OperatorOperation, ServiceHealth
from .operator_tools import queue_operator_request
STALE_AFTER = timedelta(minutes=5)
SERVICE_ACTIONS = ("reload", "restart")
CONTROL_TARGETS = {unit: target for target, unit in CONTROL_UNITS.items()}
STATUS = {
HealthResult.ACTIVE: ("Active", "ready"),
HealthResult.INACTIVE: ("Unavailable", "suspended"),
@@ -29,8 +39,37 @@ class ServiceHealthView(
permission_required = "hosting.view_servicehealth"
template_name = "hosting/service_health.html"
def can_control(self):
user = self.request.user
return user.is_superuser and user.is_verified()
def post(self, request, *args, **kwargs):
if not self.can_control():
raise PermissionDenied
action = request.POST.get("action", "")
target = request.POST.get("target", "")
if action not in SERVICE_ACTIONS or target not in {
CONTROL_TARGETS.get(SERVICES[service][1])
for node in settings.SERVICE_HEALTH_TARGETS
if node.transport == "local"
for service in node.services
}:
return HttpResponseBadRequest("Choose a controlled local service.")
if not Path(SOCKET).is_socket():
messages.error(
request, "The local operator worker is unavailable."
)
else:
queue_operator_request(
request.user, OperatorRequest(action, target)
)
messages.success(request, "Service operation queued.")
return redirect("panel:service_health")
def get_context_data(self, **kwargs):
targets = settings.SERVICE_HEALTH_TARGETS
can_control = self.can_control()
controls_available = can_control and Path(SOCKET).is_socket()
readings = {
(reading.node, reading.service): reading
for reading in ServiceHealth.objects.filter(
@@ -48,17 +87,30 @@ class ServiceHealthView(
readings.get((target.node, service)),
cutoff,
)
| {
"control_target": CONTROL_TARGETS.get(
SERVICES[service][1]
)
}
for service in target.services
],
)
for target in targets
],
controls_available=controls_available,
show_operation_history=can_control,
jobs=OperatorOperation.objects.filter(
action__in=SERVICE_ACTIONS,
).order_by("-pk")[:20]
if can_control
else (),
**kwargs,
)
def service_row(service, reading, cutoff):
row = {
"key": service,
"name": SERVICES[service][0],
"status": "Unknown",
"style": "pending",
+1 -1
View File
@@ -77,7 +77,7 @@ def check_version(account, version):
allowed = allowed_versions(account)
if allowed and version not in allowed:
raise ValidationError(
{"php_version": "This PHP series is outside the hosting plan."}
{"php_version": "This PHP series is outside the hosting package."}
)
+59 -33
View File
@@ -17,8 +17,10 @@ from django.shortcuts import get_object_or_404, redirect
from django.template.loader import render_to_string
from django.urls import reverse, reverse_lazy
from django.utils import timezone
from django.utils.decorators import method_decorator
from django.utils.encoding import force_bytes
from django.utils.http import urlsafe_base64_encode
from django.views.decorators.cache import never_cache
from django.views.decorators.debug import sensitive_variables
from django.views.generic import FormView
from kombu.exceptions import OperationalError
@@ -143,7 +145,7 @@ def enqueue_delivery(invitation_id, revision):
).update(delivery=PanelInvitation.Delivery.FAILED)
@sensitive_variables("path", "message")
@sensitive_variables("path", "context")
def deliver_invitation(invitation_id, revision):
pending = PanelInvitation.objects.filter(
pk=invitation_id,
@@ -166,6 +168,28 @@ def deliver_invitation(invitation_id, revision):
"token": invitation_token.make_token(user),
},
)
context = invitation_message_context(user, setup_url=origin + path)
try:
sent = send_mail(
"Welcome to Coulobre Panel",
render_to_string("hosting/panel_invitation.txt", context),
None,
[user.email],
html_message=render_to_string(
"hosting/panel_invitation.html",
{"invitation_content": context},
),
)
if sent != 1:
raise OSError("The email backend did not accept the invitation.")
except (OSError, ValueError):
pending.update(delivery=PanelInvitation.Delivery.FAILED)
else:
pending.update(delivery=PanelInvitation.Delivery.SENT)
def invitation_message_context(user, *, setup_url=""):
invitation = getattr(user, "panel_invitation", None)
account = (
HostingAccount.objects.filter(
customer__user=user, retired_at__isnull=True
@@ -179,10 +203,10 @@ def deliver_invitation(invitation_id, revision):
if account
else None
)
message = render_welcome_message(
return welcome_message_context(
username=user.get_username(),
welcome_message=invitation.welcome_message,
setup_url=origin + path,
welcome_message=invitation.welcome_message if invitation else "",
setup_url=setup_url,
account=account,
nameservers=zone.nameservers if zone else (),
mail_configured=bool(
@@ -192,19 +216,9 @@ def deliver_invitation(invitation_id, revision):
).exists()
),
)
try:
sent = send_mail(
"Your Coulobre Panel invitation", message, None, [user.email]
)
if sent != 1:
raise OSError("The email backend did not accept the invitation.")
except (OSError, ValueError):
pending.update(delivery=PanelInvitation.Delivery.FAILED)
else:
pending.update(delivery=PanelInvitation.Delivery.SENT)
def render_welcome_message(
def welcome_message_context(
*,
username,
welcome_message,
@@ -213,24 +227,31 @@ def render_welcome_message(
nameservers,
mail_configured,
):
return {
"username": username,
"welcome_message": welcome_message,
"setup_url": setup_url,
"panel_url": (
settings.PASSWORD_RESET_ORIGIN.rstrip("/") + "/"
if settings.PASSWORD_RESET_ORIGIN
else ""
),
"account": account,
"nameservers": nameservers,
"website_records": (
website_records(account.primary_domain, wildcard=False)
if account and not nameservers
else ()
),
"imap_host": settings.MAIL_IMAP_HOST,
"submission_host": settings.MAIL_SUBMISSION_HOST,
"mail_configured": mail_configured,
}
def render_welcome_message(**kwargs):
return render_to_string(
"hosting/panel_invitation.txt",
{
"username": username,
"welcome_message": welcome_message,
"setup_url": setup_url,
"panel_url": settings.PASSWORD_RESET_ORIGIN.rstrip("/") + "/",
"account": account,
"nameservers": nameservers,
"website_records": (
website_records(account.primary_domain, wildcard=False)
if account and not nameservers
else ()
),
"imap_host": settings.MAIL_IMAP_HOST,
"submission_host": settings.MAIL_SUBMISSION_HOST,
"mail_configured": mail_configured,
},
"hosting/panel_invitation.txt", welcome_message_context(**kwargs)
)
@@ -259,6 +280,7 @@ class InvitationEmailForm(forms.Form):
email = forms.EmailField(label="Contact email")
@method_decorator(never_cache, name="dispatch")
class ManageInvitation(AccessMixin, FormView):
form_class = InvitationEmailForm
template_name = "hosting/manage_invitation.html"
@@ -292,10 +314,14 @@ class ManageInvitation(AccessMixin, FormView):
def get_context_data(self, **kwargs):
user = self.record.user
can_send = user.is_active and not user.has_usable_password()
return super().get_context_data(
login_user=user,
invitation=getattr(user, "panel_invitation", None),
can_send=user.is_active and not user.has_usable_password(),
can_send=can_send,
welcome_preview=(
invitation_message_context(user) if can_send else None
),
**kwargs,
)
+2 -2
View File
@@ -47,7 +47,7 @@ def validate_policy(resource, spec, account):
def validate_routing(domain, spec, plan):
if spec.catchall and not (plan and plan.allow_mail_catchall):
raise ValidationError("This hosting plan does not allow catch-all.")
raise ValidationError("This hosting package does not allow catch-all.")
mailboxes = domain.mailboxes.all()
if mailboxes.filter(local_part__in=spec.aliases).exists():
raise ValidationError("An alias cannot replace a requested mailbox.")
@@ -68,7 +68,7 @@ def validate_routing(domain, spec, plan):
)
elif not (plan and plan.allow_external_mail_forwarding):
raise ValidationError(
"This hosting plan does not allow external forwarding."
"This hosting package does not allow external forwarding."
)
+119 -88
View File
@@ -2,70 +2,75 @@ from datetime import timedelta
from pathlib import Path
from django import forms
from django.conf import settings
from django.contrib import messages
from django.db import transaction
from django.contrib.auth import get_user_model
from django.db import DatabaseError, connection, transaction
from django.shortcuts import redirect
from django.utils import timezone
from django.utils.decorators import method_decorator
from django.utils.functional import cached_property
from django.views.decorators.cache import never_cache
from django.views.generic import FormView, TemplateView
from coulobre.operator_node import SERVICES, SOCKET, OperatorRequest
from coulobre import remote_deployment
from coulobre.operator_node import (
DATABASE_COUNTERS_QUERY,
DATABASE_VERSION_QUERY,
SOCKET,
OperatorRequest,
database_report_from_rows,
)
from .account_administration import OperatorAuthorization
from .models import OperatorOperation
from .tasks import run_operator_operation
from .tasks import OPERATOR_OPERATION_LEASE, run_operator_operation
from .update_views import inspect_linked_nodes
TOOL_ACTIONS = {
"packages": (
"Server package updates",
("package-preview", "package-upgrade"),
),
"services": ("System services", ("reload", "restart")),
"database": ("Database monitor", ("database-report",)),
}
ACTION_LABELS = {
"package-preview": "Review available updates",
"package-preview": "Check for package updates",
"package-upgrade": "Apply reviewed updates",
"reload": "Reload",
"restart": "Restart",
"database-report": "Collect MariaDB status",
}
class OperatorToolForm(forms.Form):
action = forms.ChoiceField()
preview_id = forms.IntegerField(required=False, widget=forms.HiddenInput)
target = forms.ChoiceField(
required=False,
choices=[
("", "Select a service"),
*[(key, label) for key, label in SERVICES.items()],
],
def package_operation_pending(job):
return (
job is not None
and job.finished_at is None
and (job.started_at or job.requested_at)
> timezone.now() - OPERATOR_OPERATION_LEASE
)
def queue_operator_request(user, spec, *, source=None):
job = OperatorOperation.objects.create(
actor=user,
action=spec.action,
target=spec.target,
plan=spec.plan,
source=source,
)
transaction.on_commit(lambda: run_operator_operation.delay(job.pk))
class ServerUpdateForm(forms.Form):
action = forms.ChoiceField(choices=ACTION_LABELS.items())
preview_id = forms.IntegerField(required=False, widget=forms.HiddenInput)
confirm = forms.BooleanField(
required=False, label="I reviewed the change and want to apply it"
)
def __init__(self, *args, actions, preview, **kwargs):
def __init__(self, *args, preview, **kwargs):
super().__init__(*args, **kwargs)
self.preview = preview
self.initial["preview_id"] = preview.pk if preview else None
self.fields["action"].choices = [
(action, ACTION_LABELS[action]) for action in actions
]
if "reload" not in actions:
self.fields.pop("target")
if actions == ("database-report",):
self.fields.pop("confirm")
def clean(self):
data = super().clean()
if self.errors:
return data
action = data["action"]
if action in {"reload", "restart", "package-upgrade"} and not data.get(
"confirm"
):
if action == "package-upgrade" and not data.get("confirm"):
self.add_error(
"confirm", "Confirm this change before applying it."
)
@@ -80,89 +85,115 @@ class OperatorToolForm(forms.Form):
)
plan = self.preview.result.get("fingerprint", "")
try:
self.spec = OperatorRequest(action, data.get("target", ""), plan)
self.spec = OperatorRequest(action, plan=plan)
except ValueError as error:
raise forms.ValidationError(str(error)) from error
return data
class OperatorToolsView(OperatorAuthorization, FormView):
form_class = OperatorToolForm
template_name = "hosting/operator_tools.html"
page = "services"
@method_decorator(never_cache, name="dispatch")
class ServerUpdatesView(OperatorAuthorization, FormView):
form_class = ServerUpdateForm
template_name = "hosting/server_updates.html"
def preview(self):
return (
OperatorOperation.objects.filter(
action="package-preview",
actor=self.request.user,
problem="",
finished_at__gte=timezone.now() - timedelta(minutes=15),
)
.order_by("-pk")
.first()
)
def package_jobs(self):
return OperatorOperation.objects.filter(
action__in=ACTION_LABELS
).order_by("-pk")
@cached_property
def latest(self):
return self.package_jobs().filter(actor=self.request.user).first()
def preview(self, job):
if (
job is not None
and job.action == "package-preview"
and not job.problem
and job.finished_at is not None
and job.finished_at >= timezone.now() - timedelta(minutes=15)
):
return job
return None
def get_form_kwargs(self):
return super().get_form_kwargs() | {
"actions": TOOL_ACTIONS[self.page][1],
"preview": self.preview() if self.page == "packages" else None,
}
kwargs = super().get_form_kwargs()
return kwargs | {"preview": self.preview(self.latest)}
def get_context_data(self, **kwargs):
title, actions = TOOL_ACTIONS[self.page]
latest = self.latest
return super().get_context_data(
title=title,
page=self.page,
available=Path(SOCKET).is_socket(),
jobs=OperatorOperation.objects.filter(action__in=actions).order_by(
"-pk"
)[:20],
enabled=settings.SERVER_PACKAGE_UPDATES,
latest=latest,
pending=package_operation_pending(latest),
jobs=self.package_jobs().select_related("actor")[:20],
**kwargs,
)
@transaction.atomic
def form_valid(self, form):
if not Path(SOCKET).is_socket():
if not settings.SERVER_PACKAGE_UPDATES or not Path(SOCKET).is_socket():
return self.form_invalid(form)
# Serialize an operator's submissions before checking the plan.
user = self.request.user
get_user_model().objects.select_for_update().get(pk=user.pk)
latest = self.package_jobs().filter(actor=user).first()
if package_operation_pending(latest):
return redirect(self.request.path)
spec = form.spec
preview = form.preview if spec.action == "package-upgrade" else None
if preview is not None and (
self.preview(latest) != preview
or not preview.result.get("count")
or OperatorOperation.objects.filter(source=preview).exists()
):
form.add_error(
None,
"Enable the local operator service before requesting "
"an operation.",
"Check for updates and review the current package list.",
)
return self.form_invalid(form)
spec = form.spec
if form.preview is not None and spec.action == "package-upgrade":
OperatorOperation.objects.select_for_update().get(
pk=form.preview.pk
)
recent = OperatorOperation.objects.filter(
source=form.preview
).exists()
if recent:
form.add_error(
None,
"Collect a new preview before starting another "
"package update.",
)
return self.form_invalid(form)
job = OperatorOperation.objects.create(
actor=self.request.user,
action=spec.action,
target=spec.target,
plan=spec.plan,
source=form.preview if spec.action == "package-upgrade" else None,
queue_operator_request(
user,
spec,
source=preview,
)
transaction.on_commit(lambda: run_operator_operation.delay(job.pk))
messages.success(self.request, "Host operation queued.")
return redirect(self.request.path)
def current_database_report():
if connection.vendor != "mysql":
return None
try:
with connection.cursor() as cursor:
cursor.execute(DATABASE_VERSION_QUERY)
version = cursor.fetchone()
cursor.execute(DATABASE_COUNTERS_QUERY)
return database_report_from_rows([version, *cursor.fetchall()])
except (DatabaseError, ValueError):
return None
@method_decorator(never_cache, name="dispatch")
class DatabaseMonitorView(OperatorAuthorization, TemplateView):
template_name = "hosting/database_monitor.html"
def get_context_data(self, **kwargs):
return super().get_context_data(
report=current_database_report(),
observed_at=timezone.now(),
**kwargs,
)
class ConnectedNodesView(OperatorAuthorization, TemplateView):
template_name = "hosting/connected_nodes.html"
def get_context_data(self, **kwargs):
return super().get_context_data(
topology=inspect_linked_nodes(), **kwargs
topology=inspect_linked_nodes(),
deploy_enabled=remote_deployment.SOCKET.is_socket(),
**kwargs,
)
+11 -2
View File
@@ -22,8 +22,13 @@ from .models import Customer, Reseller, ResellerProfile
SESSION_ROLE = "coulobre_panel_role"
ROLE_LABELS = {
PanelRole.ADMIN: "Server administrator",
PanelRole.CUSTOMER: "Customer",
PanelRole.MANAGER: "Manager",
PanelRole.CUSTOMER: "Customer",
}
ROLE_SWITCH_DETAILS = {
PanelRole.ADMIN: ("shield", "Server and all accounts"),
PanelRole.MANAGER: ("resellers", "Customers you manage"),
PanelRole.CUSTOMER: ("customers", "Your own hosting"),
}
@@ -126,8 +131,12 @@ class PanelRoleMiddleware:
return redirect("panel:login")
request.active_panel_role = role
request.panel_role_label = ROLE_LABELS[role]
request.panel_role_icon = ROLE_SWITCH_DETAILS[role][0]
request.panel_role_options = [
(option, ROLE_LABELS[option]) for option in roles
(option, ROLE_LABELS[option], *ROLE_SWITCH_DETAILS[option])
for option in PanelRole
if option in roles
]
request.user = scoped_user(user, role)
+2 -2
View File
@@ -40,7 +40,7 @@ class SitePhpSettingsForm(forms.Form):
)
max_children = php_setting_input("max_children", "Maximum PHP-FPM workers")
use_plan = forms.BooleanField(
label="Apply the current hosting plan defaults",
label="Apply the current hosting package defaults",
required=False,
help_text="Uses the plan's values in place of the limits above.",
)
@@ -116,7 +116,7 @@ def limit_customer_php_settings(account, requested):
value = values[key]
if value is not None and (limit is None or value > limit):
raise ValidationError(
"Keep PHP limits within the account's hosting plan."
"Keep PHP limits within the account's hosting package."
)
if value is None:
values[key] = limit
@@ -0,0 +1,195 @@
import json
import socket
from importlib.metadata import version
from django import forms
from django.contrib import messages
from django.shortcuts import redirect
from django.urls import reverse_lazy
from django.utils.decorators import method_decorator
from django.views.decorators.cache import never_cache
from django.views.decorators.debug import sensitive_post_parameters
from django.views.generic import FormView
from coulobre import remote_deployment
from .account_administration import OperatorAuthorization
class WriteOnlyTextarea(forms.Textarea):
def format_value(self, value):
return None
class RemoteDeploymentForm(forms.Form):
role = forms.ChoiceField(
choices=(
("panel", "Standalone Coulobre panel"),
("dns", "DNS receiver"),
("mail", "Mail receiver"),
("mail-dns", "Mail and DNS receivers"),
),
)
host = forms.CharField(label="SSH host", max_length=253)
port = forms.IntegerField(
label="SSH port", min_value=1, max_value=65535, initial=22
)
ssh_user = forms.CharField(label="SSH administrator", max_length=32)
host_key = forms.CharField(
label="Verified SSH host public key",
max_length=8250,
help_text="Copy the key from the server console. Omit its comment.",
)
identity = forms.CharField(
label="Temporary SSH private key",
max_length=16000,
widget=WriteOnlyTextarea(attrs={"rows": 4, "autocomplete": "off"}),
help_text="Use a dedicated key with sudo access and no passphrase.",
)
email = forms.EmailField(label="Let's Encrypt contact", required=False)
mail_hostname = forms.CharField(
label="Public mail hostname", max_length=253, required=False
)
tls = forms.ChoiceField(
label="Mail certificate",
choices=(("acme", "Let's Encrypt"), ("provided", "Existing files")),
required=False,
)
certificate = forms.CharField(
label="Certificate path on the destination",
required=False,
max_length=1024,
)
key = forms.CharField(
label="Certificate private key path on the destination",
required=False,
max_length=1024,
)
scope = forms.CharField(
label="Shared receiver scope",
required=False,
max_length=12,
help_text="Use a different scope for each panel on a shared receiver.",
)
domains = forms.CharField(
label="Domains assigned to this scope",
required=False,
max_length=14000,
widget=forms.Textarea(attrs={"rows": 3}),
help_text="Separate domain names with spaces or newlines.",
)
plan = forms.CharField(
label="Standalone installation plan (TOML)",
required=False,
max_length=14000,
widget=WriteOnlyTextarea(attrs={"rows": 8}),
help_text="Paste the CLI plan with local or disabled roles.",
)
password = forms.CharField(
label="New panel administrator password",
required=False,
min_length=12,
max_length=1024,
strip=False,
widget=forms.PasswordInput(attrs={"autocomplete": "new-password"}),
)
confirmed = forms.BooleanField(
label="I verified the SSH host key and can install on this server"
)
def __init__(self, *args, actor, release, **kwargs):
super().__init__(*args, **kwargs)
self.actor = actor
self.release = release
def clean(self):
data = super().clean()
if self.errors:
return data
role = data["role"]
if "mail" in remote_deployment.ROLES[role]:
if data["tls"] != "provided" and not data["email"]:
self.add_error("email", "Enter the certificate contact email.")
if not data["mail_hostname"]:
self.add_error("mail_hostname", "Enter the mail hostname.")
if data["tls"] == "provided":
for field in ("certificate", "key"):
if not data[field]:
self.add_error(field, "Enter the destination path.")
if self.errors:
return data
self.payload = {
key: value for key, value in data.items() if key != "confirmed"
} | {
"actor": self.actor,
"release": self.release,
"identity": data["identity"].replace("\r\n", "\n"),
"tls": data["tls"] or "acme",
}
try:
remote_deployment.validate_request(self.payload)
encode_request(self.payload)
except ValueError as error:
raise forms.ValidationError(str(error)) from None
return data
def encode_request(payload):
data = json.dumps(payload, ensure_ascii=False).encode() + b"\n"
if len(data) > remote_deployment.MAX_REQUEST:
raise ValueError("Shorten the installation plan or domain list.")
return data
def request_deployment(payload):
data = encode_request(payload)
with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as peer:
peer.settimeout(4)
peer.connect(str(remote_deployment.SOCKET))
peer.sendall(data)
with peer.makefile("rb") as stream:
return json.loads(stream.readline(16384))
@method_decorator(never_cache, name="dispatch")
@method_decorator(
sensitive_post_parameters("identity", "password", "plan"), name="dispatch"
)
class RemoteDeploymentView(OperatorAuthorization, FormView):
template_name = "hosting/remote_deployment.html"
form_class = RemoteDeploymentForm
success_url = reverse_lazy("panel:remote_deploy")
def get_form_kwargs(self):
return super().get_form_kwargs() | {
"actor": self.request.user.get_username(),
"release": version("coulobre-panel"),
}
def get_initial(self):
return super().get_initial() | {"email": self.request.user.email}
def get_context_data(self, **kwargs):
try:
result = request_deployment({"action": "status"})
status = result.get("status", {}) if result["accepted"] else None
except (OSError, ValueError, KeyError):
status = None
return super().get_context_data(
deployment=status, release=version("coulobre-panel"), **kwargs
)
def form_valid(self, form):
try:
result = request_deployment(form.payload)
except (OSError, ValueError):
form.add_error(None, "Could not contact the installation service.")
else:
if result.get("accepted"):
messages.success(self.request, "Remote installation started.")
return redirect(self.success_url)
form.add_error(
None,
result.get("message", "Could not start the installation."),
)
return self.form_invalid(form)
+1 -1
View File
@@ -131,7 +131,7 @@ def create_reseller_account(access, account):
raise ValidationError(
{
"hosting_plan": (
"This hosting plan is no longer available to you."
"This hosting package is no longer available to you."
)
}
)
@@ -134,7 +134,9 @@ def claim_own_customer_hosting(request, pk):
class ManagerHostingPlanForm(forms.Form):
plan = forms.ModelChoiceField(queryset=HostingPlan.objects.none())
plan = forms.ModelChoiceField(
queryset=HostingPlan.objects.none(), label="Hosting package"
)
def __init__(self, *args, manager, **kwargs):
super().__init__(*args, **kwargs)
@@ -145,8 +147,8 @@ class ManagerHostingPlanView(UserPassesTestMixin, FormView):
form_class = ManagerHostingPlanForm
template_name = "hosting/workspace_form.html"
extra_context = {
"title": "Assign hosting plan",
"submit_label": "Assign plan",
"title": "Assign hosting package",
"submit_label": "Assign package",
}
def test_func(self):
+5 -2
View File
@@ -20,6 +20,7 @@ class ResellerProfileForm(forms.ModelForm):
class Meta:
model = ResellerProfile
fields = ("name", "account_limit", "hosting_plans")
labels = {"hosting_plans": "Allowed hosting packages"}
help_texts = {
"account_limit": "Enter 0 to manage existing accounts only.",
}
@@ -32,7 +33,7 @@ class ResellerProfileForm(forms.ModelForm):
values = super().clean()
if values.get("account_limit") and not values.get("hosting_plans"):
self.add_error(
"hosting_plans", "Select at least one hosting plan."
"hosting_plans", "Select at least one hosting package."
)
return values
@@ -67,7 +68,9 @@ class ProfileEditor(ProfilesAccess):
try:
return super().form_valid(form)
except IntegrityError:
form.add_error(None, "The profiles changed. Review and try again.")
form.add_error(
None, "The manager packages changed. Review and try again."
)
return self.form_invalid(form)
+3 -3
View File
@@ -33,11 +33,11 @@ class ResellerPolicyForm(forms.ModelForm):
class Meta:
model = Reseller
fields = ("is_active", "account_limit", "hosting_plans")
labels = {"hosting_plans": "Allowed hosting plans"}
labels = {"hosting_plans": "Allowed hosting packages"}
help_texts = {
"account_limit": "Enter 0 to manage existing accounts only.",
"hosting_plans": (
"Plans available when a manager creates an account."
"Packages available when a manager creates an account."
),
}
@@ -61,7 +61,7 @@ class ResellerPolicyForm(forms.ModelForm):
and not values.get("hosting_plans")
):
self.add_error(
"hosting_plans", "Select at least one hosting plan."
"hosting_plans", "Select at least one hosting package."
)
return values
@@ -31,7 +31,7 @@ updatePanelAppearance();
systemAppearance.addEventListener("change", updatePanelAppearance);
document.addEventListener("DOMContentLoaded", () => {
updatePanelAppearance();
document.querySelector("[data-theme-toggle]").addEventListener("click", () => {
document.querySelector("[data-theme-toggle]")?.addEventListener("click", () => {
panelAppearance = document.documentElement.dataset.appearance === "dark" ? "light" : "dark";
try {
localStorage.setItem(appearancePreference, panelAppearance);
@@ -0,0 +1,75 @@
<!-- SPDX-License-Identifier: Apache-2.0 -->
<svg xmlns="http://www.w3.org/2000/svg">
<symbol id="accounts" viewBox="0 0 24 24">
<rect x="3" y="5" width="18" height="14" rx="2"/><path d="M3 10h18m-14 5h4"/>
</symbol>
<symbol id="customers" viewBox="0 0 24 24">
<circle cx="12" cy="7" r="3"/><path d="M5 21v-2a7 7 0 0 1 14 0v2z"/>
</symbol>
<symbol id="resellers" viewBox="0 0 24 24">
<rect x="3" y="4" width="18" height="16" rx="2"/><circle cx="8" cy="9" r="2"/><path d="M5 16a3 3 0 0 1 6 0m3-7h4m-4 5h4"/>
</symbol>
<symbol id="plans" viewBox="0 0 24 24">
<path d="M6 3h8l4 4v14H6zM14 3v5h4M9 12h6m-6 4h6"/>
</symbol>
<symbol id="packages" viewBox="0 0 24 24">
<path d="m3 7 9-4 9 4v10l-9 4-9-4zM3 7l9 4 9-4m-9 4v10M8 5l9 4v4"/>
</symbol>
<symbol id="network" viewBox="0 0 24 24">
<circle cx="12" cy="12" r="9"/><ellipse cx="12" cy="12" rx="4" ry="9"/><path d="M3 12h18"/>
</symbol>
<symbol id="nodes" viewBox="0 0 24 24">
<rect x="9" y="3" width="6" height="5" rx="1"/><rect x="3" y="16" width="6" height="5" rx="1"/><rect x="15" y="16" width="6" height="5" rx="1"/><path d="M12 8v4m-6 4v-4h12v4"/>
</symbol>
<symbol id="lock" viewBox="0 0 24 24">
<rect x="5" y="10" width="14" height="11" rx="2"/><path d="M8 10V7a4 4 0 0 1 8 0v3m-4 4v3"/>
</symbol>
<symbol id="database" viewBox="0 0 24 24">
<ellipse cx="12" cy="6" rx="8" ry="3"/><path d="M4 6v12a8 3 0 0 0 16 0V6M4 12a8 3 0 0 0 16 0"/>
</symbol>
<symbol id="folder" viewBox="0 0 24 24">
<path d="M3 19V5h7l2 3h9v11z"/>
</symbol>
<symbol id="settings" viewBox="0 0 24 24">
<path d="M4 6h9m4 0h3M4 12h3m4 0h9M4 18h11m4 0h1"/><circle cx="15" cy="6" r="2"/><circle cx="9" cy="12" r="2"/><circle cx="17" cy="18" r="2"/>
</symbol>
<symbol id="appearance" viewBox="0 0 24 24">
<circle cx="12" cy="12" r="9"/><path d="M12 3v18m0-13h5m-5 4h8m-8 4h5"/>
</symbol>
<symbol id="mail" viewBox="0 0 24 24">
<rect x="3" y="5" width="18" height="14" rx="2"/><path d="m4 7 8 6 8-6"/>
</symbol>
<symbol id="message" viewBox="0 0 24 24">
<path d="M3 5h18v12H9l-6 4zM7 9h10m-10 4h7"/>
</symbol>
<symbol id="shield" viewBox="0 0 24 24">
<path d="M12 3 4 6v6c0 4 3 7 8 9 5-2 8-5 8-9V6zM9 12l2 2 4-4"/>
</symbol>
<symbol id="queue" viewBox="0 0 24 24">
<path d="M4 5h16M4 9h16M4 13h16v6H4zM8 16h3"/>
</symbol>
<symbol id="archive" viewBox="0 0 24 24">
<path d="M3 4h18v5H3zm2 5v11h14V9m-10 4h6"/>
</symbol>
<symbol id="health" viewBox="0 0 24 24">
<rect x="3" y="4" width="18" height="16" rx="2"/><path d="M5 12h3l2-4 3 8 2-4h4"/>
</symbol>
<symbol id="chart" viewBox="0 0 24 24">
<path d="M4 4v16h16M8 16v-4m4 4V8m4 8v-6m4 6V6"/>
</symbol>
<symbol id="information" viewBox="0 0 24 24">
<circle cx="12" cy="12" r="9"/><path d="M12 11v6m0-10v.1"/>
</symbol>
<symbol id="clock" viewBox="0 0 24 24">
<circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/>
</symbol>
<symbol id="transfer" viewBox="0 0 24 24">
<path d="M4 8h15m-4-4 4 4-4 4m5 4H5m4-4-4 4 4 4"/>
</symbol>
<symbol id="download" viewBox="0 0 24 24">
<path d="M12 3v12m-4-4 4 4 4-4M4 16v4h16v-4"/>
</symbol>
<symbol id="sign-out" viewBox="0 0 24 24">
<path d="M11 4H4v16h7m-1-8h10m-4-4 4 4-4 4"/>
</symbol>
</svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

@@ -0,0 +1,67 @@
"use strict";
const liveRegions = [...document.querySelectorAll("[data-live-status]")];
let statusRefreshTimer;
let statusRefreshStopped = false;
let statusRefreshRunning = false;
function scheduleStatusRefresh() {
clearTimeout(statusRefreshTimer);
if (!document.hidden && !statusRefreshStopped && !statusRefreshRunning) {
const pending = document.querySelector("[data-live-pending]");
statusRefreshTimer = setTimeout(refreshStatus, pending ? 2_000 : 15_000);
}
}
async function refreshStatus() {
statusRefreshRunning = true;
try {
const response = await fetch(location.href, {
headers: {"X-Coulobre-Status": "1"},
cache: "no-store",
signal: AbortSignal.timeout(8_000),
});
if (response.redirected || [401, 403].includes(response.status)) {
statusRefreshStopped = true;
}
if (statusRefreshStopped || !response.ok || document.hidden) {
return;
}
const page = new DOMParser().parseFromString(await response.text(), "text/html");
const refreshed = new Map(
[...page.querySelectorAll("[data-live-status]")]
.map(region => [region.dataset.liveStatus, region])
);
for (const region of liveRegions) {
const next = refreshed.get(region.dataset.liveStatus);
if (!next || region.contains(document.activeElement) ||
region.querySelector("details[open]:not([data-live-detail]), form input:checked")) {
continue;
}
const openDetails = new Set([...region.querySelectorAll("details[open][data-live-detail]")]
.map(detail => detail.dataset.liveDetail));
for (const detail of next.querySelectorAll("details[data-live-detail]")) {
detail.open = openDetails.has(detail.dataset.liveDetail);
}
if (region.innerHTML === next.innerHTML) {
continue;
}
const scrollPositions = [...region.querySelectorAll(".table-scroll")]
.map(table => table.scrollLeft);
region.replaceChildren(...next.childNodes);
region.querySelectorAll(".table-scroll").forEach((table, index) => {
table.scrollLeft = scrollPositions[index] || 0;
});
}
} catch {
// The current readings remain visible if a refresh fails.
} finally {
statusRefreshRunning = false;
scheduleStatusRefresh();
}
}
if (liveRegions.length) {
document.addEventListener("visibilitychange", scheduleStatusRefresh);
scheduleStatusRefresh();
}
@@ -31,6 +31,24 @@ navigation.addEventListener("keydown", (event) => {
compactLayout.addEventListener("change", updateMenuLayout);
updateMenuLayout();
const roleSwitch = document.querySelector("[data-role-switch]");
if (roleSwitch) {
roleSwitch.addEventListener("keydown", event => {
if (event.key === "Escape" && roleSwitch.open) {
roleSwitch.open = false;
roleSwitch.querySelector("summary").focus();
}
});
document.addEventListener("click", event => {
if (roleSwitch.open && !roleSwitch.contains(event.target)) {
roleSwitch.open = false;
}
});
window.addEventListener("pageshow", () => {
roleSwitch.open = false;
});
}
const accountTabs = document.querySelector("[data-account-tabs]");
if (accountTabs) {
const panels = [...document.querySelectorAll("[data-account-section]")];
+316 -191
View File
@@ -50,7 +50,15 @@
--row-padding: 0.55rem 0.85rem;
--section-gap: 0.9rem;
--font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
font: 100%/1.45 var(--font-family);
--font-family-mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
--font-size-small: 0.75rem;
--font-size-body: 0.875rem;
--font-size-heading: 1rem;
--font-size-title: clamp(1.55rem, 2.5vw, 2rem);
--font-weight-semibold: 600;
--font-weight-bold: 700;
font-family: var(--font-family);
line-height: 1.45;
}
:root[data-appearance="dark"] {
@@ -91,6 +99,7 @@ body {
margin: 0;
background: var(--page);
color: var(--ink);
font-size: var(--font-size-body);
}
a {
@@ -102,6 +111,35 @@ button, input, select, textarea {
font: inherit;
}
input, select, textarea {
font-weight: normal;
}
input::file-selector-button {
font: inherit;
}
small, dt, thead th {
font-size: var(--font-size-small);
}
strong, b {
font-weight: var(--font-weight-bold);
}
pre, code, kbd, samp, .domain, .recovery-codes {
font-family: var(--font-family-mono);
font-size: inherit;
}
.domain, code {
overflow-wrap: anywhere;
}
pre {
overflow-x: auto;
}
:focus-visible {
outline: 3px solid var(--focus);
outline-offset: 3px;
@@ -142,7 +180,6 @@ button, input, select, textarea {
display: flex;
height: 100dvh;
flex-direction: column;
overflow-y: auto;
padding: 1.65rem 1.1rem 1.1rem;
background: linear-gradient(160deg, var(--sidebar-gradient), var(--sidebar) 55%);
color: var(--sidebar-text);
@@ -154,8 +191,8 @@ button, input, select, textarea {
gap: 0.65rem;
padding: 0.25rem 0.45rem;
color: inherit;
font-size: 1.06rem;
font-weight: 750;
font-size: var(--font-size-heading);
font-weight: var(--font-weight-bold);
text-decoration: none;
white-space: nowrap;
}
@@ -187,7 +224,7 @@ button, input, select, textarea {
.brand-product {
color: var(--brand-muted);
font-weight: 500;
font-weight: normal;
}
.navigation {
@@ -196,6 +233,17 @@ button, input, select, textarea {
margin-top: 1.4rem;
}
@media (min-width: 781px) {
.navigation {
min-height: 0;
align-content: start;
overflow-y: auto;
overscroll-behavior: contain;
padding: 0.15rem;
scrollbar-width: thin;
}
}
.navigation a {
display: flex;
align-items: center;
@@ -204,7 +252,6 @@ button, input, select, textarea {
border: 1px solid transparent;
border-radius: 8px;
color: var(--sidebar-link);
font-size: 0.9rem;
text-decoration: none;
}
@@ -216,7 +263,7 @@ button, input, select, textarea {
.navigation a[aria-current] {
box-shadow: inset 3px 0 var(--sidebar-highlight);
font-weight: 650;
font-weight: var(--font-weight-semibold);
}
.menu-toggle {
@@ -230,8 +277,7 @@ button, input, select, textarea {
background: var(--sidebar-active);
color: var(--sidebar-text);
cursor: pointer;
font-size: 0.85rem;
font-weight: 650;
font-weight: var(--font-weight-semibold);
}
.menu-icon {
@@ -245,116 +291,203 @@ button, input, select, textarea {
display: none;
}
.nav-icon {
display: inline-block;
.nav-icon,
.sidebar-icon-action svg {
display: block;
width: 1rem;
height: 0.85rem;
flex: 0 0 auto;
border: 1px solid currentColor;
border-radius: 2px;
height: 1rem;
flex: 0 0 1rem;
fill: none;
stroke: currentColor;
stroke-width: 1.6px;
stroke-linecap: round;
stroke-linejoin: round;
}
.nav-icon {
color: var(--sidebar-icon);
}
.nav-icon-accounts {
background: linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat;
}
.nav-icon-plans {
width: 0.8rem;
height: 1rem;
margin-inline: 0.1rem;
background:
linear-gradient(currentColor, currentColor) center 35% / 55% 1px no-repeat,
linear-gradient(currentColor, currentColor) center 65% / 55% 1px no-repeat;
}
.nav-icon-packages {
background: linear-gradient(currentColor, currentColor) center 35% / 40% 1px no-repeat;
}
.nav-icon-resellers {
background:
linear-gradient(currentColor, currentColor) center 35% / 55% 1px no-repeat,
linear-gradient(currentColor, currentColor) center 65% / 75% 1px no-repeat;
}
.nav-icon-health {
background:
linear-gradient(currentColor, currentColor) 25% bottom / 1px 40% no-repeat,
linear-gradient(currentColor, currentColor) center bottom / 1px 70% no-repeat,
linear-gradient(currentColor, currentColor) 75% bottom / 1px 55% no-repeat;
}
.nav-icon-information {
display: grid;
place-content: center;
border-radius: 50%;
font-size: 0.7rem;
font-weight: 700;
}
.nav-icon-customers {
position: relative;
height: 0.46rem;
margin-top: 0.47rem;
border-radius: 0.4rem 0.4rem 2px 2px;
}
.nav-icon-customers::before {
position: absolute;
left: 50%;
bottom: calc(100% + 2px);
width: 0.39rem;
height: 0.39rem;
transform: translateX(-50%);
border: 1px solid currentColor;
border-radius: 50%;
content: "";
.navigation a:hover .nav-icon,
.navigation a[aria-current] .nav-icon {
color: currentColor;
}
.sidebar-account {
display: grid;
gap: 0.3rem;
grid-template-columns: minmax(0, 1fr);
gap: 0.55rem;
flex: 0 0 auto;
margin-top: auto;
padding: 0.85rem 0.55rem 0;
padding-top: 0.7rem;
border-top: 1px solid var(--sidebar-divider);
font-size: 0.88rem;
}
.operator {
overflow-wrap: anywhere;
font-weight: 650;
.sidebar-account-controls {
display: flex;
align-items: center;
gap: 0.35rem;
}
.sidebar-account a {
color: inherit;
text-underline-offset: 0.2em;
.sidebar-identity {
display: flex;
flex: 1;
align-items: center;
gap: 0.4rem;
min-width: 0;
min-height: 2.2rem;
border-radius: 6px;
color: var(--sidebar-text);
font-weight: var(--font-weight-semibold);
text-decoration: none;
}
a.sidebar-identity:hover {
text-decoration: underline;
}
.sidebar-avatar {
display: grid;
width: 1.9rem;
height: 1.9rem;
flex: 0 0 auto;
place-items: center;
border-radius: 6px;
background: var(--brand-bg);
color: var(--brand-ink);
}
.sidebar-account-name {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.panel-role-switch {
display: grid;
gap: 0.3rem;
margin: 0.6rem 0;
font-size: 0.82rem;
position: relative;
}
.panel-role-switch select {
width: 100%;
.panel-role-switch summary {
display: flex;
align-items: center;
gap: 0.45rem;
min-height: 2.2rem;
background: var(--sidebar-active);
color: var(--sidebar-text);
border: 1px solid var(--sidebar-control-line);
border-radius: 0.35rem;
padding: 0.35rem;
border-radius: 6px;
padding: 0.35rem 0.55rem;
cursor: pointer;
font-size: var(--font-size-small);
font-weight: var(--font-weight-semibold);
list-style: none;
}
.sidebar-account button {
padding: 0;
border: 0;
.panel-role-switch summary::-webkit-details-marker {
display: none;
}
.panel-role-switch summary::after {
width: 0.45rem;
height: 0.45rem;
flex: 0 0 auto;
margin-inline-start: auto;
margin-inline-end: 0.15rem;
border-inline-end: 1.5px solid currentColor;
border-block-end: 1.5px solid currentColor;
content: "";
transform: translateY(-0.1rem) rotate(45deg);
}
.panel-role-switch[open] summary::after {
transform: translateY(0.1rem) rotate(225deg);
}
.panel-role-options {
position: absolute;
z-index: 3;
inset-block-end: calc(100% + 0.4rem);
inset-inline-start: 0;
display: grid;
width: max(100%, 16rem);
max-height: 55dvh;
overflow-y: auto;
padding: 0.25rem;
border: 1px solid var(--sidebar-control-line);
border-radius: 8px;
background: var(--sidebar);
box-shadow: 0 4px 14px #0004;
}
.panel-role-option {
display: grid;
grid-template-columns: auto minmax(0, 1fr) auto;
align-items: center;
gap: 0.5rem;
padding: 0.5rem;
border: 1px solid transparent;
border-radius: 5px;
background: transparent;
color: var(--sidebar-text);
text-align: start;
}
.panel-role-option:enabled {
cursor: pointer;
}
.panel-role-option:hover:enabled,
.panel-role-option[aria-current] {
border-color: var(--sidebar-line);
background: var(--sidebar-active);
}
.sidebar .panel-role-option:focus-visible {
outline-offset: -2px;
}
.panel-role-option strong,
.panel-role-option small {
display: block;
}
.panel-role-option small {
color: var(--sidebar-account);
}
.panel-role-current {
color: var(--sidebar-highlight);
font-size: var(--font-size-small);
font-weight: var(--font-weight-semibold);
}
.sidebar-action {
min-height: 2.2rem;
padding: 0.3rem 0.45rem;
border: 1px solid var(--sidebar-divider);
border-radius: 6px;
background: transparent;
color: var(--sidebar-account);
cursor: pointer;
text-decoration: underline;
text-underline-offset: 0.2em;
white-space: nowrap;
}
.sidebar-action:hover {
border-color: var(--sidebar-control-line);
background: var(--sidebar-active);
color: var(--sidebar-text);
}
.sidebar-icon-action {
display: grid;
width: 2.2rem;
padding: 0;
place-items: center;
}
.appearance-control {
min-width: 2.2rem;
font-size: var(--font-size-heading);
}
.main {
@@ -380,27 +513,32 @@ button, input, select, textarea {
margin-top: 0.2rem;
}
h1, h2, p, dl {
h1, h2, h3, h4, h5, h6, p, dl {
margin: 0;
}
h1, h2, h3, h4, h5, h6 {
font-weight: var(--font-weight-bold);
line-height: 1.25;
}
h1 {
overflow-wrap: anywhere;
font-size: clamp(1.55rem, 3vw, 2.35rem);
font-weight: 760;
letter-spacing: -0.045em;
line-height: 1.12;
font-size: var(--font-size-title);
letter-spacing: -0.03em;
}
h2 {
font-size: 1.12rem;
font-weight: 700;
font-size: var(--font-size-heading);
}
h3, h4, h5, h6 {
font-size: var(--font-size-body);
}
.heading-meta {
margin-top: 0.5rem;
color: var(--muted);
font-size: 0.92rem;
}
.surface {
@@ -411,10 +549,16 @@ h2 {
box-shadow: 0 3px 9px var(--surface-shadow);
}
.main > section.surface + section.surface {
.main > .surface + .surface {
margin-top: var(--section-gap);
}
.live-sections {
display: grid;
grid-template-columns: minmax(0, 1fr);
gap: var(--section-gap);
}
.button {
display: inline-flex;
min-height: 2.55rem;
@@ -424,8 +568,7 @@ h2 {
border: 1px solid transparent;
border-radius: 7px;
cursor: pointer;
font-size: 0.9rem;
font-weight: 650;
font-weight: var(--font-weight-semibold);
text-decoration: none;
}
@@ -468,6 +611,11 @@ h2 {
overflow-wrap: anywhere;
}
.package-controls {
display: grid;
gap: 0.75rem;
}
.update-release {
padding: 0.75rem 0.9rem;
border: 1px solid var(--line);
@@ -476,7 +624,7 @@ h2 {
.update-release > summary {
cursor: pointer;
font-weight: 680;
font-weight: var(--font-weight-semibold);
}
.release-notes {
@@ -486,8 +634,11 @@ h2 {
.release-notes :is(h1, h2, h3, h4, h5, h6) {
margin: 1rem 0 0.25rem;
font-size: 1rem;
line-height: 1.3;
}
.release-notes h1 {
font-size: var(--font-size-heading);
letter-spacing: normal;
}
.release-notes :is(p, ul, ol, pre, blockquote) {
@@ -503,7 +654,6 @@ h2 {
border-radius: 0.4rem;
background: var(--code-bg);
color: var(--code-text);
font-size: 0.85rem;
white-space: pre-wrap;
}
@@ -566,8 +716,7 @@ h2 {
min-height: 2.5rem;
padding: 0.5rem 0.75rem;
border-radius: 7px;
font-size: 0.9rem;
font-weight: 680;
font-weight: var(--font-weight-semibold);
text-decoration: none;
}
@@ -576,11 +725,30 @@ h2 {
text-decoration: underline;
}
.workspace-heading {
display: grid;
grid-template-columns: minmax(0, 1fr);
gap: 1rem;
border-bottom: 1px solid var(--line);
margin-bottom: 1.25rem;
padding-bottom: 0.6rem;
}
.workspace-heading > .page-heading,
.workspace-heading > .account-navigation,
.workspace-heading > .workspace-context {
margin-bottom: 0;
}
.workspace-heading > .account-navigation {
border: 0;
padding-bottom: 0;
}
.pagination {
justify-content: flex-end;
border-top: 1px solid var(--line);
color: var(--muted);
font-size: 0.88rem;
}
input:not([type="hidden"], [type="checkbox"], [type="radio"]),
@@ -605,13 +773,12 @@ input::placeholder {
color: var(--muted);
}
.toolbar input {
.toolbar input, .workspace-context input[type="search"] {
width: min(100%, 20rem);
}
.quiet-link, .back-link {
font-size: 0.88rem;
font-weight: 600;
font-weight: var(--font-weight-semibold);
}
.back-link {
@@ -632,19 +799,14 @@ table {
th, td {
padding: var(--row-padding);
border-top: 1px solid var(--line);
overflow-wrap: anywhere;
overflow-wrap: break-word;
vertical-align: top;
}
th {
background: var(--table-heading);
color: var(--table-heading-text);
font-size: 0.78rem;
font-weight: 700;
}
td {
font-size: 0.93rem;
font-weight: var(--font-weight-semibold);
}
tbody tr:hover {
@@ -655,12 +817,14 @@ tbody tr:hover {
border-top: 0;
}
.surface > .table-scroll:first-child th:first-child {
border-top-left-radius: var(--radius);
.surface > .table-scroll:first-child {
border-start-start-radius: calc(var(--radius) - 1px);
border-start-end-radius: calc(var(--radius) - 1px);
}
.surface > .table-scroll:first-child th:last-child {
border-top-right-radius: var(--radius);
.surface > .table-scroll:last-child {
border-end-start-radius: calc(var(--radius) - 1px);
border-end-end-radius: calc(var(--radius) - 1px);
}
.cell-date, .status {
@@ -668,16 +832,7 @@ tbody tr:hover {
}
.record-link {
font-weight: 650;
}
.domain, code {
font-family: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
overflow-wrap: anywhere;
}
.domain {
font-size: 0.88rem;
font-weight: var(--font-weight-semibold);
}
.muted, .empty {
@@ -686,7 +841,6 @@ tbody tr:hover {
.empty, .notice {
padding: 1.1rem 1.2rem;
font-size: 0.94rem;
}
.details {
@@ -703,8 +857,7 @@ tbody tr:hover {
dt {
color: var(--muted);
font-size: 0.8rem;
font-weight: 650;
font-weight: var(--font-weight-semibold);
}
dd {
@@ -742,8 +895,8 @@ dd {
display: inline-block;
padding: 0.18rem 0.62rem;
border-radius: 0.75rem;
font-size: 0.78rem;
font-weight: 680;
font-size: var(--font-size-small);
font-weight: var(--font-weight-semibold);
}
.status::before {
@@ -774,13 +927,10 @@ dd {
.configuration {
margin: 0;
overflow-x: auto;
padding: 1.2rem;
border-radius: 0 0 var(--radius) var(--radius);
background: var(--code-bg);
color: var(--code-text);
font-size: 0.88rem;
line-height: 1.6;
tab-size: 4;
}
@@ -797,8 +947,7 @@ dd {
.editor label {
display: block;
margin-bottom: 0.35rem;
font-size: 0.88rem;
font-weight: 680;
font-weight: var(--font-weight-semibold);
}
.editor input:not([type="hidden"], [type="checkbox"], [type="radio"]),
@@ -830,8 +979,8 @@ dd {
border: 1px solid var(--control-line);
border-radius: 50%;
color: var(--accent);
font-size: 0.8rem;
font-weight: 700;
font-size: var(--font-size-small);
font-weight: var(--font-weight-bold);
list-style: none;
cursor: pointer;
}
@@ -857,7 +1006,6 @@ dd {
border-radius: 0.5rem;
background: var(--surface);
box-shadow: 0 4px 12px var(--surface-shadow);
font-size: 0.88rem;
}
.dns-surface {
@@ -899,7 +1047,7 @@ dd {
.reseller-editor legend {
margin-bottom: 0.65rem;
font-weight: 680;
font-weight: var(--font-weight-semibold);
}
.reseller-editor input[type="checkbox"] {
@@ -910,7 +1058,6 @@ dd {
margin: 0;
padding: 0 0 0 1.1rem;
color: var(--invalid);
font-size: 0.87rem;
}
.editor [aria-invalid="true"] {
@@ -943,7 +1090,6 @@ dd {
.sign-in-card h1 {
margin-bottom: 1.25rem;
font-size: 2rem;
}
.authenticator-setup {
@@ -961,7 +1107,6 @@ dd {
.recovery-codes {
width: 100%;
margin-block: 0.75rem;
font-family: monospace;
}
@media (max-width: 780px) {
@@ -973,13 +1118,9 @@ dd {
position: static;
display: grid;
height: auto;
grid-template-columns: minmax(0, 1fr) auto auto;
gap: 0.65rem 0.3rem;
padding: 0.65rem 3.55rem 0.65rem 0.75rem;
}
.brand {
font-size: 1rem;
grid-template-columns: minmax(0, 1fr) auto;
gap: 0.65rem;
padding: 0.65rem 0.75rem;
}
.brand-mark {
@@ -1002,38 +1143,31 @@ dd {
}
.menu-toggle {
grid-column: 3;
grid-column: 2;
grid-row: 1;
align-self: center;
}
.sidebar-account {
grid-column: 2;
grid-row: 1;
max-width: 8.5rem;
justify-items: end;
grid-column: 1 / -1;
grid-row: 3;
margin: 0;
padding: 0 0.35rem;
border-top: 0;
text-align: right;
padding-top: 0.6rem;
}
.panel-role-options {
inset-block-start: calc(100% + 0.4rem);
inset-block-end: auto;
inset-inline-start: auto;
inset-inline-end: 0;
max-width: calc(100vw - 1.5rem);
}
}
@media (max-width: 375px) {
.sidebar {
grid-template-columns: minmax(0, 1fr) auto;
}
.menu-toggle {
grid-column: 2;
}
@media (min-width: 520px) and (max-width: 780px) {
.sidebar-account {
grid-column: 1 / -1;
grid-row: 3;
display: flex;
max-width: none;
justify-content: space-between;
grid-template-columns: minmax(0, 1fr) minmax(0, 14rem);
gap: 0.65rem;
}
}
@@ -1042,7 +1176,7 @@ dd {
flex-direction: column;
}
.toolbar input {
.toolbar input, .workspace-context input[type="search"] {
width: auto;
flex: 1 1 45%;
}
@@ -1164,7 +1298,7 @@ dd {
.account-navigation [aria-current] {
border-bottom: 2px solid var(--accent);
color: var(--ink);
font-weight: 700;
font-weight: var(--font-weight-bold);
}
.account-readiness {
@@ -1196,12 +1330,3 @@ dd {
.workspace-list li + li {
margin-top: 0.4rem;
}
.sidebar-account .appearance-control {
display: block;
margin: 0.35rem 0;
}
.sidebar-account .appearance-control[hidden] {
display: none;
}
+5 -2
View File
@@ -123,6 +123,7 @@ from .website_jobs import (
REDISPATCH_AFTER = timedelta(minutes=5)
ACCOUNT_BACKUP_LEASE = timedelta(seconds=BACKUP_TIMEOUT_SECONDS + 60)
ACCOUNT_RESTORE_LEASE = timedelta(seconds=RESTORE_TIMEOUT_SECONDS + 60)
OPERATOR_OPERATION_LEASE = timedelta(minutes=35)
ACCOUNT_BACKUP_QUEUE = "coulobre-account-backups"
UNCONFIRMED_RESTORE = (
"Could not confirm the restore on the local backup node. "
@@ -634,7 +635,9 @@ def apply_site_php_version(job):
raise ValueError("Activate the current website before changing PHP.")
versions = plan_php_versions(account)
if versions and job.requested_version not in versions:
raise ValueError("The hosting plan no longer allows this PHP series.")
raise ValueError(
"The hosting package no longer allows this PHP series."
)
site = WebSite(job.account_id, job.domain)
return {
"applied_version": update_local_php_version(
@@ -1338,7 +1341,7 @@ def run_operator_operation(job_id):
apply,
"The operator service did not report a result. "
"Check the service journal.",
lease=timedelta(minutes=35),
lease=OPERATOR_OPERATION_LEASE,
)
@@ -1,7 +1,6 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}Backup archives · Coulobre Panel{% endblock %}
{% block content %}
<a class="back-link" href="{{ account.get_absolute_url }}#backups-heading">← {{ account.name }}</a>
{% block page_header %}
<header class="page-heading">
<div>
<h1>Backup archives</h1>
@@ -13,6 +12,11 @@
</div>
{% endif %}
</header>
{% endblock %}
{% block page_context %}
<a class="quiet-link" href="{{ account.get_absolute_url }}#backups-heading">← {{ account.name }}</a>
{% endblock %}
{% block page_content %}
<section class="surface" aria-label="Backup archive history">
{% if manage_backup_retention %}
<header class="section-heading">
@@ -1,13 +1,17 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}Backup schedule · Coulobre Panel{% endblock %}
{% block content %}
<a class="back-link" href="{{ account.get_absolute_url }}">← {{ account.name }}</a>
{% block page_header %}
<header class="page-heading">
<div>
<h1>Backup schedule</h1>
<p class="heading-meta domain">{{ account.primary_domain }}</p>
</div>
</header>
{% endblock %}
{% block page_context %}
<a class="quiet-link" href="{{ account.get_absolute_url }}">← {{ account.name }}</a>
{% endblock %}
{% block page_content %}
<section class="surface editor-surface">
<form method="post" class="editor">
{% csrf_token %}
@@ -1,20 +1,31 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% load static %}
{% block title %}{{ account.name }} · Coulobre Panel{% endblock %}
{% block content %}
<a class="back-link" href="{% url 'panel:accounts' %}">← Hosting accounts</a>
<header class="page-heading">
<div>
<h1>{{ account.name }}</h1>
<div class="account-heading-meta">
<span class="domain">{{ account.primary_domain }}</span>
{% include "hosting/account_status.html" %}
</div>
</div>
</header>
{% block page_title %}{{ account.name }}{% endblock %}
{% block page_metadata %}
<div class="account-heading-meta">
<span class="domain">{{ account.primary_domain }}</span>
{% include "hosting/account_status.html" %}
</div>
{% endblock %}
{% block page_actions %}
<a class="quiet-link" href="{% url 'panel:accounts' %}">← Hosting accounts</a>
{% endblock %}
{% block page_tabs %}
<nav class="account-navigation" aria-label="On this account" data-account-tabs>
<a href="#overview" aria-current="location">Overview</a>
{% if show_website or independent_websites or add_independent_website %}<a href="#websites">Websites</a>{% endif %}
{% if is_tenant or perms.hosting.view_hostingdnszone %}<a href="#domains-dns">Domains and DNS</a>{% endif %}
{% if is_tenant or perms.hosting.view_hostingmailbox %}<a href="#email">Email</a>{% endif %}
{% if is_tenant or perms.hosting.view_hostingdatabase %}<a href="#databases">Databases</a>{% endif %}
{% if show_account_backups or export_backup_manifest %}<a href="#backups">Backups</a>{% endif %}
{% if can_change_hosting_services or service_change or can_retire_account or is_operator and perms.hosting.change_hostingaccount %}<a href="#account-management">Account management</a>{% endif %}
</nav>
{% endblock %}
{% block page_content %}
<dl class="details surface">
{% if is_tenant or perms.hosting.view_hostingplan %}
<div><dt>Hosting plan</dt><dd>{% if account.hosting_plan %}{{ account.hosting_plan.name }}{% else %}Unassigned{% endif %}
<div><dt>Hosting package</dt><dd>{% if account.hosting_plan %}{{ account.hosting_plan.name }}{% else %}Unassigned{% endif %}
{% if is_reseller %}<a class="record-link" href="{% url 'panel:manager_assign_plan' account.pk %}">Assign plan</a>{% endif %}</dd></div>
{% endif %}
{% if is_operator and perms.hosting.view_reseller %}
@@ -43,15 +54,6 @@
{% endif %}
<div><dt>Added</dt><dd>{{ account.created_at|date:"j M Y, H:i" }} UTC</dd></div>
</dl>
<nav class="account-navigation" aria-label="On this account" data-account-tabs>
<a href="#overview" aria-current="location">Overview</a>
{% if show_website or independent_websites or add_independent_website %}<a href="#websites">Websites</a>{% endif %}
{% if is_tenant or perms.hosting.view_hostingdnszone %}<a href="#domains-dns">Domains and DNS</a>{% endif %}
{% if is_tenant or perms.hosting.view_hostingmailbox %}<a href="#email">Email</a>{% endif %}
{% if is_tenant or perms.hosting.view_hostingdatabase %}<a href="#databases">Databases</a>{% endif %}
{% if show_account_backups or export_backup_manifest %}<a href="#backups">Backups</a>{% endif %}
{% if can_change_hosting_services or service_change or can_retire_account or is_operator and perms.hosting.change_hostingaccount %}<a href="#account-management">Account management</a>{% endif %}
</nav>
<section class="surface account-overview account-content" id="overview" data-account-section tabindex="-1" aria-label="Account overview">
{% if offer_account_setup %}
<div class="section-heading">
@@ -1,8 +1,10 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}{{ page_title }} · Coulobre Panel{% endblock %}
{% block content %}
<a class="back-link" href="{% if account %}{{ account.get_absolute_url }}{% else %}{% url 'panel:accounts' %}{% endif %}">← {% if account %}{{ account.name }}{% else %}Hosting accounts{% endif %}</a>
<header class="page-heading"><h1>{{ page_title }}</h1></header>
{% block page_title %}{{ page_title }}{% endblock %}
{% block page_context %}
<a class="quiet-link" href="{% if account %}{{ account.get_absolute_url }}{% else %}{% url 'panel:accounts' %}{% endif %}">← {% if account %}{{ account.name }}{% else %}Hosting accounts{% endif %}</a>
{% endblock %}
{% block page_content %}
<section class="surface editor-surface">
<form method="post" class="editor">
{% csrf_token %}
@@ -1,6 +1,6 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}{% if is_customer %}My hosting{% else %}Hosting accounts{% endif %} · Coulobre Panel{% endblock %}
{% block content %}
{% block page_header %}
<header class="page-heading">
<div>
<h1>{% if is_customer %}My hosting{% elif is_reseller %}Customer hosting{% else %}Hosting accounts{% endif %}</h1>
@@ -12,29 +12,28 @@
<a class="button primary" href="{% url 'panel:account_create' %}">Add hosting account</a>
{% endif %}
</header>
{% if health_summary %}
<section class="surface section-heading" aria-label="Server status">
<p>{% if not health_summary.configured %}Service checks need setup.{% elif health_summary.needs_attention %}{{ health_summary.needs_attention }} of {{ health_summary.configured }} service checks need attention.{% else %}All {{ health_summary.configured }} service checks are healthy.{% endif %}</p>
<a class="button secondary" href="{% url 'panel:service_health' %}">Service health</a>
</section>
{% elif is_reseller %}
{% endblock %}
{% block page_context %}
<div class="workspace-context form-actions account-toolbar">
<form class="form-actions" method="get" action="{% url 'panel:accounts' %}" role="search">
<label class="visually-hidden" for="account-search">Search by name or domain</label>
<input type="search" id="account-search" name="q" placeholder="Name or domain" value="{{ search }}">
<button class="button secondary" type="submit">Search</button>
{% if search %}<a class="quiet-link" href="{% url 'panel:accounts' %}">Clear</a>{% endif %}
</form>
{% if is_operator and perms.hosting.retire_hosting_account %}
<a class="quiet-link" href="{% url 'panel:retirements' %}">Retired accounts</a>
{% endif %}
</div>
{% endblock %}
{% block page_content %}
{% if is_reseller %}
<section class="surface section-heading" aria-label="Customer access">
<p>Manage the logins for your assigned customers.</p>
<a class="button secondary" href="{% url 'panel:customers' %}">My customers</a>
</section>
{% endif %}
<section class="surface" aria-label="Hosting account list">
<div class="toolbar account-toolbar">
<form class="form-actions" method="get" action="{% url 'panel:accounts' %}" role="search">
<label class="visually-hidden" for="account-search">Search by name or domain</label>
<input type="search" id="account-search" name="q" placeholder="Name or domain" value="{{ search }}">
<button class="button secondary" type="submit">Search</button>
{% if search %}<a class="quiet-link" href="{% url 'panel:accounts' %}">Clear</a>{% endif %}
</form>
{% if is_operator and perms.hosting.retire_hosting_account %}
<a class="quiet-link" href="{% url 'panel:retirements' %}">Retired accounts</a>
{% endif %}
</div>
{% if accounts %}
<div class="table-scroll">
<table>
@@ -43,7 +42,7 @@
<th scope="col">Account</th>
<th scope="col">Status</th>
{% if is_operator and perms.hosting.view_customer %}<th scope="col">Customer</th>{% endif %}
{% if is_tenant or perms.hosting.view_hostingplan %}<th scope="col">Hosting plan</th>{% endif %}
{% if is_tenant or perms.hosting.view_hostingplan %}<th scope="col">Hosting package</th>{% endif %}
<th scope="col" class="cell-date">Added</th>
</tr>
</thead>
@@ -1,13 +1,17 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}Account retirement · Coulobre Panel{% endblock %}
{% block content %}
<a class="back-link" href="{% if retirement %}{% url 'panel:retirements' %}{% else %}{{ account.get_absolute_url }}{% endif %}">← {% if retirement %}Retired accounts{% else %}{{ account.name }}{% endif %}</a>
{% block page_header %}
<header class="page-heading">
<div>
<h1>{% if retirement %}Account retirement{% else %}Retire hosting account{% endif %}</h1>
<p class="heading-meta">{{ account.name }} · {{ inventory.site.domain }}</p>
</div>
</header>
{% endblock %}
{% block page_context %}
<a class="quiet-link" href="{% if retirement %}{% url 'panel:retirements' %}{% else %}{{ account.get_absolute_url }}{% endif %}">← {% if retirement %}Retired accounts{% else %}{{ account.name }}{% endif %}</a>
{% endblock %}
{% block page_content %}
<section class="surface" aria-labelledby="retirement-inventory-heading">
<header class="section-heading"><h2 id="retirement-inventory-heading">Managed resources</h2></header>
<dl class="details">
@@ -1,8 +1,7 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}My account · Coulobre Panel{% endblock %}
{% block content %}
<header class="page-heading"><h1>My account</h1></header>
{% for message in messages %}<p class="notice" role="status">{{ message }}</p>{% endfor %}
{% block page_title %}My account{% endblock %}
{% block page_content %}
<section class="surface" aria-labelledby="account-sign-in">
<header class="section-heading"><h2 id="account-sign-in">Sign-in and security</h2></header>
<dl class="section-text">
@@ -1,9 +1,10 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}{{ heading }} · Coulobre Panel{% endblock %}
{% block content %}
<a class="back-link" href="{% url 'panel:account_security' %}">← My account</a>
<header class="page-heading"><h1>{{ heading }}</h1></header>
{% for message in messages %}<p class="notice" role="status">{{ message }}</p>{% endfor %}
{% block page_title %}{{ heading }}{% endblock %}
{% block page_context %}
<a class="quiet-link" href="{% url 'panel:account_security' %}">← My account</a>
{% endblock %}
{% block page_content %}
<section class="surface editor-surface">
{% if instructions %}<p>{{ instructions }}</p>{% endif %}
{% include "hosting/authenticator_setup.html" %}
@@ -1,8 +1,12 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}Complete hosting setup · Coulobre Panel{% endblock %}
{% block content %}
<a class="back-link" href="{{ account.get_absolute_url }}">← {{ account.name }}</a>
{% block page_header %}
<header class="page-heading"><div><h1>Complete hosting setup</h1><p class="domain">{{ account.primary_domain }}</p></div></header>
{% endblock %}
{% block page_context %}
<a class="quiet-link" href="{{ account.get_absolute_url }}">← {{ account.name }}</a>
{% endblock %}
{% block page_content %}
<section class="surface editor-surface">
<form method="post" class="editor">
{% csrf_token %}
@@ -1,19 +1,46 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}All users · Coulobre Panel{% endblock %}
{% block content %}
<header class="page-heading"><h1>All users</h1></header>
{% block page_title %}All users{% endblock %}
{% block page_actions %}
{% if perms.hosting.add_customer %}
<a class="button primary" href="{% url 'panel:customer_create' %}">Add user</a>
{% endif %}
{% endblock %}
{% block page_context %}
<form method="get" class="workspace-context form-actions" role="search">
<label class="visually-hidden" for="username-search">Search by username</label>
<input type="search" id="username-search" name="q" placeholder="Username" value="{{ request.GET.q }}">
<button class="button secondary" type="submit">Search</button>
{% if request.GET.q %}<a class="quiet-link" href="{% url 'panel:all_users' %}">Clear</a>{% endif %}
</form>
{% endblock %}
{% block page_content %}
<section class="surface">
<form method="get" class="toolbar">
<label for="username-search">Username</label><input type="search" id="username-search" name="q" value="{{ request.GET.q }}">
<button class="button secondary" type="submit">Search</button>
</form>
<div class="table-scroll">
<table>
<thead><tr><th scope="col">User</th><th scope="col">Workspace</th><th scope="col">Manager</th><th scope="col">Hosting accounts</th><th scope="col">Disk</th><th scope="col">Monthly traffic</th><th scope="col">Domains</th><th scope="col">Databases</th><th scope="col">Mailboxes</th><th scope="col">Added</th></tr></thead>
<thead><tr><th scope="col">User</th><th scope="col">Workspace</th><th scope="col">Manager</th><th scope="col">Hosting accounts</th><th scope="col">Disk</th><th scope="col">Monthly traffic</th><th scope="col">Domains</th><th scope="col">Databases</th><th scope="col">Mailboxes</th><th scope="col">Added</th>{% if may_manage_invitations %}<th scope="col">Actions</th>{% endif %}</tr></thead>
<tbody>
{% for login, usage in login_rows %}
<tr><th scope="row">{{ login.get_username }}</th><td>{% if login.is_superuser %}Operator{% elif login.hosting_reseller %}Manager{% else %}Customer{% endif %}</td><td>{{ login.hosting_customer.reseller|default:"Unassigned" }}</td><td>{{ login.account_count }}</td>{% include "hosting/account_metrics_cells.html" %}<td>{{ login.date_joined|date:"j M Y" }}</td></tr>
{% empty %}<tr><td colspan="10">No logins found.</td></tr>{% endfor %}
<tr>
<th scope="row">{{ login.get_username }}</th>
<td>{% if login.is_superuser %}Operator{% elif login.hosting_reseller %}Manager{% else %}Customer{% endif %}</td>
<td>{{ login.hosting_customer.reseller|default:"Unassigned" }}</td>
<td>{{ login.account_count }}</td>
{% include "hosting/account_metrics_cells.html" %}
<td>{{ login.date_joined|date:"j M Y" }}</td>
{% if may_manage_invitations %}
<td>
{% if not login.is_staff and not login.is_superuser %}
{% if login.hosting_reseller and perms.hosting.change_reseller %}
<a href="{% url 'panel:manage_invitation' 'manager' login.hosting_reseller.pk %}" aria-label="Contact and invitation for {{ login.get_username }}">Contact and invitation</a>
{% elif not login.hosting_reseller and login.hosting_customer and perms.hosting.change_customer %}
<a href="{% url 'panel:manage_invitation' 'customer' login.hosting_customer.pk %}" aria-label="Contact and invitation for {{ login.get_username }}">Contact and invitation</a>
{% endif %}
{% endif %}
</td>
{% endif %}
</tr>
{% empty %}<tr><td colspan="{% if may_manage_invitations %}11{% else %}10{% endif %}">No logins found.</td></tr>{% endfor %}
</tbody>
</table>
</div>
@@ -1,7 +1,7 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}Assign panel role · Coulobre Panel{% endblock %}
{% block content %}
<header class="page-heading"><h1>Assign a role to an existing login</h1></header>
{% block page_title %}Assign a role to an existing login{% endblock %}
{% block page_content %}
<div class="surface editor-surface">
<form class="editor" method="post">
{% csrf_token %}
@@ -1,13 +1,17 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}{{ title }} · Coulobre Panel{% endblock %}
{% block content %}
<a class="back-link" href="{{ back_url }}">← Backup archives</a>
{% block page_header %}
<header class="page-heading">
<div>
<h1>{{ title }}</h1>
<p class="heading-meta">{{ account.primary_domain }}{% if archive %} · Backup requested {{ archive.requested_at|date:"j M Y, H:i" }} UTC{% endif %}</p>
</div>
</header>
{% endblock %}
{% block page_context %}
<a class="quiet-link" href="{{ back_url }}">← Backup archives</a>
{% endblock %}
{% block page_content %}
<section class="surface editor-surface">
<form method="post" class="editor">
{% csrf_token %}
@@ -0,0 +1,8 @@
{% extends "hosting/workspace_page.html" %}
{% block page_title %}Backup &amp; Restore{% endblock %}
{% block page_tabs %}
<nav class="account-navigation" aria-label="Backup workflows">
<a href="{% url 'panel:operator_backups' %}"{% if request.resolver_match.url_name == 'operator_backups' %} aria-current="page"{% endif %}>Hosting accounts</a>
<a href="{% url 'panel:system_backup' %}"{% if request.resolver_match.url_name == 'system_backup' %} aria-current="page"{% endif %}>System Backup</a>
</nav>
{% endblock %}
@@ -1,15 +1,15 @@
{% load static %}<!doctype html>
{% load static panel_assets %}<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}Coulobre Panel{% endblock %}</title>
<link rel="icon" type="image/svg+xml" href="{% static 'hosting/coulobre-mark.svg' %}">
<link rel="stylesheet" href="{% static 'hosting/panel.css' %}">
<link rel="stylesheet" href="{% panel_asset 'hosting/panel.css' %}">
{% if custom_panel_theme %}<link rel="stylesheet" href="{% url 'panel:theme_stylesheet' %}">{% endif %}
{% if has_user_theme %}<link rel="stylesheet" href="{% url 'panel:user_stylesheet' %}">{% endif %}
{% block extra_styles %}{% endblock %}
<script src="{% static 'hosting/panel-appearance.js' %}"></script>
<script src="{% panel_asset 'hosting/panel-appearance.js' %}"></script>
</head>
<body>
{% if request.user.is_authenticated and not auth_screen %}
@@ -27,44 +27,54 @@
{% include "hosting/workspace_navigation.html" %}
</nav>
<div class="sidebar-account">
{% if request.impersonation %}
<span class="operator">{{ request.user.get_username }}</span>
{% else %}
{% if request.panel_role_options|length > 1 %}
<form method="post" class="panel-role-switch" action="{% url 'panel:switch_panel_role' %}">
{% csrf_token %}
<label for="panel-role">Panel role</label>
<select name="role" id="panel-role">
{% for value, label in request.panel_role_options %}
<option value="{{ value }}"{% if request.active_panel_role == value %} selected{% endif %}>{{ label }}</option>
{% endfor %}
</select>
<button type="submit">Switch role</button>
</form>
{% panel_asset 'hosting/panel-icons.svg' as panel_icons %}
<div class="sidebar-account-controls">
{% if request.impersonation %}
<span class="sidebar-identity">
<span class="sidebar-avatar" aria-hidden="true">{{ request.user.get_username|first|upper }}</span>
<span class="sidebar-account-name">{{ request.user.get_username }}</span>
</span>
{% else %}
<a class="sidebar-identity" href="{% url 'panel:account_security' %}" aria-label="My account for {{ request.user.get_username }}" title="My account">
<span class="sidebar-avatar" aria-hidden="true">{{ request.user.get_username|first|upper }}</span>
<span class="sidebar-account-name">{{ request.user.get_username }}</span>
</a>
<button class="sidebar-action appearance-control" type="button" aria-label="Change appearance" data-theme-toggle hidden>
<span aria-hidden="true" data-theme-icon>☾</span>
</button>
{% endif %}
<button class="appearance-control" type="button" data-theme-toggle hidden>
<span aria-hidden="true" data-theme-icon>☾</span> <span>Appearance</span>
</button>
<a class="operator" href="{% url 'panel:account_security' %}" aria-label="My account for {{ request.user.get_username }}">{{ request.user.get_username }}</a>
<form class="sidebar-sign-out" method="post" action="{% url 'panel:logout' %}">
{% csrf_token %}
<button class="sidebar-action sidebar-icon-action" type="submit" aria-label="Sign out" title="Sign out">
<svg aria-hidden="true" focusable="false"><use href="{{ panel_icons }}#sign-out"></use></svg>
</button>
</form>
</div>
{% if not request.impersonation and request.panel_role_options|length > 1 %}
<details class="panel-role-switch" data-role-switch>
<summary aria-label="Switch role from {{ request.panel_role_label }}">
<svg class="nav-icon" aria-hidden="true" focusable="false"><use href="{{ panel_icons }}#{{ request.panel_role_icon }}"></use></svg>
{{ request.panel_role_label }}
</summary>
<form method="post" class="panel-role-options" action="{% url 'panel:switch_panel_role' %}">
{% csrf_token %}
{% for value, label, icon, description in request.panel_role_options %}
<button class="panel-role-option" type="submit" name="role" value="{{ value }}"{% if request.active_panel_role == value %} aria-current="true" disabled{% endif %}>
<svg class="nav-icon" aria-hidden="true" focusable="false"><use href="{{ panel_icons }}#{{ icon }}"></use></svg>
<span>
<strong>{{ label }}</strong>
<small>{{ description }}</small>
</span>
{% if request.active_panel_role == value %}<span class="panel-role-current">Current</span>{% endif %}
</button>
{% endfor %}
</form>
</details>
{% endif %}
<form method="post" action="{% url 'panel:logout' %}">
{% csrf_token %}
<button type="submit">Sign out</button>
</form>
</div>
</aside>
<main class="main" id="main-content" tabindex="-1">
{% if workspace_accounts %}
<form class="workspace-context form-actions" method="get" action="{% url 'panel:customer_workspace' 'overview' %}">
<label for="workspace-account">Hosting account</label>
<select id="workspace-account" name="account">
{% for account in workspace_accounts %}
<option value="{{ account.pk }}"{% if account.pk == workspace_selected %} selected{% endif %}>{{ account.primary_domain }}</option>
{% endfor %}
</select>
<button class="button secondary" type="submit">Open</button>
</form>
{% endif %}
{% block account_selector %}{% include "hosting/workspace_account_selector.html" %}{% endblock %}
{% if request.impersonation %}
<section class="notice customer-preview" aria-label="Customer view">
<div>
@@ -85,7 +95,8 @@
{% block content %}{% endblock %}
</main>
</div>
<script src="{% static 'hosting/panel-navigation.js' %}" defer></script>
<script src="{% panel_asset 'hosting/panel-navigation.js' %}" defer></script>
{% block extra_scripts %}{% endblock %}
{% else %}
{% block public_content %}{% endblock %}
<button class="theme-toggle button secondary" type="button" data-theme-toggle hidden>
@@ -0,0 +1,33 @@
{% extends "hosting/update_workspace.html" %}
{% load release_notes %}
{% block title %}Changelog · Coulobre Panel{% endblock %}
{% block page_content %}
<section class="surface" aria-labelledby="release-history">
<header class="section-heading">
<h2 id="release-history">Release history</h2>
<a class="button secondary" href="{{ releases_url }}">All releases on Gitea</a>
</header>
{% if catalog_unavailable %}
<p class="empty">The release history is temporarily unavailable. Try again later or open Gitea.</p>
{% else %}
{% for entry in entries %}
<details class="section-text update-release"{% if forloop.first %} open{% endif %}>
<summary>
{{ entry.version }}{% if entry.prerelease %} · Prerelease{% endif %}
{% if entry.published_at %} · <time datetime="{{ entry.published_at|date:'c' }}">{{ entry.published_at|date:"j M Y" }}</time>{% endif %}
</summary>
{% if entry.notes %}
<div class="release-notes">{{ entry.notes|release_notes_html }}</div>
{% else %}
<p class="muted">No release notes were published.</p>
{% endif %}
<p><a href="{{ entry.url }}">View {{ entry.version }} on Gitea</a></p>
</details>
{% empty %}
<p class="empty">No Coulobre releases have been published yet.</p>
{% endfor %}
{% endif %}
</section>
{% endblock %}
@@ -1,13 +1,17 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}Restore {{ restore_kind }} · Coulobre Panel{% endblock %}
{% block content %}
<a class="back-link" href="{{ account.get_absolute_url }}#backups-heading">← {{ account.name }}</a>
{% block page_header %}
<header class="page-heading">
<div>
<h1>Restore {{ restore_kind }}</h1>
<p class="heading-meta">{{ account.primary_domain }} · Backup requested {{ backup.requested_at|date:"j M Y, H:i" }} UTC</p>
</div>
</header>
{% endblock %}
{% block page_context %}
<a class="quiet-link" href="{{ account.get_absolute_url }}#backups-heading">← {{ account.name }}</a>
{% endblock %}
{% block page_content %}
<section class="surface editor-surface">
{% if restore_kind == "database" %}
<p>Choose an empty managed database. Keep the application disconnected until the restore completes.</p>
@@ -1,7 +1,11 @@
{% extends "hosting/base.html" %}
{% block title %}Connected nodes · Coulobre Panel{% endblock %}
{% block content %}
<header class="page-heading"><h1>Connected nodes</h1><a class="button secondary" href="{% url 'panel:service_health' %}">Service health</a></header>
{% extends "hosting/workspace_page.html" %}
{% block title %}Connected Nodes · Coulobre Panel{% endblock %}
{% block page_title %}Connected Nodes{% endblock %}
{% block page_actions %}
{% if deploy_enabled %}<a class="button primary" href="{% url 'panel:remote_deploy' %}">Install a remote server</a>{% endif %}
<a class="button secondary" href="{% url 'panel:service_health' %}">Service health</a>
{% endblock %}
{% block page_content %}
{% if topology.problem %}<p class="notice">{{ topology.problem }}</p>{% endif %}
<section class="surface" aria-label="Mail and DNS receivers">
<div class="table-scroll"><table>
@@ -1,22 +1,15 @@
{% extends "hosting/base.html" %}
{% block title %}Backup &amp; Restore · Coulobre Panel <section class="surface" aria-labelledby="restore-history">
<header class="section-heading"><h2 id="restore-history">Recent restores</h2></header>
<ul class="workspace-list">
{% for restore in restores %}<li>{{ restore.requested_at|date:"j M Y H:i" }} · {{ restore.kind|default:"Website"|capfirst }} · {{ restore.state|capfirst }}</li>
{% empty %}<li>No restores yet.</li>{% endfor %}
</ul>
</section>
{% endblock %}
{% block content %}
<header class="page-heading"><div><h1>Backup &amp; Restore</h1><p>{{ account.primary_domain }}</p></div></header>
{% for message in messages %}<p class="notice" role="status">{{ message }}</p>{% endfor %}
{% extends "hosting/workspace_page.html" %}
{% block title %}Backup &amp; Restore · Coulobre Panel{% endblock %}
{% block page_title %}Backup &amp; Restore{% endblock %}
{% block page_metadata %}<p class="heading-meta">{{ account.primary_domain }}</p>{% endblock %}
{% block page_content %}
{% if may_create %}
<section class="surface editor-surface" aria-labelledby="backup-create">
<h2 id="backup-create">Create a backup</h2><p>Download the latest completed customer backup over SFTP at <code>/backups/latest.zip</code>.</p>
<form class="editor" method="post">{% csrf_token %}{{ form.as_div }}<button class="button primary" type="submit">Create backup</button></form>
</section>
{% else %}<p class="notice">Customer backups require an active website, SFTP and the local backup service.</p>{% endif %}
<section class="surface" aria-labelledby="backup-history">
<section class="surface" aria-labelledby="backup-history" data-live-status="customer-backups">
<header class="section-heading"><h2 id="backup-history">Recent backups</h2></header>
<ul class="workspace-list">
{% for backup, kinds in backups %}<li>{{ backup.requested_at|date:"j M Y H:i" }} · {{ backup.state|capfirst }}
@@ -25,7 +18,7 @@
{% empty %}<li>No backups yet.</li>{% endfor %}
</ul>
</section>
<section class="surface" aria-labelledby="restore-history">
<section class="surface" aria-labelledby="restore-history" data-live-status="customer-restores">
<header class="section-heading"><h2 id="restore-history">Recent restores</h2></header>
<ul class="workspace-list">
{% for restore in restores %}<li>{{ restore.requested_at|date:"j M Y H:i" }} · {{ restore.kind|default:"Website"|capfirst }} · {{ restore.state|capfirst }}</li>
@@ -1,21 +1,23 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}SSL Certificates · Coulobre Panel{% endblock %}
{% block content %}
<header class="page-heading"><div><h1>SSL Certificates</h1><p class="heading-meta">{{ account.primary_domain }}</p></div></header>
{% block page_title %}SSL Certificates{% endblock %}
{% block page_metadata %}<p class="heading-meta">{{ account.primary_domain }}</p>{% endblock %}
{% block page_tabs %}
{% if sites %}
<section class="surface">
<form method="get" class="toolbar form-actions">
<label for="certificate-domain">Website</label>
<select id="certificate-domain" name="domain">{% for choice in sites %}<option value="{{ choice }}"{% if choice == domain %} selected{% endif %}>{{ choice }}</option>{% endfor %}</select>
<input type="hidden" name="tab" value="{{ tab }}">
<button type="submit" class="button secondary">Select website</button>
</form>
</section>
<nav class="account-navigation" aria-label="Certificates">
<a href="?domain={{ domain }}&amp;tab=manage"{% if tab == 'manage' %} aria-current="page"{% endif %}>Manage certificates</a>
<a href="?domain={{ domain }}&amp;tab=acme"{% if tab == 'acme' %} aria-current="page"{% endif %}>ACME settings</a>
<a href="?domain={{ domain }}&amp;tab=history"{% if tab == 'history' %} aria-current="page"{% endif %}>Provisioning history</a>
</nav>
{% endif %}
{% endblock %}
{% block page_context %}
{% if sites %}
{% include "hosting/workspace_domain_selector.html" with field_id="certificate-domain" label="Website" button_label="Select website" domains=sites domain=domain active_tab=tab only %}
{% endif %}
{% endblock %}
{% block page_content %}
{% if sites %}
{% if problem %}<p class="notice" role="alert">{{ problem }}</p>{% endif %}
{% if tab == 'manage' %}
<section class="surface editor-surface">
@@ -1,10 +1,12 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}Databases · Coulobre Panel{% endblock %}
{% block content %}
{% block page_header %}
<header class="page-heading">
<div><h1>Databases</h1><p class="heading-meta">{{ account.primary_domain }}</p></div>
<a class="button primary" href="{% url 'panel:database_create' account.pk %}">Add database</a>
</header>
{% endblock %}
{% block page_content %}
<section class="surface"><div class="table-scroll"><table>
<thead><tr><th scope="col">Database</th><th scope="col">State</th><th scope="col">Primary login</th><th scope="col">Additional logins</th></tr></thead>
<tbody>{% for db in databases %}
@@ -1,12 +1,14 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}{{ title|default:"Add customer" }} · Coulobre Panel{% endblock %}
{% block content %}
{% block page_title %}{{ title|default:"Add customer" }}{% endblock %}
{% block page_context %}
{% if account %}
<a class="back-link" href="{{ account.get_absolute_url }}">← {{ account.name }}</a>
<a class="quiet-link" href="{{ account.get_absolute_url }}">← {{ account.name }}</a>
{% else %}
<a class="back-link" href="{% url 'panel:customers' %}">← Customers</a>
<a class="quiet-link" href="{% url 'panel:customers' %}">← Customers</a>
{% endif %}
<header class="page-heading"><h1>{{ title|default:"Add customer" }}</h1></header>
{% endblock %}
{% block page_content %}
<section class="surface editor-surface">
<form method="post" class="editor">
{% csrf_token %}
@@ -1,6 +1,6 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}{% if is_reseller %}My users{% else %}Customers{% endif %} · Coulobre Panel{% endblock %}
{% block content %}
{% block page_header %}
<header class="page-heading">
<div>
<h1>{% if is_reseller %}My users{% else %}Customers{% endif %}</h1>
@@ -11,17 +11,21 @@
{% if request.user.is_superuser and request.user.is_verified %}
<a class="button secondary" href="{% url 'panel:assign_panel_role' %}?role=customer">Assign to existing login</a>
{% endif %}
<a class="button primary" href="{% url 'panel:customer_create' %}">Add customer login</a>
<a class="button primary" href="{% url 'panel:customer_create' %}">Add user</a>
</div>
{% endif %}
</header>
{% endblock %}
{% block page_context %}
<form class="workspace-context form-actions" method="get" action="{% url 'panel:customers' %}" role="search">
<label class="visually-hidden" for="customer-search">Search customers by username</label>
<input type="search" id="customer-search" name="q" placeholder="Username" value="{{ search }}">
<button class="button secondary" type="submit">Search</button>
{% if search %}<a class="quiet-link" href="{% url 'panel:customers' %}">Clear</a>{% endif %}
</form>
{% endblock %}
{% block page_content %}
<section class="surface" aria-label="Customer list">
<form class="toolbar" method="get" action="{% url 'panel:customers' %}" role="search">
<label class="visually-hidden" for="customer-search">Search customers by username</label>
<input type="search" id="customer-search" name="q" placeholder="Username" value="{{ search }}">
<button class="button secondary" type="submit">Search</button>
{% if search %}<a class="quiet-link" href="{% url 'panel:customers' %}">Clear</a>{% endif %}
</form>
{% if customers %}
<div class="table-scroll">
<table>
@@ -1,6 +1,6 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}Customer view · Coulobre Panel{% endblock %}
{% block content %}
{% block page_header %}
<header class="page-heading">
<div>
{% if request.impersonation %}
@@ -12,6 +12,8 @@
{% endif %}
</div>
</header>
{% endblock %}
{% block page_content %}
{% if not request.impersonation and perms.hosting.view_customer %}
<a class="button secondary" href="{% url 'panel:customers' %}">Back to customers</a>
{% else %}
@@ -1,20 +1,22 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}Redirects · Coulobre Panel{% endblock %}
{% block content %}
<header class="page-heading"><div><h1>Redirects</h1><p class="heading-meta">{{ account.primary_domain }}</p></div></header>
{% block page_title %}Redirects{% endblock %}
{% block page_metadata %}<p class="heading-meta">{{ account.primary_domain }}</p>{% endblock %}
{% block page_tabs %}
{% if sites %}
<section class="surface">
<form method="get" class="toolbar form-actions">
<label for="redirect-domain">Website or alias</label>
<select id="redirect-domain" name="domain">{% for candidate in sites %}<option value="{{ candidate }}"{% if candidate == domain %} selected{% endif %}>{{ candidate }}</option>{% endfor %}</select>
<input type="hidden" name="tab" value="{{ kind }}">
<button type="submit" class="button secondary">Select hostname</button>
</form>
</section>
<nav class="account-navigation" aria-label="Redirects">
<a href="?tab=domain&amp;domain={{ domain }}"{% if kind == 'domain' %} aria-current="page"{% endif %}>Domain redirects</a>
<a href="?tab=site&amp;domain={{ domain }}"{% if kind == 'site' %} aria-current="page"{% endif %}>Site redirects</a>
</nav>
{% endif %}
{% endblock %}
{% block page_context %}
{% if sites %}
{% include "hosting/workspace_domain_selector.html" with field_id="redirect-domain" label="Website or alias" button_label="Select hostname" domains=sites domain=domain active_tab=kind only %}
{% endif %}
{% endblock %}
{% block page_content %}
{% if sites %}
{% if job and not job.finished_at %}<p class="notice">{{ job.state|capfirst }} · <a href="?tab={{ kind }}&amp;domain={{ domain }}">Refresh status</a></p>{% endif %}
{% if problem %}<p class="notice" role="alert">{{ problem }}</p>{% endif %}
{% if job.problem %}<p class="notice" role="alert">{{ job.problem }}</p>{% endif %}
@@ -1,8 +1,12 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}Restore {{ kind }} · Coulobre Panel{% endblock %}
{% block content %}
<a class="back-link" href="{% url 'panel:customer_backups' account.pk %}">← Backup &amp; Restore</a>
{% block page_header %}
<header class="page-heading"><div><h1>Restore {{ kind }}</h1><p>{{ account.primary_domain }} · Backup from {{ backup.requested_at|date:"j M Y H:i" }} UTC</p></div></header>
{% endblock %}
{% block page_context %}
<a class="quiet-link" href="{% url 'panel:customer_backups' account.pk %}">← Backup &amp; Restore</a>
{% endblock %}
{% block page_content %}
<section class="surface editor-surface">
{% if kind == 'website' %}<p>An entire website needs an empty document root. A single file needs an existing parent directory.</p>
{% elif kind == 'database' %}<p>Choose an empty database and keep its applications disconnected during the restore.</p>
@@ -1,8 +1,10 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}{% if auto_provision %}Add{% else %}Request{% endif %} MariaDB database · Coulobre Panel{% endblock %}
{% block content %}
<a class="back-link" href="{{ account.get_absolute_url }}">← {{ account.name }}</a>
<header class="page-heading"><h1>{% if auto_provision %}Add{% else %}Request{% endif %} MariaDB database</h1></header>
{% block page_title %}{% if auto_provision %}Add{% else %}Request{% endif %} MariaDB database{% endblock %}
{% block page_context %}
<a class="quiet-link" href="{{ account.get_absolute_url }}">← {{ account.name }}</a>
{% endblock %}
{% block page_content %}
<section class="surface editor-surface">
<form method="post" class="editor">
{% include "hosting/customer_action_fields.html" %}
@@ -1,18 +1,11 @@
{% extends "hosting/base.html" %}
{% block title %}Database logins · Coulobre Panel <section class="surface editor-surface">
<h2>SQL export</h2>
{% if export_job %}<p>{{ export_job.state|capfirst }} · {{ export_job.requested_at|date:"j M Y H:i" }} UTC</p>{% endif %}
{% if export_job.state == 'configured' %}<p>Download over SFTP at <code>/backups/database-{{ database.suffix }}.sql.gz</code>.</p>{% endif %}
{% if export_job.problem %}<p>{{ export_job.problem }}</p>{% endif %}
{% if can_export %}<form method="post" action="{% url 'panel:database_export' database.pk %}">{% csrf_token %}
<button type="submit" class="button secondary"{% if export_job and not export_job.finished_at %} disabled{% endif %}>Export SQL</button>
</form>{% else %}<p>SQL exports require the account's SFTP and backup services.</p>{% endif %}
</section>
{% extends "hosting/workspace_page.html" %}
{% block title %}Database logins · Coulobre Panel{% endblock %}
{% block page_title %}Database logins{% endblock %}
{% block page_metadata %}<p class="heading-meta">{{ database.spec.name }}</p>{% endblock %}
{% block page_context %}
<a class="quiet-link" href="{% url 'panel:customer_databases' database.account_id %}">← Databases</a>
{% endblock %}
{% block content %}
<a class="back-link" href="{% url 'panel:customer_databases' database.account_id %}">← Databases</a>
<header class="page-heading"><div><h1>Database logins</h1><p class="heading-meta">{{ database.spec.name }}</p></div></header>
{% for message in messages %}<p class="notice" role="status">{{ message }}</p>{% endfor %}
{% block page_content %}
{% if problem %}<p class="notice" role="alert">{{ problem }}</p>{% endif %}
<section class="surface"><div class="table-scroll"><table>
<thead><tr><th scope="col">Login</th><th scope="col">Access</th><th scope="col">State</th><th scope="col">Actions</th></tr></thead>
@@ -31,7 +24,7 @@
<h2>Add database login</h2>
<form method="post" class="editor">{% csrf_token %}{{ form.as_div }}<button class="button primary" name="action" value="add" type="submit">Add login</button></form>
</section>
<section class="surface editor-surface">
<section class="surface editor-surface" data-live-status="sql-export">
<h2>SQL export</h2>
{% if export_job %}<p>{{ export_job.state|capfirst }} · {{ export_job.requested_at|date:"j M Y H:i" }} UTC</p>{% endif %}
{% if export_job.state == 'configured' %}<p>Download over SFTP at <code>/backups/database-{{ database.suffix }}.sql.gz</code>.</p>{% endif %}
@@ -0,0 +1,26 @@
{% extends "hosting/workspace_page.html" %}
{% block title %}Database monitor · Coulobre Panel{% endblock %}
{% block page_title %}Database monitor{% endblock %}
{% block page_actions %}
<a class="button secondary" href="{% url 'panel:database_monitor' %}">Refresh status</a>
{% endblock %}
{% block page_content %}
<section class="surface" aria-labelledby="database-status" data-live-status="database">
<header class="section-heading">
<h2 id="database-status">MariaDB status</h2>
{% if report %}<time class="muted" datetime="{{ observed_at|date:'c' }}">{{ observed_at|date:"j M Y, H:i:s" }} UTC</time>{% endif %}
</header>
{% if report %}
<dl class="details">
<div><dt>Status</dt><dd><span class="status ready">Active</span></dd></div>
<div><dt>Version</dt><dd>{{ report.database_version }}</dd></div>
<div><dt>Current connections</dt><dd>{{ report.counters.Threads_connected|default:"Unavailable" }}</dd></div>
<div><dt>Slow queries</dt><dd>{{ report.counters.Slow_queries|default:"Unavailable" }}</dd></div>
<div><dt>Uptime (seconds)</dt><dd>{{ report.counters.Uptime|default:"Unavailable" }}</dd></div>
<div><dt>Slow query logging</dt><dd>{{ report.slow_logging|yesno:"Enabled,Disabled" }}</dd></div>
</dl>
{% else %}
<p class="empty">MariaDB measurements are unavailable on this installation.</p>
{% endif %}
</section>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}DirectAdmin import · Coulobre Panel{% endblock %}
{% block content %}
<header class="page-heading"><h1>DirectAdmin import</h1></header>
{% block page_title %}DirectAdmin import{% endblock %}
{% block page_content %}
<section class="surface editor-surface">
<p>Use a DirectAdmin account archive. Inspect it and review the planned account, website, database, mail and DNS changes before importing.</p>
<a class="button secondary" href="https://code.hosting.hippogrief.nl/hippogrief/coulobre/src/branch/main/docs/development.md#inspect-a-directadmin-backup">Open the import guide</a>
@@ -1,15 +1,7 @@
{% extends "hosting/base.html" %}
{% block title %}DNS zone template · Coulobre Panel{% endblock %}
{% block content %}
<nav class="account-navigation" aria-label="DNS settings">
<a href="{% url 'panel:dns_defaults' %}" aria-current="page">Zone template</a>
<a href="{% url 'panel:dns_topology' %}">Local and remote</a>
</nav>
<header class="page-heading">
<div><h1>DNS zone template</h1><p class="heading-meta">These settings apply when you create a managed DNS zone.</p></div>
</header>
{% for message in messages %}<p class="notice" role="status">{{ message }}</p>{% endfor %}
{% extends "hosting/dns_settings_page.html" %}
{% block page_content %}
<section class="surface editor-surface">
<p>These settings apply when you create a managed DNS zone.</p>
<form method="post" class="editor">
{% csrf_token %}
{{ form.as_div }}
@@ -1,23 +1,26 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}DNS replication · {{ zone.domain }}{% endblock %}
{% block content %}
{% block page_title %}DNS replication{% endblock %}
{% block page_metadata %}<p class="heading-meta">{{ zone.domain }}</p>{% endblock %}
{% block page_context %}
<a class="quiet-link" href="{{ zone.account.get_absolute_url }}">← {{ zone.account.name }}</a>
{% endblock %}
{% block page_content %}
<section class="surface">
<h1>DNS replication for {{ zone.domain }}</h1>
<p><a href="{{ zone.account.get_absolute_url }}">Back to hosting account</a></p>
{% if synchronized %}
<p>Both nameservers publish the same SOA serial.</p>
<p class="section-text">Both nameservers publish the same SOA serial.</p>
{% elif unreachable %}
<p>One or both nameservers did not return an authoritative SOA record.</p>
<p class="section-text">One or both nameservers did not return an authoritative SOA record.</p>
{% else %}
<p>The nameservers currently publish different SOA serials.</p>
<p class="section-text">The nameservers currently publish different SOA serials.</p>
{% endif %}
<table>
<div class="table-scroll"><table>
<thead><tr><th scope="col">Nameserver</th><th scope="col">Address</th><th scope="col">SOA serial</th></tr></thead>
<tbody>
{% for role, address, serial in nodes %}
<tr><td>{{ role }}</td><td>{{ address }}</td><td>{{ serial|default_if_none:"Unavailable" }}</td></tr>
{% endfor %}
</tbody>
</table>
</table></div>
</section>
{% endblock %}
@@ -0,0 +1,9 @@
{% extends "hosting/workspace_page.html" %}
{% block title %}DNS Settings · Coulobre Panel{% endblock %}
{% block page_title %}DNS Settings{% endblock %}
{% block page_tabs %}
<nav class="account-navigation" aria-label="DNS settings">
<a href="{% url 'panel:dns_defaults' %}"{% if request.resolver_match.url_name == 'dns_defaults' %} aria-current="page"{% endif %}>Zone template</a>
<a href="{% url 'panel:dns_topology' %}"{% if request.resolver_match.url_name == 'dns_topology' %} aria-current="page"{% endif %}>Local and remote</a>
</nav>
{% endblock %}
@@ -1,11 +1,5 @@
{% extends "hosting/base.html" %}
{% block title %}DNS Settings · Coulobre Panel{% endblock %}
{% block content %}
<header class="page-heading"><h1>DNS Settings</h1></header>
<nav class="account-navigation" aria-label="DNS settings">
<a href="{% url 'panel:dns_defaults' %}">Zone template</a>
<a href="{% url 'panel:dns_topology' %}" aria-current="page">Local and remote</a>
</nav>
{% extends "hosting/dns_settings_page.html" %}
{% block page_content %}
<section class="surface"><header class="section-heading"><h2>Service routing</h2><a href="{% url 'panel:connected_nodes' %}">Connected nodes</a></header>
<ul class="workspace-list">
{% for node in topology.nodes %}<li>{{ node.role|upper }} · {{ node.host }} · {{ node.state|default:"Unavailable"|capfirst }}</li>{% endfor %}
@@ -1,14 +1,18 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% load static %}
{% block title %}{{ page_title }} · Coulobre Panel{% endblock %}
{% block content %}
<a class="back-link" href="{{ account.get_absolute_url }}">← {{ account.name }}</a>
{% block page_header %}
<header class="page-heading">
<div>
<h1>{{ page_title }}</h1>
<p class="heading-meta domain">{{ domain }}</p>
</div>
</header>
{% endblock %}
{% block page_context %}
<a class="quiet-link" href="{{ account.get_absolute_url }}">← {{ account.name }}</a>
{% endblock %}
{% block page_content %}
<section class="surface section-text dns-surface">
<form method="post" class="editor">
{% csrf_token %}
@@ -1,20 +1,14 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}{{ title }} · Coulobre Panel{% endblock %}
{% block content %}
<header class="page-heading">
<div><h1>{{ title }}</h1><p class="heading-meta">{{ account.primary_domain }}</p></div>
{% if page == 'domains' and can_add_site %}<a class="button primary" href="{% url 'panel:independent_website_create' account.pk %}">Add domain</a>{% endif %}
</header>
{% for message in messages %}<p class="notice" role="status">{{ message }}</p>{% endfor %}
<section class="surface">
<form method="get" class="toolbar form-actions">
<label for="domain">Domain</label>
<select id="domain" name="domain">
{% for choice in domains %}<option value="{{ choice }}"{% if choice == domain %} selected{% endif %}>{{ choice }}</option>{% endfor %}
</select>
<button class="button secondary" type="submit">Select domain</button>
</form>
</section>
{% block page_title %}{{ title }}{% endblock %}
{% block page_metadata %}<p class="heading-meta">{{ account.primary_domain }}</p>{% endblock %}
{% block page_actions %}
{% if page == 'domains' and can_add_site %}<a class="button primary" href="{% url 'panel:independent_website_create' account.pk %}">Add domain</a>{% endif %}
{% endblock %}
{% block page_context %}
{% include "hosting/workspace_domain_selector.html" with field_id="domain" domains=domains domain=domain only %}
{% endblock %}
{% block page_content %}
{% if page == 'domains' %}
<section class="surface editor-surface" aria-label="Domain services">
<form method="post" class="editor">{% csrf_token %}{{ form.as_div }}<button class="button primary" type="submit">Save service preferences</button></form>
@@ -1,8 +1,8 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% load static %}
{% block title %}Save your recovery codes · Coulobre Panel{% endblock %}
{% block content %}
<header class="page-heading"><h1>Save your recovery codes</h1></header>
{% block page_title %}Save your recovery codes{% endblock %}
{% block page_content %}
<section class="surface editor-surface">
<p>Keep these codes somewhere safe. Each code lets you sign in once if you lose access to your second factor.</p>
<textarea class="recovery-codes" id="recovery-codes" rows="10" readonly spellcheck="false" aria-label="Recovery codes" data-secret>{{ recovery_codes }}</textarea>
@@ -1,14 +1,14 @@
{% extends "hosting/base.html" %}
{% block title %}Configure features · Coulobre Panel{% endblock %}
{% block content %}
<a class="back-link" href="{% url 'panel:installation' %}">← About Coulobre</a>
<header class="page-heading"><h1>{% if settings_tabs %}Operator Settings{% else %}Configure features{% endif %}</h1></header>
{% extends "hosting/workspace_page.html" %}
{% block title %}{% if settings_tabs %}Operator Settings{% else %}Configure features{% endif %} · Coulobre Panel{% endblock %}
{% block page_title %}{% if settings_tabs %}Operator Settings{% else %}Configure features{% endif %}{% endblock %}
{% block page_tabs %}
{% if settings_tabs %}
<nav class="account-navigation" aria-label="Operator settings">
{% for key, label in settings_tabs %}<a href="{% url 'panel:operator_settings' key %}"{% if selected_section == key %} aria-current="page"{% endif %}>{{ label }}</a>{% endfor %}
</nav>
{% endif %}
{% for message in messages %}<p class="notice" role="status">{{ message }}</p>{% endfor %}
{% endblock %}
{% block page_content %}
{% if selected_section == 'general' %}
<section class="surface section-heading">
<h2>Installation</h2>
@@ -1,7 +1,9 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}SFTP Users · Coulobre Panel{% endblock %}
{% block content %}
{% block page_header %}
<header class="page-heading"><div><h1>SFTP Users</h1><p class="heading-meta">{{ account.primary_domain }}</p></div></header>
{% endblock %}
{% block page_content %}
{% if problem %}<p class="notice" role="alert">{{ problem }}</p>{% endif %}
<section class="surface">
<header class="section-heading"><div><h2>Primary hosting login</h2><p>Access to the hosting account, including files in <code>/backups</code>.</p></div>
@@ -1,9 +1,11 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% load static %}
{% block title %}{{ page_title }} · Coulobre Panel{% endblock %}
{% block content %}
<a class="back-link" href="{% url 'panel:hosting_plans' %}">← Hosting plans</a>
<header class="page-heading"><h1>{{ page_title }}</h1></header>
{% block page_title %}{{ page_title }}{% endblock %}
{% block page_context %}
<a class="quiet-link" href="{% url 'panel:hosting_plans' %}">← Hosting packages</a>
{% endblock %}
{% block page_content %}
<section class="surface editor-surface">
<form method="post" class="editor">
{% csrf_token %}
@@ -1,13 +1,15 @@
{% extends "hosting/base.html" %}
{% block title %}Hosting plans · Coulobre Panel{% endblock %}
{% block content %}
{% extends "hosting/workspace_page.html" %}
{% block title %}Hosting packages · Coulobre Panel{% endblock %}
{% block page_header %}
<header class="page-heading">
<h1>Hosting plans</h1>
<h1>Hosting packages</h1>
{% if perms.hosting.add_hostingplan %}
<a class="button primary" href="{% url 'panel:hosting_plan_create' %}">Add hosting plan</a>
<a class="button primary" href="{% url 'panel:hosting_plan_create' %}">Add hosting package</a>
{% endif %}
</header>
<section class="surface" aria-label="Hosting plans">
{% endblock %}
{% block page_content %}
<section class="surface" aria-label="Hosting packages">
{% if hosting_plans %}
<div class="table-scroll">
<table>
@@ -46,7 +48,7 @@
</table>
</div>
{% else %}
<p class="empty">No hosting plans yet.</p>
<p class="empty">No hosting packages yet.</p>
{% endif %}
{% include "hosting/pagination.html" %}
</section>
@@ -1,12 +1,13 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}HTTP Settings · Coulobre Panel{% endblock %}
{% block content %}
<header class="page-heading"><h1>HTTP Settings</h1></header>
{% for message in messages %}<p class="notice" role="status">{{ message }}</p>{% endfor %}
{% block page_title %}HTTP Settings{% endblock %}
{% block page_tabs %}
<nav class="account-navigation" aria-label="HTTP settings">
<a href="{% url 'panel:http_defaults' 'apache' %}"{% if target == 'apache' %} aria-current="page"{% endif %}>Apache</a>
<a href="{% url 'panel:http_defaults' 'php' %}"{% if target == 'php' %} aria-current="page"{% endif %}>PHP-FPM</a>
</nav>
{% endblock %}
{% block page_content %}
<section class="surface editor-surface">
{% if target == 'apache' %}<p>Set server-wide Apache defaults. Review the effect on the panel and hosted sites before applying them.</p>
{% else %}<p>Set PHP defaults for installed PHP-FPM versions. Website-specific settings still apply.</p>{% endif %}
@@ -20,7 +21,7 @@
</form>
{% if not available %}<p>Enable the operator worker to apply a template.</p>{% endif %}
</section>
<section class="surface"><header class="section-heading"><h2>Change history</h2></header>
<section class="surface" data-live-status="http-changes"><header class="section-heading"><h2>Change history</h2></header>
<ul class="workspace-list">{% for job in jobs %}<li>{{ job.requested_at|date:"j M Y H:i" }} UTC · {{ job.state|capfirst }}{% if job.problem %}<p>{{ job.problem }}</p>{% endif %}</li>
{% empty %}<li>No template changes yet.</li>{% endfor %}</ul>
</section>
@@ -1,13 +1,17 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}{{ title }} · Coulobre Panel{% endblock %}
{% block content %}
<a class="back-link" href="{{ account.get_absolute_url }}#independent-websites">← {{ account.name }}</a>
{% block page_header %}
<header class="page-heading">
<div>
<h1>{{ title }}</h1>
{% if website %}<p class="heading-meta domain">{{ website }}</p>{% endif %}
</div>
</header>
{% endblock %}
{% block page_context %}
<a class="quiet-link" href="{{ account.get_absolute_url }}#independent-websites">← {{ account.name }}</a>
{% endblock %}
{% block page_content %}
<section class="surface editor-surface">
{% if add %}<p>This website has its own document root and PHP runtime. Point the domain at this web server before enabling HTTPS.</p>{% endif %}
{% if retiring %}<p>Retirement takes this website offline and archives its files on the web server. Its domain stays reserved.</p>{% endif %}
@@ -1,14 +1,16 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}About Coulobre · Coulobre Panel{% endblock %}
{% block content %}
<header class="page-heading"><h1>About Coulobre</h1></header>
{% for message in messages %}<p class="notice" role="status">{{ message }}</p>{% endfor %}
{% block page_title %}About Coulobre{% endblock %}
{% block page_content %}
<section class="surface" aria-labelledby="installation-heading">
<header class="section-heading"><h2 id="installation-heading">Installation</h2></header>
<dl class="details">
<div><dt>Installed version</dt><dd>{{ installed_version }}</dd></div>
{% if request.user.is_superuser %}
<div><dt>Release history</dt><dd><a href="{% url 'panel:changelog' %}">Changelog</a></dd></div>
{% endif %}
<div><dt>Core software license</dt><dd>Apache License 2.0</dd></div>
<div><dt>Project</dt><dd><a href="https://code.hosting.hippogrief.nl/hippogrief/coulobre">Source repository</a> · <a href="https://code.hosting.hippogrief.nl/hippogrief/coulobre/issues">Issue tracker</a></dd></div>
</dl>
@@ -1,14 +1,14 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}Mail delivery · Coulobre Panel{% endblock %}
{% block content %}
<header class="page-heading"><h1>Mail delivery</h1></header>
{% block page_title %}Mail delivery{% endblock %}
{% block page_content %}
<section class="surface editor-surface">
<form class="editor" method="post" action="{% url 'panel:mail_delivery' %}">
{% csrf_token %}{{ form.as_div }}<button class="button primary" type="submit">Search delivery history</button>
</form>
</section>
{% if search %}
<section class="surface" aria-label="Search results">
<section class="surface" aria-label="Search results" data-live-status="mail-delivery">
<header class="section-heading"><h2>{{ search.domain.domain }}</h2>
{% if not search.finished_at %}<a class="button secondary" href="?search={{ search.pk }}">Refresh status</a>{% endif %}
</header>
@@ -1,14 +1,18 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% load static %}
{% block title %}Mail DNS check · Coulobre Panel{% endblock %}
{% block content %}
<a class="back-link" href="{{ account.get_absolute_url }}">← {{ account.name }}</a>
{% block page_header %}
<header class="page-heading">
<div>
<h1>Mail DNS check</h1>
<p class="heading-meta domain">{{ domain }}</p>
</div>
</header>
{% endblock %}
{% block page_context %}
<a class="quiet-link" href="{{ account.get_absolute_url }}">← {{ account.name }}</a>
{% endblock %}
{% block page_content %}
{% if not request.impersonation %}
<section class="surface editor-surface">
<form method="post" class="editor">
@@ -1,15 +1,19 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}{{ title }} · Coulobre Panel{% endblock %}
{% block content %}
<a class="back-link" href="{{ account.get_absolute_url }}">← {{ account.name }}</a>
{% block page_header %}
<header class="page-heading">
<div>
<h1>{{ title }}</h1>
<p class="heading-meta">{{ object }}</p>
</div>
</header>
{% endblock %}
{% block page_context %}
<a class="quiet-link" href="{{ account.get_absolute_url }}">← {{ account.name }}</a>
{% endblock %}
{% block page_content %}
<section class="surface editor-surface">
{% if job %}
{% if job.state == "configured" %}
@@ -1,15 +1,21 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}Mail queue · {{ mail_domain }}{% endblock %}
{% block content %}
<section class="surface">
<h1>Mail queue for {{ mail_domain }}</h1>
<p><a href="{{ mail_domain.account.get_absolute_url }}">{{ mail_domain.account.name }}</a></p>
<form method="post">
{% csrf_token %}
<button class="button primary" type="submit">Collect queue summary</button>
</form>
{% block page_title %}Mail queue{% endblock %}
{% block page_metadata %}<p class="heading-meta">{{ mail_domain }}</p>{% endblock %}
{% block page_actions %}
<form method="post">
{% csrf_token %}
<button class="button primary" type="submit">Collect queue summary</button>
</form>
{% endblock %}
{% block page_context %}
<a class="quiet-link" href="{{ mail_domain.account.get_absolute_url }}">← {{ mail_domain.account.name }}</a>
{% endblock %}
{% block page_content %}
<div class="live-sections" data-live-status="mail-queue">
<section class="surface editor-surface" aria-label="Queue summary">
{% if mail_domain.queue_requested_at and not mail_domain.queue_observed_at or mail_domain.queue_requested_at > mail_domain.queue_observed_at %}
<p>Queue summary requested. Reload this page to check for results.</p>
<p>Queue summary requested.</p>
{% endif %}
{% if mail_domain.queue_report.error %}<p role="alert">{{ mail_domain.queue_report.error }}</p>{% endif %}
{% if mail_domain.queue_report.counts %}
@@ -20,7 +26,7 @@
<dt>{{ queue|capfirst }}</dt><dd>{{ count }}</dd>
{% endfor %}
</dl>
{% endif %}
{% elif not mail_domain.queue_requested_at %}<p>No queue summary yet.</p>{% endif %}
</section>
{% if mail_domain.queue_report.entries and request.user.is_superuser and request.user.is_verified %}
<section class="surface" aria-label="Queue entries"><ul class="workspace-list">
@@ -38,4 +44,5 @@
{% if operations %}<section class="surface" aria-label="Queue actions"><ul class="workspace-list">
{% for job in operations %}<li>{{ job.action|capfirst }} {{ job.queue_id }} · {{ job.state|capfirst }}{% if job.problem %} · {{ job.problem }}{% endif %}</li>{% endfor %}
</ul></section>{% endif %}
</div>
{% endblock %}
@@ -1,6 +1,6 @@
{% extends "hosting/base.html" %}
{% block content %}
<header class="page-heading"><h1>Mail Queue</h1></header>
{% extends "hosting/workspace_page.html" %}
{% block page_title %}Mail Queue{% endblock %}
{% block page_content %}
<section class="surface"><ul class="workspace-list">
{% for domain in domains %}<li><a href="{% url 'panel:mail_queue' domain.pk %}">{{ domain }}</a></li>
{% empty %}<li>No managed email domains.</li>{% endfor %}
@@ -1,13 +1,17 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}{% if auto_provision %}Add{% else %}Request{% endif %} mailbox · Coulobre Panel{% endblock %}
{% block content %}
<a class="back-link" href="{{ account.get_absolute_url }}">← {{ account.name }}</a>
{% block page_header %}
<header class="page-heading">
<div>
<h1>{% if auto_provision %}Add{% else %}Request{% endif %} mailbox</h1>
<p class="heading-meta domain">{{ mail_domain_name|default:account.primary_domain }}</p>
</div>
</header>
{% endblock %}
{% block page_context %}
<a class="quiet-link" href="{{ account.get_absolute_url }}">← {{ account.name }}</a>
{% endblock %}
{% block page_content %}
<section class="surface editor-surface">
<form method="post" class="editor">
{% include "hosting/customer_action_fields.html" %}
@@ -1,13 +1,17 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}Change mailbox storage limit · Coulobre Panel{% endblock %}
{% block content %}
<a class="back-link" href="{{ mailbox.mail_domain.account.get_absolute_url }}">← {{ mailbox.mail_domain.account.name }}</a>
{% block page_header %}
<header class="page-heading">
<div>
<h1>Change storage limit</h1>
<p class="heading-meta domain">{{ mailbox }}</p>
</div>
</header>
{% endblock %}
{% block page_context %}
<a class="quiet-link" href="{{ mailbox.mail_domain.account.get_absolute_url }}">← {{ mailbox.mail_domain.account.name }}</a>
{% endblock %}
{% block page_content %}
<section class="surface editor-surface">
<form method="post" class="editor">
{% csrf_token %}
@@ -1,7 +1,7 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}Contact and invitation · Coulobre Panel{% endblock %}
{% block content %}
<header class="page-heading"><h1>Contact and invitation</h1></header>
{% block page_title %}Contact and invitation{% endblock %}
{% block page_content %}
<section class="surface editor-surface">
<p>{{ login_user.get_username }}</p>
{% if invitation %}<p class="heading-meta">Invitation delivery · {{ invitation.get_delivery_display }}</p>{% endif %}
@@ -13,5 +13,14 @@
{% if can_send %}<button class="button secondary" type="submit" name="invite" value="1">Send new invitation</button>{% endif %}
</div>
</form>
{% if welcome_preview %}
<details class="section-text">
<summary>Welcome email preview</summary>
<p class="heading-meta">A password setup link is added when the invitation is sent.</p>
<div class="surface editor-surface">
{% include "hosting/panel_invitation_body.html" with message=welcome_preview %}
</div>
</details>
{% endif %}
</section>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "hosting/base.html" %}
{% block title %}User packages · Coulobre Panel{% endblock %}
{% block content %}
<header class="page-heading"><h1>User packages</h1></header>
{% extends "hosting/workspace_page.html" %}
{% block title %}Hosting packages · Coulobre Panel{% endblock %}
{% block page_title %}Hosting packages{% endblock %}
{% block page_content %}
<section class="surface">
<ul class="workspace-list">
{% for plan in plans %}<li><strong>{{ plan.name }}</strong>{% if plan.description %}<p>{{ plan.description }}</p>{% endif %}</li>
@@ -1,18 +1,14 @@
{% extends "hosting/base.html" %}
{% extends "hosting/backup_workspace.html" %}
{% block title %}Account Backup &amp; Restore · Coulobre Panel{% endblock %}
{% block content %}
<header class="page-heading"><h1>Account Backup &amp; Restore</h1></header>
{% for message in messages %}<p class="notice" role="status">{{ message }}</p>{% endfor %}
<nav class="account-navigation" aria-label="Backup workflows">
<a href="{% url 'panel:operator_backups' %}" aria-current="page">Hosting accounts</a>
<a href="{% url 'panel:system_backup' %}">System Backup</a>
</nav>
{% block page_context %}
<form method="get" class="workspace-context form-actions">
<label for="manager">Manager</label><select id="manager" name="manager"><option value="">All hosting accounts</option>
{% for manager in managers %}<option value="{{ manager.pk }}"{% if manager.pk|stringformat:"s" == selected_manager %} selected{% endif %}>{{ manager }}</option>{% endfor %}
</select><button class="button secondary" type="submit">Filter accounts</button>
</form>
{% endblock %}
{% block page_content %}
<section class="surface">
<form method="get" class="toolbar form-actions">
<label for="manager">Manager</label><select id="manager" name="manager"><option value="">All hosting accounts</option>
{% for manager in managers %}<option value="{{ manager.pk }}"{% if manager.pk|stringformat:"s" == selected_manager %} selected{% endif %}>{{ manager }}</option>{% endfor %}
</select><button class="button secondary" type="submit">Filter accounts</button>
</form>
<div class="table-scroll"><table>
<thead><tr><th scope="col">Hosting account</th><th scope="col">Manager</th><th scope="col">Latest backup</th><th scope="col">Schedule</th><th scope="col">Actions</th></tr></thead>
<tbody>{% for account in accounts %}
@@ -1,11 +1,13 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}SSL Overview · Coulobre Panel{% endblock %}
{% block content %}
<header class="page-heading"><h1>SSL Overview</h1></header>
{% block page_title %}SSL Overview{% endblock %}
{% block page_tabs %}
<nav class="account-navigation" aria-label="TLS overview">
<a href="?tab=websites"{% if mode == 'websites' %} aria-current="page"{% endif %}>Hosted websites</a>
<a href="?tab=server"{% if mode == 'server' %} aria-current="page"{% endif %}>Server SSL</a>
</nav>
{% endblock %}
{% block page_content %}
{% if mode == 'server' %}
<section class="surface editor-surface">
<h2>Configured endpoints</h2>
@@ -0,0 +1,14 @@
<section class="surface" aria-labelledby="operation-history" data-live-status="operator-history">
<header class="section-heading"><h2 id="operation-history">Operation history</h2></header>
{% for job in jobs %}
<details class="section-text" data-live-detail="{{ job.pk }}">
<summary>{{ job.requested_at|date:"j M Y H:i" }} UTC · {% if job.action == 'package-preview' %}Package check{% elif job.action == 'package-upgrade' %}Package update{% else %}{{ job.action|capfirst }}{% endif %}{% if job.target %} {{ job.target }}{% endif %} · {% if job.state == 'configured' %}Completed{% else %}{{ job.state|capfirst }}{% endif %}</summary>
{% if job.actor %}<p>Requested by {{ job.actor }}</p>{% endif %}
{% if job.problem %}<p>{{ job.problem }}</p>{% endif %}
{% if job.action == 'package-preview' and job.result.fingerprint %}
<p>{{ job.result.count }} package{{ job.result.count|pluralize }} ready to update.</p>
<ul>{% for package in job.result.packages %}<li><code>{{ package }}</code></li>{% endfor %}</ul>
{% endif %}
</details>
{% empty %}<p class="empty">No operations yet.</p>{% endfor %}
</section>
@@ -1,29 +0,0 @@
{% extends "hosting/base.html" %}
{% block title %}{{ title }} · Coulobre Panel{% endblock %}
{% block content %}
<header class="page-heading"><h1>{{ title }}</h1></header>
<div class="form-actions">
{% if page == 'packages' %}<a href="{% url 'panel:updates' %}">Coulobre updates</a>
{% elif page == 'services' %}<a href="{% url 'panel:service_health' %}">Service health</a>{% endif %}
</div>
{% for message in messages %}<p class="notice" role="status">{{ message }}</p>{% endfor %}
<section class="surface editor-surface">
{% if available %}<form method="post" class="editor">{% csrf_token %}{{ form.as_div }}<button class="button primary" type="submit">Queue operation</button></form>
{% else %}<p>Enable the operator service on the host to run these operations.</p>{% endif %}
</section>
<section class="surface" aria-label="Operation history">
<header class="section-heading"><h2>Operation history</h2></header>
{% for job in jobs %}
<details class="section-text"><summary>{{ job.requested_at|date:"j M Y H:i" }} · {{ job.action }}{% if job.target %} · {{ job.target }}{% endif %} · {{ job.state|capfirst }}</summary>
{% if job.problem %}<p>{{ job.problem }}</p>{% endif %}
{% if job.action == 'package-preview' and job.result.fingerprint %}
<p>{{ job.result.count }} package{{ job.result.count|pluralize }} ready to update.</p>
<ul>{% for package in job.result.packages %}<li><code>{{ package }}</code></li>{% endfor %}</ul>
{% elif job.action == 'database-report' and job.result.database_version %}
<p>MariaDB {{ job.result.database_version }} · Slow query logging {{ job.result.slow_logging|yesno:"enabled,disabled" }}</p>
<dl>{% for key, value in job.result.counters.items %}<dt>{{ key }}</dt><dd>{{ value }}</dd>{% endfor %}</dl>
{% endif %}
</details>
{% empty %}<p class="empty">No operations yet.</p>{% endfor %}
</section>
{% endblock %}
@@ -1,9 +1,8 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}{{ title }} · Coulobre Panel{% endblock %}
{% block extra_styles %}{% if theme_preview %}<link rel="stylesheet" href="{% url 'panel:preview_stylesheet' %}">{% endif %}{% endblock %}
{% block content %}
<header class="page-heading"><h1>{{ title }}</h1></header>
{% for message in messages %}<p class="notice" role="status">{{ message }}</p>{% endfor %}
{% block page_title %}{{ title }}{% endblock %}
{% block page_content %}
{% if theme_preview %}
<section class="surface editor-surface">
<h2>Previewing {{ theme_preview }}</h2>
@@ -0,0 +1,19 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Welcome to Coulobre Panel</title>
</head>
<body style="margin:0; padding:24px 12px; background:#f3f6f3; color:#162b25; font-family:Arial,sans-serif; line-height:1.5;">
<table role="presentation" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td align="center">
<div style="max-width:560px; margin:auto; padding:24px; border:1px solid #d8e4dd; border-radius:12px; background:#ffffff; text-align:left;">
{% include "hosting/panel_invitation_body.html" with message=invitation_content email_format=True %}
</div>
</td>
</tr>
</table>
</body>
</html>
@@ -1,15 +1,17 @@
{% if welcome_message %}{{ welcome_message }}
{% autoescape off %}{% if welcome_message %}{{ welcome_message }}
{% endif %}Welcome to Coulobre Panel.
Username: {{ username }}
Panel: {{ panel_url }}
Your hosting provider created a panel login for you.
Username: {{ username }}{% if panel_url %}
Panel: {{ panel_url }}{% endif %}
Set your password by opening this link within 48 hours:
{{ setup_url }}
{% if account %}Your hosting account is {{ account.primary_domain }}.{% if account.hosting_plan %}
Hosting plan: {{ account.hosting_plan.name }}
Hosting package: {{ account.hosting_plan.name }}
Website limit: {{ account.hosting_plan.website_limit }}
Scheduled tasks per account: {{ account.hosting_plan.website_job_limit }}
Database limit: {{ account.hosting_plan.database_limit|default_if_none:"Unlimited" }}
@@ -32,3 +34,4 @@ After signing in, open the hosting account for website status, DNS settings,
and instructions for configuring email.
{% else %}Once you have set your password, sign in to see the hosting you can manage.
{% endif %}
{% endautoescape %}
@@ -0,0 +1,46 @@
<h2{% if email_format %} style="margin:0 0 12px; font-size:24px; line-height:1.25;"{% endif %}>Welcome to Coulobre Panel</h2>
{% if message.welcome_message %}{{ message.welcome_message|linebreaks }}{% endif %}
<p>Your hosting provider created a panel login for you. Set your password within 48 hours.</p>
<p><strong>Username</strong> {{ message.username }}</p>
{% if message.setup_url %}
<p style="margin:20px 0;"><a href="{{ message.setup_url }}" style="display:inline-block; padding:11px 18px; border-radius:6px; background:#1b6049; color:#ffffff; font-weight:bold; text-decoration:none;">Set your password</a></p>
{% else %}
<p><strong>Set your password</strong></p>
{% endif %}
{% if message.panel_url %}<p><a href="{{ message.panel_url }}"{% if email_format %} style="color:#1b6049;"{% endif %}>Open Coulobre Panel</a></p>{% endif %}
{% if message.account %}
<h3>Your hosting</h3>
<p><strong>Domain</strong> {{ message.account.primary_domain }}</p>
{% with package=message.account.hosting_plan %}
{% if package %}
<p><strong>Hosting package</strong> {{ package.name }}</p>
<ul>
<li>Websites · {{ package.website_limit }}</li>
<li>Scheduled tasks · {{ package.website_job_limit }}</li>
<li>Databases · {{ package.database_limit|default_if_none:"Unlimited" }}</li>
<li>Mailboxes · {{ package.mailbox_limit|default_if_none:"Unlimited" }}</li>
{% if package.mailbox_quota_mib %}<li>Storage per new mailbox · {{ package.mailbox_quota_mib }} MiB</li>{% endif %}
{% if package.website_storage_limit_mib %}<li>Default website storage limit · {{ package.website_storage_limit_mib }} MiB</li>{% endif %}
</ul>
{% endif %}
{% endwith %}
{% if message.nameservers %}
<h3>DNS</h3>
<p>To use Coulobre DNS, set these nameservers at your registrar.</p>
<ul>{% for server in message.nameservers %}<li>{{ server }}</li>{% endfor %}</ul>
{% elif message.website_records %}
<h3>DNS</h3>
<p>If your DNS is hosted elsewhere, add these records at your DNS provider.</p>
<ul>{% for record in message.website_records %}<li><code>{{ record.name }} {{ record.record_type }} {{ record.address }}</code></li>{% endfor %}</ul>
{% endif %}
{% if message.mail_configured %}
{% if message.imap_host or message.submission_host %}
<h3>Connect your email client</h3>
<p>Use your full mailbox address as the username.</p>
<ul>
{% if message.imap_host %}<li>Incoming mail (IMAP over TLS) · {{ message.imap_host }}, port 993</li>{% endif %}
{% if message.submission_host %}<li>Outgoing mail (SMTP with STARTTLS) · {{ message.submission_host }}, port 587</li>{% endif %}
</ul>
{% endif %}
{% endif %}
{% endif %}
@@ -1,7 +1,6 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}Apache preview · Coulobre Panel{% endblock %}
{% block content %}
<a class="back-link" href="{% url 'panel:plans' %}">← Web provisioning</a>
{% block page_header %}
<header class="page-heading">
<div>
<h1>Apache preview</h1>
@@ -11,6 +10,11 @@
<a class="button secondary" href="{% url 'panel:plan' plan.pk %}">Refresh status</a>
{% endif %}
</header>
{% endblock %}
{% block page_context %}
<a class="quiet-link" href="{% url 'panel:plans' %}">← Web provisioning</a>
{% endblock %}
{% block page_content %}
<dl class="details surface">
<div><dt>Status</dt><dd>{% include "hosting/plan_status.html" %}</dd></div>
<div><dt>Hosting account</dt><dd>{% if is_reseller or perms.hosting.view_hostingaccount %}<a class="record-link" href="{{ plan.account.get_absolute_url }}">{{ plan.account.name }}</a>{% else %}{{ plan.account.name }}{% endif %}</dd></div>
@@ -1,12 +1,14 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}Web provisioning · Coulobre Panel{% endblock %}
{% block content %}
{% block page_header %}
<header class="page-heading">
<div>
<h1>Web provisioning</h1>
<p class="heading-meta">{{ paginator.count }} Apache preview{{ paginator.count|pluralize }}</p>
</div>
</header>
{% endblock %}
{% block page_content %}
<section class="surface" aria-label="Apache previews">
{% include "hosting/plan_table.html" %}
{% include "hosting/pagination.html" %}
@@ -0,0 +1,56 @@
{% extends "hosting/workspace_page.html" %}
{% block title %}Install a remote server · Coulobre Panel{% endblock %}
{% block page_title %}Install a remote server{% endblock %}
{% block page_metadata %}<p>Deploy Coulobre {{ release }} over SSH.</p>{% endblock %}
{% block page_actions %}
<a class="button secondary" href="{% url 'panel:connected_nodes' %}">Connected nodes</a>
{% endblock %}
{% block page_content %}
<section class="surface" data-live-status="remote-deployment" aria-label="Installation progress">
{% if deployment is None %}
<p class="notice">The remote installation service is unavailable.</p>
{% elif deployment %}
<header class="section-heading"{% if deployment.state == 'running' %} data-live-pending{% endif %}>
<h2>{{ deployment.host }} · {{ deployment.state|capfirst }}</h2>
</header>
<p role="status">{{ deployment.message }}</p>
{% else %}
<p>No remote installation has been started.</p>
{% endif %}
</section>
{% if deployment is not None %}
<form method="post" class="surface form-panel" autocomplete="off">
{% csrf_token %}
{{ form.non_field_errors }}
<fieldset>
<legend>Destination</legend>
{{ form.role.as_field_group }}
{{ form.host.as_field_group }}
{{ form.port.as_field_group }}
{{ form.ssh_user.as_field_group }}
{{ form.host_key.as_field_group }}
{{ form.identity.as_field_group }}
{{ form.email.as_field_group }}
</fieldset>
<details {% if form.mail_hostname.errors or form.certificate.errors or form.key.errors %}open{% endif %}>
<summary>Mail receiver settings</summary>
{{ form.mail_hostname.as_field_group }}
{{ form.tls.as_field_group }}
{{ form.certificate.as_field_group }}
{{ form.key.as_field_group }}
</details>
<details {% if form.scope.errors or form.domains.errors %}open{% endif %}>
<summary>Shared receiver settings</summary>
{{ form.scope.as_field_group }}
{{ form.domains.as_field_group }}
</details>
<details {% if form.plan.errors or form.password.errors %}open{% endif %}>
<summary>Standalone panel settings</summary>
{{ form.plan.as_field_group }}
{{ form.password.as_field_group }}
</details>
{{ form.confirmed.as_field_group }}
<div class="form-actions"><button class="button primary" type="submit">Start installation</button></div>
</form>
{% endif %}
{% endblock %}
@@ -1,7 +1,6 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}{{ reseller }} · Coulobre Panel{% endblock %}
{% block content %}
<a class="back-link" href="{% url 'panel:resellers' %}">← Managers</a>
{% block page_header %}
<header class="page-heading">
<h1>{{ reseller }}</h1>
{% if perms.hosting.add_hostingaccount and perms.hosting.view_hostingaccount %}
@@ -12,12 +11,17 @@
<a class="button secondary" href="{% url 'panel:reseller_edit' reseller.pk %}">Edit manager</a>
{% endif %}
</header>
{% endblock %}
{% block page_context %}
<a class="quiet-link" href="{% url 'panel:resellers' %}">← Managers</a>
{% endblock %}
{% block page_content %}
<dl class="details surface">
<div><dt>Panel sign-in</dt><dd>{{ reseller.user.is_active|yesno:"Active,Suspended" }}</dd></div>
<div><dt>Accounts allocated</dt><dd>{{ account_count }} of {{ reseller.account_limit }}</dd></div>
{% if perms.hosting.view_hostingplan %}
<div>
<dt>Allowed hosting plans</dt>
<dt>Allowed hosting packages</dt>
<dd>{% for plan in allowed_plans %}{{ plan.name }}{% if not forloop.last %}, {% endif %}{% empty %}None{% endfor %}</dd>
</div>
{% endif %}
@@ -29,7 +33,7 @@
<div class="table-scroll">
<table>
<thead>
<tr><th scope="col">Account</th><th scope="col">Primary domain</th>{% if perms.hosting.view_hostingplan %}<th scope="col">Hosting plan</th>{% endif %}</tr>
<tr><th scope="col">Account</th><th scope="col">Primary domain</th>{% if perms.hosting.view_hostingplan %}<th scope="col">Hosting package</th>{% endif %}</tr>
</thead>
<tbody>
{% for account in account_page %}
@@ -83,9 +87,9 @@
{% if event.changes.hosting_plans %}
<div>Allowed plans {% for plan in event.changes.hosting_plans.before %}{{ plan.name }}{% if not forloop.last %}, {% endif %}{% empty %}None{% endfor %} → {% for plan in event.changes.hosting_plans.after %}{{ plan.name }}{% if not forloop.last %}, {% endif %}{% empty %}None{% endfor %}</div>
{% endif %}
{% if event.changes.plan %}<div>Hosting plan {{ event.changes.plan.name }}</div>{% endif %}
{% if event.changes.plan %}<div>Hosting package {{ event.changes.plan.name }}</div>{% endif %}
{% if event.changes.account_plan %}
<div>Hosting plan {{ event.changes.account_plan.before.name|default:"Unassigned" }} → {{ event.changes.account_plan.after.name|default:"Unassigned" }}</div>
<div>Hosting package {{ event.changes.account_plan.before.name|default:"Unassigned" }} → {{ event.changes.account_plan.after.name|default:"Unassigned" }}</div>
{% endif %}
{% endif %}
</td>
@@ -1,19 +1,21 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}{{ page_title }} · Coulobre Panel{% endblock %}
{% block content %}
<a class="back-link" href="{% if reseller %}{{ reseller.get_absolute_url }}{% else %}{% url 'panel:resellers' %}{% endif %}">← {% if reseller %}{{ reseller }}{% else %}Managers{% endif %}</a>
<header class="page-heading"><h1>{{ page_title }}</h1></header>
{% block page_title %}{{ page_title }}{% endblock %}
{% block page_context %}
<a class="quiet-link" href="{% if reseller %}{{ reseller.get_absolute_url }}{% else %}{% url 'panel:resellers' %}{% endif %}">← {% if reseller %}{{ reseller }}{% else %}Managers{% endif %}</a>
{% endblock %}
{% block page_content %}
<section class="surface editor-surface">
{% if profiles %}
<form method="get" class="editor">
<div>
<label for="manager-profile">Load profile</label>
<label for="manager-profile">Manager package</label>
<select id="manager-profile" name="profile">
<option value="">Custom settings</option>
{% for profile in profiles %}<option value="{{ profile.pk }}"{% if profile.pk == selected_profile.pk %} selected{% endif %}>{{ profile }}</option>{% endfor %}
</select>
</div>
<p class="heading-meta">Choose a profile, then review its settings before saving.</p>
<p class="heading-meta">Choose a manager package, then review its settings before saving.</p>
<button class="button secondary" type="submit">Load settings</button>
</form>
{% endif %}
@@ -25,15 +27,15 @@
{{ form.as_div }}
</fieldset>
<fieldset class="editor">
<legend>Access and plans</legend>
<legend>Access and packages</legend>
{{ policy_form.as_div }}
</fieldset>
{% else %}
{{ form.as_div }}
{% endif %}
{% if can_add_hosting_plan %}
<p><a href="{% url 'panel:hosting_plan_create' %}" target="_blank" rel="noopener">Create a hosting plan</a>. The plan opens in a new tab.</p>
<button class="button secondary" type="submit" name="refresh_plans" value="1" formnovalidate>Reload available plans</button>
<p><a href="{% url 'panel:hosting_plan_create' %}" target="_blank" rel="noopener">Create a hosting package</a>. The package opens in a new tab.</p>
<button class="button secondary" type="submit" name="refresh_plans" value="1" formnovalidate>Reload available packages</button>
{% endif %}
<div class="form-actions">
<button class="button primary" type="submit">{{ submit_label }}</button>
@@ -1,11 +1,11 @@
{% extends "hosting/base.html" %}
{% extends "hosting/workspace_page.html" %}
{% block title %}Managers · Coulobre Panel{% endblock %}
{% block content %}
{% block page_header %}
<header class="page-heading">
<h1>Managers</h1>
<div class="form-actions">
{% if perms.hosting.change_reseller and perms.hosting.view_hostingplan %}
<a class="button secondary" href="{% url 'panel:reseller_profiles' %}">Profiles</a>
<a class="button secondary" href="{% url 'panel:reseller_profiles' %}">Manager packages</a>
{% endif %}
{% if perms.hosting.add_reseller %}
{% if request.user.is_superuser and request.user.is_verified %}
@@ -15,13 +15,17 @@
{% endif %}
</div>
</header>
{% endblock %}
{% block page_context %}
<form class="workspace-context form-actions" method="get" action="{% url 'panel:resellers' %}" role="search">
<label class="visually-hidden" for="reseller-search">Search by username</label>
<input type="search" id="reseller-search" name="q" placeholder="Username" value="{{ search }}">
<button class="button secondary" type="submit">Search</button>
{% if search %}<a class="quiet-link" href="{% url 'panel:resellers' %}">Clear</a>{% endif %}
</form>
{% endblock %}
{% block page_content %}
<section class="surface" aria-label="Manager list">
<form class="toolbar" method="get" action="{% url 'panel:resellers' %}" role="search">
<label class="visually-hidden" for="reseller-search">Search by username</label>
<input type="search" id="reseller-search" name="q" placeholder="Username" value="{{ search }}">
<button class="button secondary" type="submit">Search</button>
{% if search %}<a class="quiet-link" href="{% url 'panel:resellers' %}">Clear</a>{% endif %}
</form>
{% if resellers %}
<div class="table-scroll">
<table>
@@ -1,13 +1,15 @@
{% extends "hosting/base.html" %}
{% block title %}{% if object %}Edit profile{% else %}Add profile{% endif %} · Coulobre Panel{% endblock %}
{% block content %}
<a class="back-link" href="{% url 'panel:reseller_profiles' %}">← Manager profiles</a>
<header class="page-heading"><h1>{% if object %}Edit profile{% else %}Add profile{% endif %}</h1></header>
{% extends "hosting/workspace_page.html" %}
{% block title %}{% if object %}Edit manager package{% else %}Add manager package{% endif %} · Coulobre Panel{% endblock %}
{% block page_title %}{% if object %}Edit manager package{% else %}Add manager package{% endif %}{% endblock %}
{% block page_context %}
<a class="quiet-link" href="{% url 'panel:reseller_profiles' %}">← Manager packages</a>
{% endblock %}
{% block page_content %}
<section class="surface editor-surface">
<form method="post" class="editor">
{% csrf_token %}
{{ form.as_div }}
<button type="submit" class="button primary">Save profile</button>
<button type="submit" class="button primary">Save package</button>
</form>
</section>
{% endblock %}
@@ -1,24 +1,30 @@
{% extends "hosting/base.html" %}
{% block title %}Manager profiles · Coulobre Panel{% endblock %}
{% block content %}
<a class="back-link" href="{% url 'panel:resellers' %}">← Managers</a>
{% extends "hosting/workspace_page.html" %}
{% block title %}Manager packages · Coulobre Panel{% endblock %}
{% block page_header %}
<header class="page-heading">
<h1>Manager profiles</h1>
<a class="button primary" href="{% url 'panel:reseller_profile_create' %}">Add profile</a>
<h1>Manager packages</h1>
<a class="button primary" href="{% url 'panel:reseller_profile_create' %}">Add manager package</a>
</header>
{% endblock %}
{% block page_context %}
<a class="quiet-link" href="{% url 'panel:resellers' %}">← Managers</a>
{% endblock %}
{% block page_content %}
<section class="surface">
<table>
<thead><tr><th scope="col">Profile</th><th scope="col">Account limit</th></tr></thead>
<tbody>
{% for profile in object_list %}
<tr>
<td><a href="{% url 'panel:reseller_profile_edit' profile.pk %}">{{ profile.name }}</a>{% if profile.default_slot %} · Default{% endif %}</td>
<td>{% if profile.account_limit %}{{ profile.account_limit }}{% else %}Manage existing accounts only{% endif %}</td>
</tr>
{% empty %}
<tr><td colspan="2">No profiles yet. Add one to reuse a set of plans, limits, and permissions.</td></tr>
{% endfor %}
</tbody>
</table>
<div class="table-scroll">
<table>
<thead><tr><th scope="col">Package</th><th scope="col">Account limit</th></tr></thead>
<tbody>
{% for profile in object_list %}
<tr>
<td><a href="{% url 'panel:reseller_profile_edit' profile.pk %}">{{ profile.name }}</a>{% if profile.default_slot %} · Default{% endif %}</td>
<td>{% if profile.account_limit %}{{ profile.account_limit }}{% else %}Manage existing accounts only{% endif %}</td>
</tr>
{% empty %}
<tr><td colspan="2">No manager packages yet. Add one to reuse account limits and a set of hosting packages.</td></tr>
{% endfor %}
</tbody>
</table>
</div>
</section>
{% endblock %}
Loaded 100 of 152 files, more files were not shown because too many files have changed in this diff. Show more