Start minimalist UI
This commit is contained in:
parent
5598d78e16
commit
cce72978bf
8 changed files with 123 additions and 0 deletions
26
ui/js/minifass.js
Normal file
26
ui/js/minifass.js
Normal 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;
|
||||
}
|
||||
Reference in a new issue