feat: integration/webhook counts in project overview

ProjectOverview gains integration_count + webhook_count (enabled only);
dashboard Resources list gets an Integrations row linking to the new
view. Covers the "dashboard widget if cheap" Phase 4 item.

Authored By: TDvorak <[email protected]>
This commit is contained in:
Tomas Dvorak committed 2026-09-16 19:18:15 +02:00
1 parent e25eb92339
commit 23186e38b8
8 files changed
+71 -2

No files matched your search

+12 -1
View File
@@ -136,7 +136,18 @@ SELECT
SELECT MAX(al.created_at)::TIMESTAMPTZ
FROM core.audit_logs al
WHERE al.project_id = p.id
) AS last_audit_at
) AS last_audit_at,
(
SELECT COUNT(*)::BIGINT
FROM core.integrations i
WHERE i.project_id = p.id
) AS integration_count,
(
SELECT COUNT(*)::BIGINT
FROM core.webhooks w
WHERE w.project_id = p.id
AND w.enabled
) AS webhook_count
FROM core.projects p
WHERE p.id = $1;