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

@ -1,3 +1,5 @@
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css");
html, body {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
@ -56,4 +58,29 @@ h1:focus {
.table.clickable tbody tr:hover {
background-color: #e8e8e8;
}
.panel {
display: flex;
flex-direction: column;
}
.panel .header {
display: flex;
}
.panel .header .status {
flex-grow: 1;
}
.panel .header .buttons {}
.panel .console {
background-color: #000000;
color: #ffffff;
width: 80%;
margin: auto;
height: 800px;
overflow: auto;
padding: 5px;
}

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);
}
}
}