Skip to content

Commit

Permalink
Add more db information to the site information page.
Browse files Browse the repository at this point in the history
db product and version, driver product and version
db username, schema and database used.
  • Loading branch information
ianwallen committed Oct 5, 2023
1 parent c92f465 commit defcedc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,13 @@ private void loadDatabaseInfo(ServiceContext context) throws SQLException {
connection = context.getBean(DataSource.class).getConnection();
dbURL = connection.getMetaData().getURL();
databaseProperties.put("db.openattempt", "Database Opened Successfully");
databaseProperties.put("db.product", connection.getMetaData().getDatabaseProductName());
databaseProperties.put("db.version", connection.getMetaData().getDatabaseProductVersion());
databaseProperties.put("db.driver", connection.getMetaData().getDriverName());
databaseProperties.put("db.driverVersion", connection.getMetaData().getDriverVersion());
databaseProperties.put("db.username", connection.getMetaData().getUserName());
databaseProperties.put("db.schema", connection.getSchema());
databaseProperties.put("db.name", connection.getCatalog());

if (connection instanceof BasicDataSource) {
BasicDataSource basicDataSource = (BasicDataSource) connection;
Expand Down
7 changes: 7 additions & 0 deletions web-ui/src/main/resources/catalog/locales/en-admin.json
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,13 @@
"db.numidle": "Available connections",
"db.openattempt": "Status",
"db.url": "JDBC URL",
"db.product": "DB Product",
"db.version": "DB Version",
"db.driver": "JDBC Driver",
"db.driverVersion": "JDBC Driver Version",
"db.username": "DB username",
"db.schema": "DB Schema",
"db.name": "DB Name",
"dbInformation": "Database",
"dbUrl": "Database",
"defineCatalogLogo": "Define the logo to use for the catalog",
Expand Down

0 comments on commit defcedc

Please sign in to comment.