added config values to dashboard

This commit is contained in:
Oscar Krause
2023-01-03 15:03:09 +01:00
parent bcba15bde4
commit 9932ff58d8
2 changed files with 20 additions and 0 deletions

View File

@@ -1,3 +1,14 @@
async function fetchConfig(element) {
let xhr = new XMLHttpRequest();
xhr.open("GET", '/-/config', true);
xhr.onreadystatechange = function () {
if (xhr.readyState === XMLHttpRequest.DONE && xhr.status === 200) {
element.innerHTML = JSON.stringify(JSON.parse(xhr.response),null,2);
}
};
xhr.send();
}
async function fetchOriginsWithLeases(element) {
let xhr = new XMLHttpRequest();
xhr.open("GET", '/-/origins?leases=true', true);