mirror of
https://github.com/danbulant/mysqlExporter
synced 2026-06-20 23:21:28 +00:00
Add list of tables
This commit is contained in:
parent
a6b1a39a0f
commit
c8c1b5abf5
1 changed files with 12 additions and 1 deletions
|
|
@ -138,10 +138,14 @@
|
|||
const appTitle = document.createElement("h1");
|
||||
appTitle.innerText = "Data dictionary of " + db.name;
|
||||
app.appendChild(appTitle);
|
||||
|
||||
const date = document.createElement("p");
|
||||
date.innerText = "Loading table information...";
|
||||
app.appendChild(date);
|
||||
|
||||
const tableList = document.createElement("ul");
|
||||
app.appendChild(tableList);
|
||||
|
||||
var res = await fetch("/tables");
|
||||
var tables = await res.json();
|
||||
var re = await fetch("/fieldsIgnored");
|
||||
|
|
@ -154,7 +158,7 @@
|
|||
var data = tables[table];
|
||||
var tableEl = document.createElement("table");
|
||||
var title = document.createElement("h2");
|
||||
|
||||
title.id = table.replace(/[\s]/g, "");
|
||||
title.innerText = table;
|
||||
app.appendChild(title);
|
||||
|
||||
|
|
@ -164,6 +168,13 @@
|
|||
continue;
|
||||
}
|
||||
|
||||
var tableItem = document.createElement("li");
|
||||
var tableLink = document.createElement("a");
|
||||
tableItem.appendChild(tableLink);
|
||||
tableLink.href = "#" + table.replace(/[\s]/g, "");
|
||||
tableLink.innerText = table;
|
||||
tableList.appendChild(tableItem);
|
||||
|
||||
try {
|
||||
var comment = document.createElement("p");
|
||||
comment.innerText = data.comment[0].table_comment;
|
||||
|
|
|
|||
Loading…
Reference in a new issue