Initial Awawawa
This commit is contained in:
15
web/patchbay_web/static/services.js
Normal file
15
web/patchbay_web/static/services.js
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
document.getElementById("refresh-services").addEventListener("click", async (ev) => {
|
||||
const btn = ev.currentTarget;
|
||||
btn.disabled = true;
|
||||
btn.textContent = "Refreshing...";
|
||||
try {
|
||||
await PB.api("POST", "/api/services/refresh");
|
||||
// Clients answer asynchronously over their control channel.
|
||||
setTimeout(() => location.reload(), 1500);
|
||||
} catch (e) {
|
||||
btn.textContent = "Failed: " + e.message;
|
||||
btn.disabled = false;
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user