From e3c7a5ddacbdff476c78ecabb93719e62bd5430a Mon Sep 17 00:00:00 2001 From: Ivo Oskamp Date: Fri, 20 Mar 2026 08:58:18 +0100 Subject: [PATCH] Cloud Connect: clickable rows with shared modal (Inbox-style UX) - Remove per-row Link/Create Job button and inline modals - Make unmatched rows clickable to open a single shared modal - Create new job tab: customer via datalist (auto-complete), job name and backup type shown read-only (derived from user/section) - Route: derive job_name and backup_type server-side, not from form Co-Authored-By: Claude Sonnet 4.6 --- .../backend/app/main/routes_cloud_connect.py | 4 +- .../main/cloud_connect_accounts.html | 250 +++++++++++------- docs/changelog-claude.md | 9 + 3 files changed, 167 insertions(+), 96 deletions(-) diff --git a/containers/backupchecks/src/backend/app/main/routes_cloud_connect.py b/containers/backupchecks/src/backend/app/main/routes_cloud_connect.py index 8889bba..b3c8913 100644 --- a/containers/backupchecks/src/backend/app/main/routes_cloud_connect.py +++ b/containers/backupchecks/src/backend/app/main/routes_cloud_connect.py @@ -117,8 +117,8 @@ def cloud_connect_account_link(cc_account_db_id: int): customer = Customer.query.get_or_404(customer_id) - job_name = (request.form.get("job_name") or acc.user).strip() - backup_type = (request.form.get("backup_type") or acc.derived_backup_type).strip() + job_name = acc.user.strip() + backup_type = "Cloud Connect Agent" if acc.section == "Agent" else "Cloud Connect Backup" job = Job( customer_id=customer.id, diff --git a/containers/backupchecks/src/templates/main/cloud_connect_accounts.html b/containers/backupchecks/src/templates/main/cloud_connect_accounts.html index 64b4c9a..149f34a 100644 --- a/containers/backupchecks/src/templates/main/cloud_connect_accounts.html +++ b/containers/backupchecks/src/templates/main/cloud_connect_accounts.html @@ -10,7 +10,7 @@ {# ── Unmatched accounts ─────────────────────────────────────────────────── #} {% 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.

@@ -24,12 +24,16 @@ - {% for acc in unmatched %} - + @@ -46,97 +50,7 @@ {% endif %} - - - {# Link modal #} - {% endfor %}
Last active Status First seen
{{ acc.user }} {{ acc.section }} {{ acc.repo_name or '—' }}
{{ acc.repo_type or '' }}
{{ acc.first_seen_at|local_datetime }} - -
@@ -193,7 +107,7 @@
@@ -211,4 +125,152 @@
{% endif %} +{# ── Shared link/create modal ───────────────────────────────────────────── #} + + + + {% endblock %} diff --git a/docs/changelog-claude.md b/docs/changelog-claude.md index 3920e09..a0aae2f 100644 --- a/docs/changelog-claude.md +++ b/docs/changelog-claude.md @@ -2,6 +2,15 @@ This file documents all changes made to this project via Claude Code. +## [2026-03-20] + +### Changed +- Cloud Connect Accounts page: replaced per-row "Link / Create Job" button and inline modals with clickable rows and a single shared modal (mirrors Inbox UX): + - Clicking an unmatched row opens a modal pre-filled with the account's user and section + - "Create new job" tab: customer via datalist input (auto-complete); Job name (from User) and Backup type (from Section) shown as read-only — not editable + - "Link to existing job" tab: unchanged + - `routes_cloud_connect.py`: job name and backup type are now derived server-side from `acc.user` and `acc.section` instead of reading from form fields + ## [2026-03-19] (2) ### Added