mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2024-12-09 08:50:05 +08:00
Added Platform Information on Status Page
This commit is contained in:
parent
6b65f0fc74
commit
b5acf56e20
@ -9,6 +9,7 @@ import os
|
||||
import json
|
||||
import asyncio
|
||||
import redis
|
||||
import platform
|
||||
from datetime import datetime
|
||||
import logging
|
||||
from logging.config import dictConfig
|
||||
@ -485,7 +486,8 @@ async def get_host_stats(wait=5):
|
||||
"swap": psutil.swap_memory()
|
||||
},
|
||||
"uptime": time.time() - psutil.boot_time(),
|
||||
"system_time": system_time.strftime("%d.%m.%Y %H:%M:%S")
|
||||
"system_time": system_time.strftime("%d.%m.%Y %H:%M:%S"),
|
||||
"architecture": platform.machine()
|
||||
}
|
||||
|
||||
redis_client.set('host_stats', json.dumps(host_stats), ex=10)
|
||||
|
@ -43,7 +43,7 @@ $(document).ready(function() {
|
||||
if (mailcow_info.branch === "master"){
|
||||
check_update(mailcow_info.version_tag, mailcow_info.project_url);
|
||||
}
|
||||
$("#maiclow_version").click(function(){
|
||||
$("#mailcow_version").click(function(){
|
||||
if (mailcow_cc_role !== "admin" && mailcow_cc_role !== "domainadmin" || mailcow_info.branch !== "master")
|
||||
return;
|
||||
|
||||
@ -1302,6 +1302,12 @@ function update_stats(timeout=5){
|
||||
$("#host_cpu_usage").text(parseInt(data.cpu.usage).toString() + "%");
|
||||
$("#host_memory_total").text((data.memory.total / (1024 ** 3)).toFixed(2).toString() + "GB");
|
||||
$("#host_memory_usage").text(parseInt(data.memory.usage).toString() + "%");
|
||||
if (data.architecture == "aarch64"){
|
||||
$("#host_architecture").html('<span data-bs-toggle="tooltip" data-bs-placement="top" title="' + lang_debug.wip +'">' + data.architecture + ' ⚠️</span>');
|
||||
}
|
||||
else {
|
||||
$("#host_architecture").html(data.architecture);
|
||||
}
|
||||
|
||||
// update cpu and mem chart
|
||||
var cpu_chart = Chart.getChart("host_cpu_chart");
|
||||
|
@ -498,6 +498,7 @@
|
||||
}
|
||||
},
|
||||
"debug": {
|
||||
"architecture": "Architektur",
|
||||
"chart_this_server": "Chart (dieser Server)",
|
||||
"containers_info": "Container-Information",
|
||||
"container_running": "Läuft",
|
||||
@ -534,7 +535,8 @@
|
||||
"update_available": "Es ist ein Update verfügbar",
|
||||
"no_update_available": "Das System ist auf aktuellem Stand",
|
||||
"update_failed": "Es konnte nicht nach einem Update gesucht werden",
|
||||
"username": "Benutzername"
|
||||
"username": "Benutzername",
|
||||
"wip": "Aktuell noch in Arbeit"
|
||||
},
|
||||
"diagnostics": {
|
||||
"cname_from_a": "Wert abgeleitet von A/AAAA-Eintrag. Wird unterstützt, sofern der Eintrag auf die korrekte Ressource zeigt.",
|
||||
|
@ -498,6 +498,7 @@
|
||||
}
|
||||
},
|
||||
"debug": {
|
||||
"architecture": "Architecture",
|
||||
"chart_this_server": "Chart (this server)",
|
||||
"containers_info": "Container information",
|
||||
"container_running": "Running",
|
||||
@ -534,7 +535,8 @@
|
||||
"update_available": "There is an update available",
|
||||
"no_update_available": "The System is on the latest version",
|
||||
"update_failed": "Could not check for an Update",
|
||||
"username": "Username"
|
||||
"username": "Username",
|
||||
"wip": "Currently Work in Progress"
|
||||
},
|
||||
"diagnostics": {
|
||||
"cname_from_a": "Value derived from A/AAAA record. This is supported as long as the record points to the correct resource.",
|
||||
|
@ -49,6 +49,12 @@
|
||||
<p><b>{{ hostname }}</b></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ lang.debug.architecture }}</td>
|
||||
<td class="text-break"><div>
|
||||
<p id="host_architecture">-</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>IPs</td>
|
||||
<td class="text-break">
|
||||
@ -70,7 +76,7 @@
|
||||
<td>Version</td>
|
||||
<td class="text-break">
|
||||
<div class="fw-bolder">
|
||||
<p ><a href="#" id="maiclow_version">{{ mailcow_info.version_tag }}</a></p>
|
||||
<p ><a href="#" id="mailcow_version">{{ mailcow_info.version_tag }}</a></p>
|
||||
<p id="mailcow_update"></p>
|
||||
</div>
|
||||
</td>
|
||||
|
Loading…
Reference in New Issue
Block a user