@page "/" @implements IDisposable Chrono DB Hub - Dashboard

Database Test Dashboard

Monitor, manage, and validate all database features referenced in Chrono Cloud

Run All Tests
@if (!string.IsNullOrEmpty(alertMessage)) { } @if (health != null) { @if (!health.IsConnected) {
PostgreSQL Connection Offline

@(health.ErrorMessage ?? "Could not connect to the database server. Ensure PostgreSQL is running on the configured host/port.")

Configure Connection
} else if (health.ProviderType == DatabaseProviderType.InMemory) {
In-Memory Database Active (@health.ConnectionString)
Running zero-config in-memory tests. Full CRUD and test suites are active.
} }
@(health?.IsConnected == true ? health.CardNotesCount.ToString() : "-")
Card Notes
@(health?.IsConnected == true ? health.UsersCount.ToString() : "-")
Users
@(health?.IsConnected == true ? health.UserDecksCount.ToString() : "-")
User Decks
@(health?.IsConnected == true ? health.PasskeysCount.ToString() : "-")
Passkeys
@(health?.ProviderType == DatabaseProviderType.PostgreSQL ? $"{health.AppliedMigrationsCount} / {health.AppliedMigrationsCount + health.PendingMigrationsCount}" : "N/A")
Migrations
Cloud Database Features Under Test
Cloud.AppDbContext
Card Notes Entity (`CardNote`) Manage Notes

Tracks developer and user strategic card notes with primary key indexing on CardName. Supports live search, adding, updating, and deletion.

User Decks & JSONB (`UserDeck`) Manage Decks

Stores full player decks with native PostgreSQL jsonb mapping for Cards list (with counts) and Divers list.

Passkey Credentials (`PasskeyCredential`) Manage Passkeys

Stores WebAuthn / FIDO2 binary credentials (raw byte[] for CredentialId, PublicKey, UserHandle) with counter verification.

Quick Action Hub
@if (ConfigService.ProviderType == DatabaseProviderType.PostgreSQL) { } else { } Open Test Suite Runner
@code { private DatabaseHealthStatus? health; private bool isLoading; private bool isActionBusy; private string? alertMessage; private bool alertIsSuccess; protected override async Task OnInitializedAsync() { ConfigService.OnConfigurationChanged += HandleConfigChanged; await RefreshAsync(); } private async Task RefreshAsync() { isLoading = true; health = await DbService.CheckHealthAsync(); isLoading = false; } private void HandleConfigChanged() { _ = RefreshAsync(); } private async Task SwitchToInMemoryAsync() { ConfigService.SetProvider(DatabaseProviderType.InMemory); var result = await DbService.EnsureDatabaseCreatedAsync(); alertIsSuccess = result.Success; alertMessage = "Switched to In-Memory Test Database. " + result.Message; await RefreshAsync(); } private async Task SwitchToPostgresAsync() { ConfigService.SetProvider(DatabaseProviderType.PostgreSQL); alertIsSuccess = true; alertMessage = "Switched provider to PostgreSQL."; await RefreshAsync(); } private async Task SeedDataAsync() { isActionBusy = true; var result = await DbService.SeedSampleDataAsync(); isActionBusy = false; alertIsSuccess = result.Success; alertMessage = result.Message; await RefreshAsync(); } private async Task ApplyMigrationsAsync() { isActionBusy = true; var result = await DbService.ApplyMigrationsAsync(); isActionBusy = false; alertIsSuccess = result.Success; alertMessage = result.Message; await RefreshAsync(); } private async Task ResetDatabaseAsync() { isActionBusy = true; var result = await DbService.ResetDatabaseAsync(); isActionBusy = false; alertIsSuccess = result.Success; alertMessage = result.Message; await RefreshAsync(); } public void Dispose() { ConfigService.OnConfigurationChanged -= HandleConfigChanged; } }