Browse Source

0.8.135

* translated `/system` #1717
main
lumapu 5 months ago
parent
commit
d7007b354d
  1. 3
      src/CHANGES.md
  2. 2
      src/defines.h
  3. 1
      src/web/RestApi.h
  4. 40
      src/web/html/system.html
  5. 75
      src/web/lang.json

3
src/CHANGES.md

@ -1,5 +1,8 @@
# Development Changes # Development Changes
## 0.8.135 - 2024-08-11
* translated `/system` #1717
## 0.8.134 - 2024-08-10 ## 0.8.134 - 2024-08-10
* combined Ethernet and WiFi variants - Ethernet is now always included, but needs to be enabled if needed * combined Ethernet and WiFi variants - Ethernet is now always included, but needs to be enabled if needed
* improved statistic data in `/system` * improved statistic data in `/system`

2
src/defines.h

@ -13,7 +13,7 @@
//------------------------------------- //-------------------------------------
#define VERSION_MAJOR 0 #define VERSION_MAJOR 0
#define VERSION_MINOR 8 #define VERSION_MINOR 8
#define VERSION_PATCH 134 #define VERSION_PATCH 135
//------------------------------------- //-------------------------------------
typedef struct { typedef struct {
uint8_t ch; uint8_t ch;

1
src/web/RestApi.h

@ -808,6 +808,7 @@ class RestApi {
obj[F("wired")] = isWired; obj[F("wired")] = isWired;
#else #else
obj[F("wired")] = false;
obj[F("wifi_channel")] = WiFi.channel(); obj[F("wifi_channel")] = WiFi.channel();
#endif #endif

40
src/web/html/system.html

@ -72,16 +72,16 @@
if(obj.radioNrf.en) { if(obj.radioNrf.en) {
lines = [ lines = [
tr("NRF24L01", badge(obj.radioNrf.isconnected, ((obj.radioNrf.isconnected) ? "" : "not ") + "connected")), tr("NRF24L01", badge(obj.radioNrf.isconnected, ((obj.radioNrf.isconnected) ? "" : "{#NOT} ") + "{#CONNECTED}")),
tr("Interrupt Pin working", irqBadge(obj.radioNrf.irqOk)), tr("{#INTR_PIN_WORKING}", irqBadge(obj.radioNrf.irqOk)),
tr("NRF24 Data Rate", dr[obj.radioNrf.dataRate] + "bps"), tr("NRF24 {#DATA_RATE}", dr[obj.radioNrf.dataRate] + "bps"),
tr("DTU Radio ID", obj.radioNrf.sn) tr("DTU {#RADIO} ID", obj.radioNrf.sn)
]; ];
} else } else
lines = [tr("NRF24L01", badge(false, "not enabled"))]; lines = [tr("NRF24L01", badge(false, "{#NOT} {#ENABLED}"))];
document.getElementById("info").append( document.getElementById("info").append(
headline("Radio NRF24"), headline("{#RADIO} NRF24"),
ml("table", {class: "table"}, ml("table", {class: "table"},
ml("tbody", {}, lines) ml("tbody", {}, lines)
) )
@ -90,15 +90,15 @@
/*IF_ESP32*/ /*IF_ESP32*/
if(obj.radioCmt.en) { if(obj.radioCmt.en) {
cmt = [ cmt = [
tr("CMT2300A", badge(obj.radioCmt.isconnected, ((obj.radioCmt.isconnected) ? "" : "not ") + "connected")), tr("CMT2300A", badge(obj.radioCmt.isconnected, ((obj.radioCmt.isconnected) ? "" : "{#NOT} ") + "{#CONNECTED}")),
tr("Interrupt Pin working", irqBadge(obj.radioCmt.irqOk)), tr("{#INTR_PIN_WORKING}", irqBadge(obj.radioCmt.irqOk)),
tr("DTU Radio ID", obj.radioCmt.sn) tr("DTU {#RADIO} ID", obj.radioCmt.sn)
]; ];
} else } else
cmt = [tr("CMT2300A", badge(false, "not enabled"))]; cmt = [tr("CMT2300A", badge(false, "{#NOT} {#ENABLED}"))];
document.getElementById("info").append( document.getElementById("info").append(
headline("Radio CMT"), headline("{#RADIO} CMT"),
ml("table", {class: "table"}, ml("table", {class: "table"},
ml("tbody", {}, cmt) ml("tbody", {}, cmt)
) )
@ -108,7 +108,7 @@
function parseNetwork(obj, gen) { function parseNetwork(obj, gen) {
lines = [ lines = [
tr("connection", ((obj.wired) ? "{#WIRED}" : "{#WIFI} (SSID: " + obj.ssid + ", RSSI: " + gen.wifi_rssi + ", CH: " + obj.wifi_channel + ")")), tr("{#CONNECTION}", ((obj.wired) ? "{#WIRED}" : "{#WIFI} (SSID: " + obj.ssid + ", RSSI: " + gen.wifi_rssi + ", CH: " + obj.wifi_channel + ")")),
tr("Hostname", gen.host), tr("Hostname", gen.host),
tr("IP {#ADDRESS}", obj.ip), tr("IP {#ADDRESS}", obj.ip),
tr("MAC {#ADDRESS}", obj.mac) tr("MAC {#ADDRESS}", obj.mac)
@ -125,7 +125,7 @@
function parseMqtt(obj) { function parseMqtt(obj) {
if(obj.enabled) { if(obj.enabled) {
lines = [ lines = [
tr("connected", badge(obj.connected, ((obj.connected) ? "true" : "false"))), tr("{#CONNECTED}", badge(obj.connected, ((obj.connected) ? "true" : "false"))),
tr("#TX", obj.tx_cnt), tr("#TX", obj.tx_cnt),
tr("#RX", obj.rx_cnt) tr("#RX", obj.rx_cnt)
] ]
@ -143,11 +143,11 @@
function parseMemory(obj) { function parseMemory(obj) {
lines = [ lines = [
tr("Flash size", obj.flash_size / 1024 / 1024 + "MB"), tr("{#FLASH_SIZE}", obj.flash_size / 1024 / 1024 + "MB"),
tr("{#CONFIG_PARTITION} (" + Math.round(obj.par_used_spiffs / 1024) + "kB of " + obj.par_size_spiffs / 1024 + "kB)", progress(obj.par_used_spiffs / obj.par_size_spiffs * 100)), tr("{#CONFIG_PARTITION} (" + Math.round(obj.par_used_spiffs / 1024) + "kB of " + obj.par_size_spiffs / 1024 + "kB)", progress(obj.par_used_spiffs / obj.par_size_spiffs * 100)),
tr("{#FIRMWARE_PARTITION} (" + Math.round(obj.par_used_app0 / 1024) + "kB of " + obj.par_size_app0 / 1024 + "kB)", progress(obj.par_used_app0 / obj.par_size_app0 * 100)), tr("{#FIRMWARE_PARTITION} (" + Math.round(obj.par_used_app0 / 1024) + "kB of " + obj.par_size_app0 / 1024 + "kB)", progress(obj.par_used_app0 / obj.par_size_app0 * 100)),
tr("Heap (" + Math.round(obj.heap_free / 1024) + "kB of " + Math.round(obj.heap_total / 1024) + "kB)", progress(obj.heap_free / obj.heap_total * 100)), tr("Heap (" + Math.round(obj.heap_free / 1024) + "kB of " + Math.round(obj.heap_total / 1024) + "kB)", progress(obj.heap_free / obj.heap_total * 100)),
tr("Heap max free block", Math.round(obj.heap_max_free_blk / 1024) + "kB (Fragmentation: " + obj.heap_frag + ")") tr("Heap {#MAX_FREE_BLOCK}", Math.round(obj.heap_max_free_blk / 1024) + "kB (Fragmentation: " + obj.heap_frag + ")")
] ]
document.getElementById("info").append( document.getElementById("info").append(
@ -164,11 +164,11 @@
headline("Sun"), headline("Sun"),
ml("table", {class: "table"}, ml("table", {class: "table"},
ml("tbody", {}, [ ml("tbody", {}, [
tr("sunrise", new Date(obj.ts_sunrise * 1000).toLocaleString('de-DE')), tr("{#SUNRISE}", new Date(obj.ts_sunrise * 1000).toLocaleString('de-DE')),
tr("sunset", new Date(obj.ts_sunset * 1000).toLocaleString('de-DE')), tr("{#SUNSET}", new Date(obj.ts_sunset * 1000).toLocaleString('de-DE')),
tr("Communication start", new Date((obj.ts_sunrise + obj.ts_offsSr) * 1000).toLocaleString('de-DE')), tr("{#COMMUNICATION_START}", new Date((obj.ts_sunrise + obj.ts_offsSr) * 1000).toLocaleString('de-DE')),
tr("Communication stop", new Date((obj.ts_sunset + obj.ts_offsSs) * 1000).toLocaleString('de-DE')), tr("{#COMMUNICATION_STOP}", new Date((obj.ts_sunset + obj.ts_offsSs) * 1000).toLocaleString('de-DE')),
tr("Night behaviour", badge(obj.disNightComm, ((obj.disNightComm) ? "not" : "") + " communicating", "warning")) tr("{#NIGHT_BEHAVIOR}", badge(obj.disNightComm, ((obj.disNightComm) ? "{#NOT}" : "") + " {#COMMUNICATING}", "warning"))
]) ])
) )
); );

75
src/web/lang.json

@ -977,6 +977,81 @@
"token": "FIRMWARE_PARTITION", "token": "FIRMWARE_PARTITION",
"en": "Firmware Partition", "en": "Firmware Partition",
"de": "Firmware" "de": "Firmware"
},
{
"token": "INTR_PIN_WORKING",
"en": "Interrupt Pin working",
"de": "Interrupt Pin funktioniert"
},
{
"token": "DATA_RATE",
"en": "Data Rate",
"de": "Datenrate"
},
{
"token": "RADIO",
"en": "Radio",
"de": "Funkmodul"
},
{
"token": "NOT",
"en": "not",
"de": "nicht"
},
{
"token": "CONNECTED",
"en": "connected",
"de": "verbunden"
},
{
"token": "ENABLED",
"en": "enabled",
"de": "aktiviert"
},
{
"token": "CONNECTION",
"en": "connection",
"de": "Verbindung"
},
{
"token": "FLASH_SIZE",
"en": "Flash size",
"de": "Speichergröße"
},
{
"token": "MAX_FREE_BLOCK",
"en": "max free block",
"de": "maximale freie Blockgröße"
},
{
"token": "SUNRISE",
"en": "sunrise",
"de": "Sonnenaufgang"
},
{
"token": "SUNSET",
"en": "sunset",
"de": "Sonnenuntergang"
},
{
"token": "COMMUNICATION_START",
"en": "Communication start",
"de": "Start der Kommunikation"
},
{
"token": "COMMUNICATION_STOP",
"en": "Communication stop",
"de": "Ende der Kommunikation"
},
{
"token": "NIGHT_BEHAVIOR",
"en": "Night behavior",
"de": "Verhalten bei Nacht"
},
{
"token": "COMMUNICATING",
"en": "communicating",
"de": "kommunizierend"
} }
] ]
}, },

Loading…
Cancel
Save