public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
PHP
49%
JavaScript
35%
HTML
9%
CSS
4%
Shell
2%
Python
1%
Lua
0%
Perl
0%
Ruby
0%
SCSS
0%
Create file
Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git
Commit
Added Platform Information on Status Page
b5acf56e
data/Dockerfiles/dockerapi/dockerapi.py | 4 +++-
data/web/js/site/debug.js | 8 +++++++-
data/web/lang/lang.de-de.json | 4 +++-
data/web/lang/lang.en-gb.json | 4 +++-
data/web/templates/debug.twig | 8 +++++++-
5 files changed, 23 insertions(+), 5 deletions(-)
Diff
diff --git a/data/Dockerfiles/dockerapi/dockerapi.py b/data/Dockerfiles/dockerapi/dockerapi.py
index 1ab651b5..63436b62 100644
--- a/data/Dockerfiles/dockerapi/dockerapi.py
+++ b/data/Dockerfiles/dockerapi/dockerapi.py
@@ -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)
diff --git a/data/web/js/site/debug.js b/data/web/js/site/debug.js
index 55b6660b..78a4ccaa 100644
--- a/data/web/js/site/debug.js
+++ b/data/web/js/site/debug.js
@@ -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");
diff --git a/data/web/lang/lang.de-de.json b/data/web/lang/lang.de-de.json
index 4bd4b3fa..e1cfee1b 100644
--- a/data/web/lang/lang.de-de.json
+++ b/data/web/lang/lang.de-de.json
@@ -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.",
diff --git a/data/web/lang/lang.en-gb.json b/data/web/lang/lang.en-gb.json
index df83987c..56a5bf90 100644
--- a/data/web/lang/lang.en-gb.json
+++ b/data/web/lang/lang.en-gb.json
@@ -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.",
diff --git a/data/web/templates/debug.twig b/data/web/templates/debug.twig
index d24d7ed6..adc19b26 100644
--- a/data/web/templates/debug.twig
+++ b/data/web/templates/debug.twig
@@ -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>