add web
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
{% extends '__layout__.html' %}
|
||||
{% block title %}Admin{% endblock %}
|
||||
{% block head %}
|
||||
<link href="/static/css/admin.css" rel="stylesheet"/> <!-- Its just easier to resuse this-->
|
||||
<style>
|
||||
.text-secondary {
|
||||
color: rgb(175, 175, 175) !important;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div id="main">
|
||||
<div class="container">
|
||||
<a href="/admin/gameservers" class="btn border-primary btn-sm mb-2">Back to Game Server Manager</a>
|
||||
<h1>Create Server</h1>
|
||||
<div class="linebreak"></div>
|
||||
{% with messages = get_flashed_messages() %}
|
||||
{% if messages %}
|
||||
<div>
|
||||
{% for message in messages %}
|
||||
<div class="alert border border-danger p-2 text-center messagealerts">
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
<form method="post" action="/admin/gameservers/create">
|
||||
<div class="mb-2">
|
||||
<label for="serverNameInput" class="form-label m-0">Server name</label>
|
||||
<input type="text" class="form-control" id="serverNameInput" name="name" placeholder="Name" required>
|
||||
</div>
|
||||
<div class="mb-2">
|
||||
<label for="serverIPinput" class="form-label m-0">Server IP</label>
|
||||
<input type="text" class="form-control" id="serverIPinput" name="serverip" placeholder="1.1.1.1" required>
|
||||
</div>
|
||||
<div class="mb-2">
|
||||
<label for="serverPortInput" class="form-label m-0">Server Port</label>
|
||||
<input type="number" class="form-control" id="serverPortInput" name="serverport" placeholder="80" required>
|
||||
</div>
|
||||
<div class="mb-2">
|
||||
<label for="serverAccessKeyInput" class="form-label m-0">Access Key</label>
|
||||
<input type="password" class="form-control" id="serverAccessKeyInput" name="accesskey" placeholder="Access Key" required>
|
||||
</div>
|
||||
<div class="mb-2 row">
|
||||
<div class="col">
|
||||
<input class="form-check-input" name="isThumbnailer" type="checkbox" id="isThumbnailerCheckbox" checked>
|
||||
<label class="form-check-label" for="isThumbnailerCheckbox">
|
||||
<p>Allow Thumbnail Rendering</p>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col">
|
||||
<input class="form-check-input" name="isGameHoster" type="checkbox" id="isGameHosterCheckbox" checked>
|
||||
<label class="form-check-label" for="isGameHosterCheckbox">
|
||||
<p>Allow Game server hosting</p>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
||||
<button type="submit" class="btn btn-primary btn-sm w-100 fw-bold">Create</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,24 @@
|
||||
{% extends '__layout__.html' %}
|
||||
{% block title %}Admin{% endblock %}
|
||||
{% block head %}
|
||||
<link href="/static/css/admin.css" rel="stylesheet"/> <!-- Its just easier to resuse this-->
|
||||
<style>
|
||||
.text-secondary {
|
||||
color: rgb(175, 175, 175) !important;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div id="main">
|
||||
<div class="container">
|
||||
<h1>Are you sure?</h1>
|
||||
<p class="m-0 d-flex text-secondary">You are deleting {{gameserver.serverName}} ( {{gameserver.serverId}} )</p>
|
||||
<form method="post" class="mt-2">
|
||||
<input type="hidden" name="csrf_token" value="{{csrf_token()}}">
|
||||
<input type="hidden" name="serverId" value="{{gameserver.serverId}}">
|
||||
<input type="submit" class="btn btn-danger" value="Delete">
|
||||
<a class="btn border-primary" href="/admin/gameservers/{{gameserver.serverId}}">Back</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,47 @@
|
||||
{% extends '__layout__.html' %}
|
||||
{% block title %}Admin{% endblock %}
|
||||
{% block head %}
|
||||
<link href="/static/css/admin.css" rel="stylesheet"/> <!-- Its just easier to resuse this-->
|
||||
<style>
|
||||
.text-secondary {
|
||||
color: rgb(175, 175, 175) !important;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div id="main">
|
||||
<div class="container">
|
||||
<a href="/admin" class="btn border-primary btn-sm mb-2">Back to Admin Panel</a><a href="/admin/gameservers/create" class="btn border-success btn-sm mb-2 ms-2">Create server</a>
|
||||
<h1>Game Server Manager</h1>
|
||||
<p class="m-0 d-flex text-secondary">Please be careful when adding and editing gameservers!</p>
|
||||
<div class="linebreak"></div>
|
||||
<div class="row">
|
||||
{% for gameserver in gameservers %}
|
||||
<div class="col-12">
|
||||
<a href="/admin/gameservers/{{gameserver.serverId}}">
|
||||
<div class="gameserver-box rounded border p-2 mb-2 {% if not gameserver.isRCCOnline: %}redborder {% else %} {% if gameserver.heartbeatResponseTime > 0.6 %}yellowborder{% else %}greenborder{% endif %}{% endif %}">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<h2 class="m-0">{{gameserver.serverName}}</h2>
|
||||
<p class="m-0 text-secondary">{{gameserver.serverId}}</p>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<p class="text-secondary m-0">Last heartbeat: <span class="text-white">{{gameserver.lastHeartbeat}}</span></p>
|
||||
<p class="text-secondary m-0">RCC Memory Usage: <span class="text-white">{{gameserver.RCCmemoryUsage}} MB</span></p>
|
||||
<p class="text-secondary m-0">Response Time: <span class="text-white">{{ round(gameserver.heartbeatResponseTime,3) }} secs</span></p>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<p class="text-secondary m-0">Thumbnail Queue Size: <span class="text-white">{{gameserver.thumbnailQueueSize}}</span></p>
|
||||
<p class="text-secondary m-0">isThumbnailer: <span class="text-white">{{gameserver.allowThumbnailGen}}</span></p>
|
||||
<p class="text-secondary m-0">isGameHoster: <span class="text-white">{{ gameserver.allowGameServerHost }}</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="linebreak"></div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,24 @@
|
||||
{% extends '__layout__.html' %}
|
||||
{% block title %}Admin{% endblock %}
|
||||
{% block head %}
|
||||
<link href="/static/css/admin.css" rel="stylesheet"/> <!-- Its just easier to resuse this-->
|
||||
<style>
|
||||
.text-secondary {
|
||||
color: rgb(175, 175, 175) !important;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div id="main">
|
||||
<div class="container">
|
||||
<h1>Are you sure?</h1>
|
||||
<p class="m-0 d-flex text-secondary">Are you sure you want to refresh the AccessKey for {{gameserver.serverName}} ( {{gameserver.serverId}} )</p>
|
||||
<form method="post" class="mt-2">
|
||||
<input type="hidden" name="csrf_token" value="{{csrf_token()}}">
|
||||
<input type="hidden" name="serverId" value="{{gameserver.serverId}}">
|
||||
<button type="submit" class="btn btn-light"><i class="bi bi-arrow-clockwise"></i> Refresh Key</button>
|
||||
<a class="btn border-primary" href="/admin/gameservers/{{gameserver.serverId}}">Back</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,84 @@
|
||||
{% extends '__layout__.html' %}
|
||||
{% block title %}Admin{% endblock %}
|
||||
{% block head %}
|
||||
<link href="/static/css/admin.css" rel="stylesheet"/> <!-- Its just easier to resuse this-->
|
||||
<style>
|
||||
.text-secondary {
|
||||
color: rgb(175, 175, 175) !important;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div id="main">
|
||||
<div class="container">
|
||||
<div class="d-flex align-items-center">
|
||||
<a href="/admin/gameservers" class="btn border-primary btn-sm mb-2">Back to Game Server Manager</a>
|
||||
<a href="/admin/gameservers/{{gameserver.serverId}}/delete" class="btn border-danger btn-sm mb-2 ms-2">Delete Server</a>
|
||||
<a href="/admin/gameservers/{{gameserver.serverId}}/refresh-accesskey" class="btn border-success btn-sm mb-2 ms-2">Refresh AccessKey</a>
|
||||
</div>
|
||||
<h1 class="m-0">{{gameserver.serverName}}</h1>
|
||||
<p class="m-0 d-flex">{{gameserver.serverId}}</p>
|
||||
<div class="p-2 border mt-2 mb-2 rounded {% if not gameserver.isRCCOnline: %}redborder {% else %} {% if gameserver.heartbeatResponseTime > 0.6 %}yellowborder{% else %}greenborder{% endif %}{% endif %}">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<p class="text-secondary m-0">Last heartbeat: <span class="text-white">{{gameserver.lastHeartbeat}}</span></p>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<p class="text-secondary m-0">RCC Memory Usage: <span class="text-white">{{gameserver.RCCmemoryUsage}} MB</span></p>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<p class="text-secondary m-0">Response Time: <span class="text-white">{{ round(gameserver.heartbeatResponseTime,3) }} secs</span></p>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<p class="text-secondary m-0">Thumbnail Queue Size: <span class="text-white">{{gameserver.thumbnailQueueSize}}</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% with messages = get_flashed_messages() %}
|
||||
{% if messages %}
|
||||
<div>
|
||||
{% for message in messages %}
|
||||
<div class="alert border border-danger p-2 text-center messagealerts">
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
<form method="post" action="/admin/gameservers/{{gameserver.serverId}}/edit">
|
||||
<div class="mb-2">
|
||||
<label for="serverNameInput" class="form-label m-0">Server name</label>
|
||||
<input type="text" class="form-control" id="serverNameInput" name="name" placeholder="Name" value="{{gameserver.serverName}}" required>
|
||||
</div>
|
||||
<div class="mb-2">
|
||||
<label for="serverIPinput" class="form-label m-0">Server IP</label>
|
||||
<input type="text" class="form-control" id="serverIPinput" name="serverip" placeholder="1.1.1.1" value="{{gameserver.serverIP}}" required>
|
||||
</div>
|
||||
<div class="mb-2">
|
||||
<label for="serverPortInput" class="form-label m-0">Server Port</label>
|
||||
<input type="number" class="form-control" id="serverPortInput" name="serverport" placeholder="80" value="{{gameserver.serverPort}}" required>
|
||||
</div>
|
||||
<div class="mb-2">
|
||||
<label for="serverAccessKeyInput" class="form-label m-0">Access Key</label>
|
||||
<input type="password" class="form-control" id="serverAccessKeyInput" name="accesskey" placeholder="Access Key" value="{{gameserver.accessKey}}" required>
|
||||
</div>
|
||||
<div class="mb-2 row">
|
||||
<div class="col">
|
||||
<input class="form-check-input" name="isThumbnailer" type="checkbox" id="isThumbnailerCheckbox" {% if gameserver.allowThumbnailGen: %}checked{% endif %}>
|
||||
<label class="form-check-label" for="isThumbnailerCheckbox">
|
||||
<p>Allow Thumbnail Rendering</p>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col">
|
||||
<input class="form-check-input" name="isGameHoster" type="checkbox" id="isGameHosterCheckbox" {% if gameserver.allowGameServerHost: %}checked{% endif %}>
|
||||
<label class="form-check-label" for="isGameHosterCheckbox">
|
||||
<p>Allow Game server hosting</p>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
||||
<button type="submit" class="btn btn-primary btn-sm w-100 fw-bold">Save</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user