rename setting to "max buffer size", show used buffer in info

This commit is contained in:
MichaelDvP
2022-12-24 12:06:27 +01:00
parent 1f1feed3ae
commit 945ef2f1b0
10 changed files with 24 additions and 19 deletions

View File

@@ -3,7 +3,6 @@ import type { Translation } from '../i18n-types';
/* eslint-disable */
const de: Translation = {
// ...en as Translation,
LANGUAGE: 'Sprache',
RETRY: 'Neuer Versuch',
LOADING: 'Laden',
@@ -205,7 +204,7 @@ const de: Translation = {
FLASH: 'Flash Speicher (Größe / Geschwindigkeit)',
APPSIZE: 'Programm (Genutzt / Frei)',
FILESYSTEM: 'Dateisystem (Genutzt / Frei)',
BUFFER_SIZE: 'Puffergröße',
BUFFER_SIZE: 'max. Puffergröße',
COMPACT: 'Kompakte Darstellung',
ENABLE_OTA: 'OTA Updates verwenden',
DOWNLOAD_CUSTOMIZATION_TEXT: 'Herunterladen der individuellen Entitätsanpassungen',

View File

@@ -204,7 +204,7 @@ const en: Translation = {
FLASH: 'Flash Chip (Size / Speed)',
APPSIZE: 'Application (Used / Free)',
FILESYSTEM: 'File System (Used / Free)',
BUFFER_SIZE: 'Buffer Size',
BUFFER_SIZE: 'Max Buffer Size',
COMPACT: 'Compact',
ENABLE_OTA: 'Enable OTA Updates',
DOWNLOAD_CUSTOMIZATION_TEXT: 'Download the entity customizations',

View File

@@ -204,7 +204,7 @@ const fr: Translation = {
FLASH: 'Flash Chip (Taille / Vitesse)',
APPSIZE: 'Application (Utilisée / Libre)',
FILESYSTEM: 'File System (Utilisée / Libre)',
BUFFER_SIZE: 'Taille du buffer',
BUFFER_SIZE: 'Max taille du buffer',
COMPACT: 'Compact',
ENABLE_OTA: 'Activer les updates OTA',
DOWNLOAD_CUSTOMIZATION_TEXT: 'Télécharger les personnalisations d\'entités',

View File

@@ -204,7 +204,7 @@ const nl: Translation = {
FLASH: 'Flash Chip (Size / Speed)',
APPSIZE: 'Application (Used / Free)',
FILESYSTEM: 'File System (Used / Free)',
BUFFER_SIZE: 'Buffer Size',
BUFFER_SIZE: 'Max Buffer Size',
COMPACT: 'Compact',
ENABLE_OTA: 'Acitveer OTA Updates',
DOWNLOAD_CUSTOMIZATION_TEXT: 'Download alle custom instellingen',

View File

@@ -204,7 +204,7 @@ const no: Translation = {
FLASH: 'Flash Chip (Størrelse / Hastighet)',
APPSIZE: 'Applikasjon (Brukt / Ledig)',
FILESYSTEM: 'File System (Brukt / Ledig)',
BUFFER_SIZE: 'Buffer Størrelse',
BUFFER_SIZE: 'Max Buffer Størrelse',
COMPACT: 'Komprimere',
ENABLE_OTA: 'Aktiviser OTA oppdateringer',
DOWNLOAD_CUSTOMIZATION_TEXT: 'Last ned objektstilpasninger',

View File

@@ -204,7 +204,7 @@ const pl: BaseTranslation = {
FLASH: 'Flash (rozmiar / taktowanie)',
APPSIZE: 'Aplikacja (wykorzystane / wolne)',
FILESYSTEM: 'System plików (wykorzystane / wolne)',
BUFFER_SIZE: 'Rozmiar bufora',
BUFFER_SIZE: 'maksymalny rozmiar bufora',
COMPACT: 'Kompaktowy',
ENABLE_OTA: 'Aktywuj aktualizacje OTA',
DOWNLOAD_CUSTOMIZATION_TEXT: 'Pobierz personalizacje',

View File

@@ -204,7 +204,7 @@ const se: Translation = {
FLASH: 'Flashminne (Storlek / Hastighet)',
APPSIZE: 'Applikationer (Använt / Ledigt)',
FILESYSTEM: 'Filsystem (Använt / Ledigt)',
BUFFER_SIZE: 'Bufferstorlek',
BUFFER_SIZE: 'Max Bufferstorlek',
COMPACT: 'Komprimera',
ENABLE_OTA: 'Aktivera OTA-uppdateringar',
DOWNLOAD_CUSTOMIZATION_TEXT: 'Ladda ner entitetsanpassningar',

View File

@@ -1265,7 +1265,8 @@ bool System::command_info(const char * value, const int8_t id, JsonObject & outp
node["enum format"] = settings.enum_format;
node["analog enabled"] = settings.analog_enabled;
node["telnet enabled"] = settings.telnet_enabled;
node["web log buffer"] = settings.weblog_buffer;
node["max web log buffer"] = settings.weblog_buffer;
node["web log buffered"] = EMSESP::webLogService.num_log_messages();
});
// Devices - show EMS devices if we have any

View File

@@ -74,6 +74,10 @@ void WebLogService::log_level(uuid::log::Level level) {
uuid::log::Logger::register_handler(this, level);
}
size_t WebLogService::num_log_messages() const {
return log_messages_.size();
}
size_t WebLogService::maximum_log_messages() const {
return maximum_log_messages_;
}

View File

@@ -37,6 +37,7 @@ class WebLogService : public uuid::log::Handler {
uuid::log::Level log_level() const;
void log_level(uuid::log::Level level);
size_t maximum_log_messages() const;
size_t num_log_messages() const;
void maximum_log_messages(size_t count);
bool compact() const;
void compact(bool compact);