Files
felhom.eu/hub/internal/web/templates/configs.html
T
admin cb425d8086 feat: merge report-only customers into Customers page, rename tab
- Customers page now shows ALL customers: both pre-configured (managed)
  and report-only (manual) — merged from customer_configs + reports tables
- Renamed "Configurations" → "Customers" in navigation tabs
- Renamed "+ New Configuration" → "+ Add Customer"
- Status column with ok/warn/down badges, version column, managed/manual badge

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 15:27:05 +01:00

80 lines
2.9 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Felhom Hub — Customers</title>
<link rel="stylesheet" href="/style.css">
</head>
<body>
<div class="container">
<header>
<h1>Felhom Hub</h1>
<nav class="nav-links">
<a href="/" class="nav-link">Dashboard</a>
<a href="/configs" class="nav-link active">Customers</a>
</nav>
</header>
{{if .Flash}}
<div class="flash flash-success">
{{if eq .Flash "deleted"}}Customer configuration deleted.{{end}}
</div>
{{end}}
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem;">
<h2 style="margin: 0;">Customers</h2>
<a href="/configs/new" class="btn">+ Add Customer</a>
</div>
{{if not .Customers}}
<div class="empty-state">
<p>No customers yet.</p>
<p class="hint">Add a customer configuration or wait for a controller to report in.</p>
</div>
{{else}}
<table class="dashboard-table">
<thead>
<tr>
<th>Customer ID</th>
<th>Name</th>
<th>Domain</th>
<th>Status</th>
<th>Version</th>
<th>Config</th>
</tr>
</thead>
<tbody>
{{range .Customers}}
<tr onclick="window.location='{{if .HasConfig}}/configs/{{.CustomerID}}{{else}}/customers/{{.CustomerID}}{{end}}'">
<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>
{{else}}
<span class="text-muted"></span>
{{end}}
</td>
<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>
{{else}}
<span class="status-badge status-badge-disabled">manual</span>
{{end}}
</td>
</tr>
{{end}}
</tbody>
</table>
{{end}}
<footer>
<p>Felhom Hub — Customer Management</p>
</footer>
</div>
</body>
</html>