mirror of
https://gitea.publichub.eu/oscar.krause/fastapi-dls.git
synced 2024-11-10 08:28:49 +00:00
added config values to dashboard
This commit is contained in:
parent
df43a598cd
commit
71c4972e6a
@ -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) {
|
async function fetchOriginsWithLeases(element) {
|
||||||
let xhr = new XMLHttpRequest();
|
let xhr = new XMLHttpRequest();
|
||||||
xhr.open("GET", '/-/origins?leases=true', true);
|
xhr.open("GET", '/-/origins?leases=true', true);
|
||||||
|
@ -28,6 +28,8 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<pre id="config"></pre>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
@ -37,5 +39,12 @@
|
|||||||
function downloadClientToken() {
|
function downloadClientToken() {
|
||||||
window.open('/-/client-token', "_blank")
|
window.open('/-/client-token', "_blank")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function load() {
|
||||||
|
const config = document.getElementById('config')
|
||||||
|
fetchConfig(config)
|
||||||
|
}
|
||||||
|
|
||||||
|
load()
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
Reference in New Issue
Block a user