From e7b3d72a4037960883946aec95d66d79d68bc8ac Mon Sep 17 00:00:00 2001 From: Sebastian Krzyszkowiak Date: Thu, 27 Jul 2023 00:34:40 +0200 Subject: [PATCH 1/2] luci-app-mosquitto: fix notifications_local_only flag The option wasn't being applied at all because of a typo. Fixes: 596c2919f6b2 ("mosquitto: support notifications_local_only flag") Signed-off-by: Sebastian Krzyszkowiak --- applications/luci-app-mosquitto/luasrc/model/cbi/mosquitto.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/luci-app-mosquitto/luasrc/model/cbi/mosquitto.lua b/applications/luci-app-mosquitto/luasrc/model/cbi/mosquitto.lua index 66591f0bed73..c4a83b57ff12 100644 --- a/applications/luci-app-mosquitto/luasrc/model/cbi/mosquitto.lua +++ b/applications/luci-app-mosquitto/luasrc/model/cbi/mosquitto.lua @@ -162,7 +162,7 @@ OptionalFlag(s, "cleansession", _("Clean session")) OptionalFlag(s, "notifications", _("notifications"), _("Attempt to notify the local and remote broker of connection status, defaults to $SYS/broker/connections//state")) s:option(Value, "notification_topic", _("Topic to use for local+remote remote for notifications.")).optional = true -OptionalFlag(s, "notification_local_only", _("Notifications local only"), _("Bridge connection states should only be published locally")) +OptionalFlag(s, "notifications_local_only", _("Notifications local only"), _("Bridge connection states should only be published locally")) s:option(Value, "remote_clientid", _("Client id to use on remote end of this bridge connection")).optional = true s:option(Value, "local_clientid", _("Client id to use locally. Important when bridging to yourself")).optional = true From 96d4c1e9defe56eba3a5ebc372736b4869967dcf Mon Sep 17 00:00:00 2001 From: Sebastian Krzyszkowiak Date: Thu, 27 Jul 2023 00:35:15 +0200 Subject: [PATCH 2/2] luci-app-mosquitto: fix invalid XML in option description Trying to add "notifications" option resulted in malformed XML. Signed-off-by: Sebastian Krzyszkowiak --- applications/luci-app-mosquitto/luasrc/model/cbi/mosquitto.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/luci-app-mosquitto/luasrc/model/cbi/mosquitto.lua b/applications/luci-app-mosquitto/luasrc/model/cbi/mosquitto.lua index c4a83b57ff12..31d05e32f88f 100644 --- a/applications/luci-app-mosquitto/luasrc/model/cbi/mosquitto.lua +++ b/applications/luci-app-mosquitto/luasrc/model/cbi/mosquitto.lua @@ -160,7 +160,7 @@ topics = s:option(DynamicList, "topic", _("topic"), OptionalFlag(s, "cleansession", _("Clean session")) OptionalFlag(s, "notifications", _("notifications"), - _("Attempt to notify the local and remote broker of connection status, defaults to $SYS/broker/connections//state")) + _("Attempt to notify the local and remote broker of connection status, defaults to $SYS/broker/connections/<clientid>/state")) s:option(Value, "notification_topic", _("Topic to use for local+remote remote for notifications.")).optional = true OptionalFlag(s, "notifications_local_only", _("Notifications local only"), _("Bridge connection states should only be published locally"))