Add Database Admin Dashboard with SQL query execution#3660
Draft
Add Database Admin Dashboard with SQL query execution#3660
Conversation
Adds a new read-only database admin dashboard tab that enables operators to: - Browse available database tables per registered DataSource - View table schemas (columns, types, nullability) - Execute read-only SQL queries with comprehensive validation - View results in a paginated table Backend: - AdminDatabaseEntry in misk-jdbc auto-registers writer DataSources via JdbcModule - DatabaseQueryAction validates and executes queries on read-only connections - Multi-layered safety: SQL prefix checks, forbidden keyword rejection, statement limits Frontend: - SSR page (Hotwire + Tailwind CSS) with database selector dropdown - Table list sidebar with schema viewer - Query editor with Stimulus-driven form submission - Results displayed in turbo-frame Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add sample tables (customers, products, orders, order_items) with seed data to Exemplar service main resources for demonstrating the database admin dashboard - Add screenshots showing: landing page, database/table selection, schema view, query results, and error validation - Fix th() overload resolution by using named `classes` parameter - Fix return@build in non-inline lambda by restructuring to if/else Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a new read-only database admin dashboard tab that enables operators to browse tables, view schemas, and execute read-only SQL queries.
Features:
Backend:
AdminDatabaseEntryin misk-jdbc auto-registers writer DataSources via JdbcModule (zero-config)DatabaseQueryActionvalidates and executes queries on read-only JDBC connectionsFrontend:
Screenshots
Landing Page
Database Selected with Table List
Table Schema View
Query Results
Query Validation Error
Exemplar Sample Service
Added sample migrations to the Exemplar service (
samples/exemplar/src/main/resources/migrations/exemplar/) with:customers,products,orders,order_itemstablesRun with MySQL locally:
gradle :samples:exemplar:runand navigate to/_admin/database-beta/Testing Strategy
Manual testing in a service with JdbcModule + AdminDashboardModule:
/_admin/database-beta/Checklist
isReadOnly = true+ rollback)🤖 Generated with Claude Code