Database Admin

The Database Admin UI lets you quickly browse and navigate your App's configured RDBMS schemas and tables:

It can be enabled by registering the AdminDatabaseFeature plugin from ServiceStack.Server:

Plugins.Add(new AdminDatabaseFeature());

Which without any additional configuration your App's configured databases will be listed on the home page, including their schemas, tables and any registered named connections:

Selecting a table takes us to a familiar tabular search results grid, similar in appearance and functionality to Locode's Auto UI:

Whilst Locode gives you an entire Auto Management UI with all modifications performed through managed AutoQuery APIs, Database Admin instead focuses on providing a great readonly UX for querying & inspecting your App's data, starting with multiple views or quickly previewing every row in either Pretty JSON format:

Where it will also let you copy every row in JSON format, whilst the Preview tab shows a friendlier view of the row's fields:

The tabular grid is highly personalizable where it lets change the query preferences and display fields for each table, where they're persisted in localStorage and preserved across browser restarts:

Likewise so are the flexible filtering options allowing any number of filters per column:

The number and type of filters are readily available from the Filters dropdown showing all filters grouped under their column name where they're easily cleared per filter, column or using Clear All to clear all filters:

After you've finished customizing your table search view, you can export the data with the Excel button to download the results in CSV Format where it can be opened in your favorite spreadsheet, e.g:

Alternatively the Copy URL button can be used to generate the API data URL to return results in JSON:

Database Admin Customizations

Some customizations is available on the AdminDatabaseFeature plugin where you can control the maximum size of resultsets returned and you can use the DatabaseFilter to control which databases and schemas are displayed as well as changing the labels shown by setting their Alias properties, e.g:

Plugins.Add(new AdminDatabaseFeature {
    QueryLimit = 100,
    DatabasesFilter = dbs => {
        foreach (var db in dbs) 
        {
            if (db.Name == "main")
            {
                db.Alias = "Northwind";
                db.Schemas[0].Alias = "Traders";
            }
            else if (db.Name == "chinook")
            {
                db.Alias = "Chinook";
                db.Schemas[0].Alias = "Music";
            }
        }
    },
});

Feedback Welcome

We hope you'll find the Database Admin feature useful, please let us know what other features you would like in ServiceStack/Discuss.