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:
@ -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;
|
||||
}
|
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