Add server settings view (#768)
This commit is contained in:
@@ -327,6 +327,8 @@
|
||||
<li><a href="#" data-action="show_db_stats">Show Database Stats</a></li>
|
||||
<li><a href="#" data-action="download_db_stats">Download Database Stats</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="#" data-action="server_settings">Show Server Settings</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="#" data-action="export">Export SQL dump</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -99,6 +99,7 @@ function apiCall(method, path, params, cb) {
|
||||
|
||||
function getInfo(cb) { apiCall("get", "/info", {}, cb); }
|
||||
function getConnection(cb) { apiCall("get", "/connection", {}, cb); }
|
||||
function getServerSettings(cb) { apiCall("get", "/server_settings", {}, cb); }
|
||||
function getSchemas(cb) { apiCall("get", "/schemas", {}, cb); }
|
||||
function getObjects(cb) { apiCall("get", "/objects", {}, cb); }
|
||||
function getTables(cb) { apiCall("get", "/tables", {}, cb); }
|
||||
@@ -678,6 +679,17 @@ function downloadDatabaseStats() {
|
||||
openInNewWindow("api/tables_stats", { format: "csv", export: "true" });
|
||||
}
|
||||
|
||||
function showServerSettings() {
|
||||
getServerSettings(function(data) {
|
||||
buildTable(data);
|
||||
|
||||
setCurrentTab("table_content");
|
||||
$("#input").hide();
|
||||
$("#body").prop("class", "full");
|
||||
$("#results").addClass("no-crop");
|
||||
});
|
||||
}
|
||||
|
||||
function showTableStructure() {
|
||||
var name = getCurrentObject().name;
|
||||
|
||||
@@ -1280,6 +1292,9 @@ function bindCurrentDatabaseMenu() {
|
||||
case "download_db_stats":
|
||||
downloadDatabaseStats();
|
||||
break;
|
||||
case "server_settings":
|
||||
showServerSettings();
|
||||
break;
|
||||
case "export":
|
||||
openInNewWindow("api/export");
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user