hub: unified customer page, blocked status, dashboard merge

- Replace separate config detail and report detail pages with unified
  /customers/{id} page showing both config info and live report data
- Add "blocked" status for customers (hidden from dashboard, notifications
  suppressed, still accepts reports)
- Dashboard now shows config-only customers as "PENDING" status
- Customers list: all rows link to /customers/{id}, show BLOCKED badge
- New actions: block/unblock, push config to controller, auto-create
  config from report data
- /configs/{id} now redirects to /customers/{id}
- Add config-badge CSS classes for MANAGED/MANUAL/BLOCKED badges

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-20 15:57:39 +01:00
parent cb425d8086
commit 42e0617a6c
9 changed files with 1017 additions and 168 deletions
+9 -5
View File
@@ -46,13 +46,17 @@
</thead>
<tbody>
{{range .Customers}}
<tr onclick="window.location='{{if .HasConfig}}/configs/{{.CustomerID}}{{else}}/customers/{{.CustomerID}}{{end}}'">
<tr class="{{if .IsBlocked}}row-blocked{{end}}" onclick="window.location='/customers/{{.CustomerID}}'">
<td><code>{{.CustomerID}}</code></td>
<td>{{if .CustomerName}}{{.CustomerName}}{{else}}<span class="text-muted"></span>{{end}}</td>
<td>{{if .Domain}}{{.Domain}}{{else}}<span class="text-muted"></span>{{end}}</td>
<td>
{{if .OverallStatus}}
<span class="status-badge status-badge-{{.OverallStatus}}">{{.OverallStatus}}</span>
{{if .IsBlocked}}
<span class="config-badge config-badge-blocked">BLOCKED</span>
{{else if .OverallStatus}}
<span class="status-badge status-badge-{{.OverallStatus}}">
{{if eq .OverallStatus "ok"}}OK{{else if eq .OverallStatus "warn"}}WARN{{else if eq .OverallStatus "down"}}DOWN{{else if eq .OverallStatus "disabled"}}PAUSED{{else if eq .OverallStatus "pending"}}PENDING{{else}}{{.OverallStatus}}{{end}}
</span>
{{else}}
<span class="text-muted"></span>
{{end}}
@@ -60,9 +64,9 @@
<td>{{if .ControllerVersion}}<code>{{.ControllerVersion}}</code>{{else}}<span class="text-muted"></span>{{end}}</td>
<td>
{{if .HasConfig}}
<span class="status-badge status-badge-ok">managed</span>
<span class="config-badge config-badge-managed">MANAGED</span>
{{else}}
<span class="status-badge status-badge-disabled">manual</span>
<span class="config-badge config-badge-manual">MANUAL</span>
{{end}}
</td>
</tr>