fix: Docker Compose missing migrations, network scan []int crash, demo seed data

Three bugs fixed:
- Docker Compose only mounted migration 000001; migrations 000002-000007
  (profiles, agent groups, revocation, discovery, network scans) never ran,
  breaking half the demo features. Now mounts all 7 migrations in order.
- Network Scans page crashed with pq.Array scan error because lib/pq
  doesn't support []int, only []int64. Changed Ports field accordingly.
- Dashboard pie chart displayed "RenewalInProgress" without spaces.
  Added formatStatus() helper for PascalCase → spaced display.

Also adds first-run demo experience improvements:
- 9 discovered certificates (filesystem + network scan mix)
- 3 discovery scans with recent timestamps
- 2 AwaitingApproval renewal jobs for approval workflow demo
- CERTCTL_NETWORK_SCAN_ENABLED=true in Docker Compose
- Network scan targets seeded with last_scan results
- Version badge updated to v2.0.5
- Docs updated (quickstart, advanced demo) to reference seeded data

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
shankar0123
2026-03-27 18:33:50 -04:00
parent b9633e5b1a
commit 8308beb5bb
11 changed files with 156 additions and 23 deletions
+1 -1
View File
@@ -69,7 +69,7 @@ export default function Layout() {
</nav>
<div className="px-5 py-3 border-t border-white/10 flex items-center justify-between">
<span className="text-[10px] text-brand-300/60 font-mono">v2.0.4</span>
<span className="text-[10px] text-brand-300/60 font-mono">v2.0.5</span>
{authRequired && (
<button
onClick={logout}
+5 -2
View File
@@ -13,6 +13,9 @@ import PageHeader from '../components/PageHeader';
import StatusBadge from '../components/StatusBadge';
import { daysUntil, expiryColor, formatDate } from '../api/utils';
// Convert PascalCase status like "RenewalInProgress" to "Renewal In Progress"
const formatStatus = (s: string) => s.replace(/([a-z])([A-Z])/g, '$1 $2');
const STATUS_COLORS: Record<string, string> = {
Active: '#10b981',
Expiring: '#f59e0b',
@@ -149,7 +152,7 @@ export default function DashboardPage() {
outerRadius={90}
paddingAngle={2}
dataKey="value"
label={({ name, value }) => `${name}: ${value}`}
label={({ name, value }) => `${formatStatus(name || '')}: ${value}`}
labelLine={false}
>
{pieData.map((entry, index) => (
@@ -160,7 +163,7 @@ export default function DashboardPage() {
<Legend
verticalAlign="bottom"
height={36}
formatter={(value: string) => <span className="text-xs text-ink-muted">{value}</span>}
formatter={(value: string) => <span className="text-xs text-ink-muted">{formatStatus(value)}</span>}
/>
</PieChart>
</ResponsiveContainer>