diff --git a/containers/backupchecks/src/backend/app/main/routes_cove.py b/containers/backupchecks/src/backend/app/main/routes_cove.py index 25905a2..382b89a 100644 --- a/containers/backupchecks/src/backend/app/main/routes_cove.py +++ b/containers/backupchecks/src/backend/app/main/routes_cove.py @@ -92,6 +92,7 @@ def cove_accounts(): ) customers = Customer.query.filter_by(active=True).order_by(Customer.name.asc()).all() + customer_rows = [{"id": c.id, "name": c.name} for c in customers] jobs = Job.query.filter_by(archived=False).order_by(Job.job_name.asc()).all() for acc in unmatched + matched: @@ -104,7 +105,7 @@ def cove_accounts(): "main/cove_accounts.html", unmatched=unmatched, matched=matched, - customers=customers, + customers=customer_rows, jobs=jobs, settings=settings, STATUS_LABELS={ @@ -150,9 +151,8 @@ def cove_account_link(cove_account_db_id: int): flash("Customer not found.", "danger") return redirect(url_for("main.cove_accounts")) - default_job_name = (cove_acc.account_name or cove_acc.computer_name or f"Cove account {cove_acc.account_id}").strip() - job_name = (request.form.get("job_name") or default_job_name).strip() - backup_type = (request.form.get("backup_type") or _derive_backup_type_for_account(cove_acc)).strip() + job_name = (cove_acc.account_name or cove_acc.computer_name or f"Cove account {cove_acc.account_id}").strip() + backup_type = _derive_backup_type_for_account(cove_acc) job = Job( customer_id=customer.id, diff --git a/containers/backupchecks/src/templates/main/cove_accounts.html b/containers/backupchecks/src/templates/main/cove_accounts.html index c39ed62..96478fd 100644 --- a/containers/backupchecks/src/templates/main/cove_accounts.html +++ b/containers/backupchecks/src/templates/main/cove_accounts.html @@ -21,7 +21,7 @@ {# ── Unmatched accounts (need a job) ─────────────────────────────────────── #} {% if unmatched %}

Unmatched {{ unmatched|length }}

-

These accounts have no linked job yet. Create a new job or link to an existing one.

+

Click a row to create a new job or link to an existing one.

@@ -36,12 +36,17 @@ - {% for acc in unmatched %} - + @@ -57,108 +62,7 @@ - - - {# Link modal #} - {# /modal #} {% endfor %}
Last status Last run First seen
{{ acc.derived_backup_software }} {{ acc.derived_backup_type }} {{ acc.derived_job_name }} {{ acc.last_run_at|local_datetime if acc.last_run_at else '—' }} {{ acc.first_seen_at|local_datetime }} - -
@@ -238,4 +142,158 @@
{% endif %} +{# ── Shared link/create modal ─────────────────────────────────────────────── #} + + + + {% endblock %} diff --git a/docs/changelog-claude.md b/docs/changelog-claude.md index 0882af0..6ad3dc7 100644 --- a/docs/changelog-claude.md +++ b/docs/changelog-claude.md @@ -2,6 +2,14 @@ This file documents all changes made to this project via Claude Code. +## [2026-03-20] (2) + +### Changed +- Cove Accounts page: same clickable-row UX as Cloud Connect — removed per-row "Link / Create Job" button and inline modals (N modals → 1 shared modal): + - Unmatched rows are clickable; modal pre-fills job name, backup software, backup type as read-only + - Customer via datalist auto-complete; Cove's own customer name is used as pre-fill suggestion when it matches an existing customer + - `routes_cove.py`: `customers` passed as dicts for `tojson`; `job_name` and `backup_type` now derived server-side (no longer read from form fields) + ## [2026-03-20] ### Fixed