+ aria-labelledby="heading-{{server['server_data']['server_id']}}" data-parent="#accordionServers">
{{ translate('dashboard', 'cpuUsage', data['lang']) }}
+ title="{{server['stats']['cpu']}}">
+ aria-valuemax="100">
{{server['stats']['cpu']}}%
@@ -452,7 +452,7 @@
{{ translate('dashboard', 'memUsage', data['lang']) }}
+ title="{{server['stats']['mem']}}">
+ aria-valuemin="0" aria-valuemax="100">
{{server['stats']['mem_percent']}}% -
@@ -492,7 +492,7 @@
{% if server['stats']['desc'] != 'False' %}
+ style="overflow-wrap: break-word !important; max-width: 85px !important; overflow: scroll;">
{{ server['stats']['desc'] }}
{% end %}
diff --git a/app/frontend/templates/panel/server_backup.html b/app/frontend/templates/panel/server_backup.html
index d71e0f68..d97c2d14 100644
--- a/app/frontend/templates/panel/server_backup.html
+++ b/app/frontend/templates/panel/server_backup.html
@@ -375,7 +375,7 @@
$('#backup_table').DataTable({
"order": [[1, "desc"]],
- "paging": true,
+ "paging": false,
"lengthChange": false,
"searching": true,
"ordering": true,
diff --git a/app/frontend/templates/public/status.html b/app/frontend/templates/public/status.html
index 2d445f66..0a444158 100644
--- a/app/frontend/templates/public/status.html
+++ b/app/frontend/templates/public/status.html
@@ -6,76 +6,153 @@
{% block title %}Crafty Controller - {{ translate('dashboard', 'dashboard', data['lang']) }}{% end %}
{% block content %}
-
-
-
-
-
-
-
- {{ translate('dashboard', 'server', data['lang']) }} |
- {{ translate('dashboard', 'players', data['lang']) }} |
- {{ translate('dashboard', 'motd', data['lang']) }} |
- {{ translate('dashboard', 'version', data['lang']) }} |
- {{ translate('dashboard', 'status', data['lang']) }} |
-
-
-
- {% if data['running'] != 0 %}
-
- {% end %}
- {% for server in data['servers'] %}
-
-
-
- {{ server['server_data']['server_name'] }}
- |
- {% if server['stats']['int_ping_results'] != 'False' %}
-
- {{ server['stats']['online'] }} / {{ server['stats']['max'] }} {{ translate('dashboard', 'max',
- data['lang']) }}
- |
-
- {% if server['stats']['desc'] != 'False' %}
-
- {{
- server['stats']['desc'] }}
- {% end %}
- |
-
- {% if server['stats']['version'] != 'False' %}
- {{ server['stats']['version'] }}
- {% end %}
- |
- {% else %}
-
-
- |
-
- Crafty can't get infos from this Server
- |
-
-
- |
+
+
+
+
+
+
+
+
+
+ {{ translate('dashboard', 'server', data['lang']) }} |
+ {{ translate('dashboard', 'players', data['lang']) }} |
+ {{ translate('dashboard', 'motd', data['lang']) }} |
+ {{ translate('dashboard', 'version', data['lang']) }} |
+ {{ translate('dashboard', 'status', data['lang']) }} |
+
+
+
+ {% if data['running'] != 0 %}
+
{% end %}
-
- {% if server['stats']['running'] %}
- {{ translate('dashboard', 'online', data['lang'])
- }}
+ {% for server in data['servers'] %}
+ |
+
+
+ {{ server['server_data']['server_name'] }}
+ |
+ {% if server['stats']['int_ping_results'] != 'False' %}
+
+ {{ server['stats']['online'] }} / {{ server['stats']['max'] }} {{ translate('dashboard', 'max',
+ data['lang']) }}
+ |
+
+ {% if server['stats']['desc'] != 'False' %}
+
+ {{
+ server['stats']['desc'] }}
+ {% end %}
+ |
+
+ {% if server['stats']['version'] != 'False' %}
+ {{ server['stats']['version'] }}
+ {% end %}
+ |
{% else %}
- {{ translate('dashboard', 'offline', data['lang'])
- }}
+
+
+ |
+
+ Crafty can't get infos from this Server
+ |
+
+
+ |
{% end %}
-
-
- {% end %}
-
-
-
+
+ {% if server['stats']['running'] %}
+ {{ translate('dashboard', 'online', data['lang'])
+ }}
+ {% else %}
+ {{ translate('dashboard', 'offline', data['lang'])
+ }}
+ {% end %}
+ |
+
+ {% end %}
+
+
+
+
-
+
+
+
+
+
+ {% if data['running'] != 0 %}
+
+ {% end %}
+
+ {% for server in data['servers'] %}
+
+
+
+
+ {% if server['stats']['int_ping_results'] != 'False' %}
+
+
+
+ {% if server['stats']['version'] != 'False' %}
+ {{ server['stats']['version'] }}
+ {% end %}
+
+ {% else %}
+
+
+
+ Crafty can't get infos from this Server
+
+
+
+ {% end %}
+
+
+
+ {% end %}
+
+
+
{% end %}
{% block js %}
@@ -90,17 +167,23 @@
}
function update_one_server_status(server) {
+ /* Normal Screen view */
server_players = document.getElementById('server_players_' + server.id);
server_motd = document.getElementById('server_motd_' + server.id);
server_version = document.getElementById('server_version_' + server.id);
server_online_status = document.getElementById('server_online_status_' + server.id);
+ /* Small Screen view */
+ m_server_players = document.getElementById('m_server_players_' + server.id);
+ m_server_motd = document.getElementById('m_server_motd_' + server.id);
+ m_server_version = document.getElementById('m_server_version_' + server.id);
+ m_server_online_status = document.getElementById('m_server_online_status_' + server.id);
/* TODO Update each element */
if (server.int_ping_results) {
- document.getElementById('sync').innerHTML='';
+ document.getElementById('sync').innerHTML = '';
+ document.getElementById('m_sync').innerHTML = '';
/* Update Players */
- if (server.players)
- {
+ if (server.players) {
server_players.innerHTML = server.online + ` / ` + server.max + ` {{ translate('dashboard', 'max', data['lang']) }}
`
}
@@ -109,36 +192,44 @@
if (server.desc) {
if (server.icon) {
motd = `
`;
+ m_motd = `
`;
}
else {
motd = `
`;
+ m_motd = `
`;
}
motd = motd + `
` + server.desc + ` `;
+ m_motd = m_motd + `
` + server.desc + `
`;
server_motd.innerHTML = motd;
+ m_server_motd.innerHTML = m_motd;
}
/* Version */
- if (server.version)
- {
- server_version.innerHTML = server.version
+ if (server.version) {
+ server_version.innerHTML = server.version;
+ m_server_version.innerHTML = server.version;
}
}
else {
server_players.innerHTML = `
`;
server_motd.innerHTML = `
Crafty can't get infos from this Server `;
- server_version.innerHTML = `
`
+ server_version.innerHTML = `
`;
+ m_server_motd.innerHTML = `
Crafty can't get infos from this Server `;
}
/* Update Online Status */
var online_status = "";
if (server.running) {
online_status = `
{{ translate('dashboard', 'online', data['lang'])}}`;
+ m_online_status = `
` + server.online + ` / ` + server.max + ``;
}
else {
online_status = `
{{ translate('dashboard', 'offline', data['lang'])}}`;
+ m_online_status = `
{{ translate('dashboard', 'offline', data['lang'])}}`;
}
server_online_status.innerHTML = online_status;
+ m_server_online_status.innerHTML = m_online_status;
}
function update_servers_status(data) {
@@ -150,11 +241,10 @@
$(document).ready(function () {
console.log("ready!");
- if (webSocket)
- {
+ if (webSocket) {
webSocket.on('update_server_status', update_servers_status);
}
}());
-{% end %}
+{% end %}
\ No newline at end of file
diff --git a/app/frontend/templates/public_base.html b/app/frontend/templates/public_base.html
index 1254555d..5a6d9bdb 100644
--- a/app/frontend/templates/public_base.html
+++ b/app/frontend/templates/public_base.html
@@ -27,13 +27,11 @@