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 %}
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.
| Last status | Last run | First seen | -{% for acc in unmatched %} - | ||
|---|---|---|---|---|---|
| {{ acc.derived_backup_software }} | {{ acc.derived_backup_type }} | {{ acc.derived_job_name }} | @@ -57,108 +62,7 @@{{ acc.last_run_at|local_datetime if acc.last_run_at else '—' }} | {{ acc.first_seen_at|local_datetime }} | -- - |