Start minimalist UI

This commit is contained in:
nemunaire 2021-05-02 16:04:18 +02:00
commit cce72978bf
8 changed files with 123 additions and 0 deletions

26
ui/js/minifass.js Normal file
View file

@ -0,0 +1,26 @@
function getVersion() {
fetch('/api/version')
.then(function(response) {
return response.json();
})
.then(function(version) {
document.getElementById("version").innerHTML = "v" + version.version;
});
}
function runctnr() {
document.getElementById("btnlaunch").disabled = true;
document.getElementById("btnlaunchspinner").style.display = "inline-block";
fetch('/api/run')
.then(function(response) {
document.getElementById("btnlaunch").disabled = false;
document.getElementById("btnlaunchspinner").style.display = "none";
return response.text();
})
.then(function(logs) {
document.getElementById("logs").textContent = logs;
document.getElementById("logs-card").style.display = "block";
})
return false;
}