Skip to content

Commit

Permalink
MQTT verbose logging fixes (#341)
Browse files Browse the repository at this point in the history
* MQTT verbose logging: fix typo

this typo caused that verbose logging was always disabled for MQTT and
could not be enabled.

* webapp status: show MQTT verbose logging setting
  • Loading branch information
schlimmchen authored Jul 31, 2023
1 parent 6b425d9 commit 2bce831
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/WebApi_mqtt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ void WebApiMqttClass::onMqttAdminPost(AsyncWebServerRequest* request)

CONFIG_T& config = Configuration.get();
config.Mqtt_Enabled = root["mqtt_enabled"].as<bool>();
config.Mqtt_VerboseLogging = root["verbose_logging"].as<bool>();
config.Mqtt_VerboseLogging = root["mqtt_verbose_logging"].as<bool>();
config.Mqtt_Retain = root["mqtt_retain"].as<bool>();
config.Mqtt_Tls = root["mqtt_tls"].as<bool>();
strlcpy(config.Mqtt_RootCaCert, root["mqtt_root_ca_cert"].as<String>().c_str(), sizeof(config.Mqtt_RootCaCert));
Expand Down
1 change: 1 addition & 0 deletions webapp/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@
"MqttInformation": "MQTT Information",
"ConfigurationSummary": "@:ntpinfo.ConfigurationSummary",
"Status": "@:ntpinfo.Status",
"VerboseLogging": "@:base.VerboseLogging",
"Enabled": "Enabled",
"Disabled": "Disabled",
"Server": "@:ntpinfo.Server",
Expand Down
1 change: 1 addition & 0 deletions webapp/src/types/MqttStatus.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export interface MqttStatus {
mqtt_enabled: boolean;
mqtt_verbose_logging: boolean;
mqtt_hostname: string;
mqtt_port: number;
mqtt_username: string;
Expand Down
6 changes: 6 additions & 0 deletions webapp/src/views/MqttInfoView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
<StatusBadge :status="mqttDataList.mqtt_enabled" true_text="mqttinfo.Enabled" false_text="mqttinfo.Disabled" />
</td>
</tr>
<tr>
<th>{{ $t('mqttinfo.VerboseLogging') }}</th>
<td>
<StatusBadge :status="mqttDataList.mqtt_verbose_logging" true_text="mqttinfo.Enabled" false_text="mqttinfo.Disabled" />
</td>
</tr>
<tr>
<th>{{ $t('mqttinfo.Server') }}</th>
<td>{{ mqttDataList.mqtt_hostname }}</td>
Expand Down

0 comments on commit 2bce831

Please sign in to comment.