mirror of
https://github.com/CyberL1/Minecraft-Realms-Emulator.git
synced 2025-06-28 08:09:42 -04:00
feat(panel): basic server control panel page
This commit is contained in:
9
Panel/wwwroot/js/serverLogsStream.js
Normal file
9
Panel/wwwroot/js/serverLogsStream.js
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user