+ {/* Header */}
+
+
+
+
+
+
+
+
+ {config.pluralLabel}
+
+
+ {config.description}
+
+
+
+
+
+ {/* Search */}
+
+
+
+ ) => setSearchQuery(e.target.value)}
+ className="pl-8"
+ data-testid="metadata-search-input"
+ />
+
+
+ {filteredItems.length} {config.pluralLabel.toLowerCase()}
+
+
+
+ {/* Loading */}
+ {loading && (
+
+
+ Loading {config.pluralLabel.toLowerCase()}...
+
+ )}
+
+ {/* Saving indicator */}
+ {saving && (
+
+
+ Saving...
+
+ )}
+
+ {/* Items list */}
+ {!loading && filteredItems.length === 0 && (
+
+
No {config.pluralLabel.toLowerCase()} found.
+
+ )}
+
+ {!loading && filteredItems.length > 0 && (
+
+ {filteredItems.map((item) => {
+ const name = String(item.name ?? '');
+ const label = String(item.label ?? item.name ?? '');
+ const description = String(item.description ?? '');
+ return (
+
+
+
+
{label}
+
{name}
+ {description && (
+
{description}
+ )}
+
+ {isEditable && (
+
+
+
+ )}
+
+
+ );
+ })}
+
+ )}
+
+ );
+}
diff --git a/apps/console/src/pages/system/SystemHubPage.tsx b/apps/console/src/pages/system/SystemHubPage.tsx
index 40ea8087c..efd09eea6 100644
--- a/apps/console/src/pages/system/SystemHubPage.tsx
+++ b/apps/console/src/pages/system/SystemHubPage.tsx
@@ -3,7 +3,8 @@
*
* Unified entry point for all system administration functions.
* Displays card-based overview linking to Apps, Users, Organizations,
- * Roles, Permissions, Audit Log, and Profile management pages.
+ * Roles, Permissions, Audit Log, Profile management pages, and
+ * dynamically generated metadata type cards from the registry.
*/
import { useEffect, useState, useCallback } from 'react';
@@ -26,9 +27,13 @@ import {
User,
Loader2,
Database,
+ LayoutDashboard,
+ FileText,
+ BarChart3,
} from 'lucide-react';
import { useAdapter } from '../../context/AdapterProvider';
import { useMetadata } from '../../context/MetadataProvider';
+import { getHubMetadataTypes } from '../../config/metadataTypeRegistry';
interface HubCard {
title: string;
@@ -39,12 +44,29 @@ interface HubCard {
count: number | null;
}
+// ---------------------------------------------------------------------------
+// Icon resolver for registry-driven cards
+// ---------------------------------------------------------------------------
+
+const ICON_MAP: Record