Allow database stats downloads (#738)

* Add button to download database stats
* Return xml as well
This commit is contained in:
Dan Sosedoff
2024-05-25 10:59:23 -07:00
committed by GitHub
parent 63f1150056
commit 3a32f531a0
4 changed files with 54 additions and 9 deletions

View File

@@ -660,7 +660,7 @@ function showPaginatedTableContent() {
showTableContent(sortColumn, sortOrder);
}
function showTablesStats() {
function showDatabaseStats() {
getTablesStats(function(data) {
buildTable(data);
@@ -671,6 +671,10 @@ function showTablesStats() {
});
}
function downloadDatabaseStats() {
openInNewWindow("api/tables_stats", { format: "csv", export: "true" });
}
function showTableStructure() {
var name = getCurrentObject().name;
@@ -1267,8 +1271,11 @@ function bindCurrentDatabaseMenu() {
var menuItem = $(e.target);
switch(menuItem.data("action")) {
case "show_tables_stats":
showTablesStats();
case "show_db_stats":
showDatabaseStats();
break;
case "download_db_stats":
downloadDatabaseStats();
break;
case "export":
openInNewWindow("api/export");