feat(panel): basic server control panel page

This commit is contained in:
2024-05-29 21:19:32 +02:00
parent 6ff9faf741
commit 51251ee5a1
5 changed files with 149 additions and 0 deletions

View File

@ -0,0 +1,9 @@
window.serverLogsStream = {
start: (dotNetObject, serverId) => {
const logs = new EventSource(`http://localhost:8080/api/admin/servers/${serverId}/logs`, { withCredentials: true });
logs.onmessage = event => {
dotNetObject.invokeMethodAsync("ReceiveLog", event.data);
}
}
}