From 33bb86cbcffc9ce1e2f8534a0b97e93b95fe1966 Mon Sep 17 00:00:00 2001 From: Steve-Mcl Date: Thu, 8 Oct 2020 20:24:35 +0100 Subject: [PATCH] mqtt5 1st draft --- .../@node-red/nodes/core/network/10-mqtt.html | 210 +++++++++++++- .../@node-red/nodes/core/network/10-mqtt.js | 256 ++++++++++++++++-- .../nodes/locales/en-US/messages.json | 6 +- 3 files changed, 444 insertions(+), 28 deletions(-) diff --git a/packages/node_modules/@node-red/nodes/core/network/10-mqtt.html b/packages/node_modules/@node-red/nodes/core/network/10-mqtt.html index c1b02e836..d67c6b2c6 100644 --- a/packages/node_modules/@node-red/nodes/core/network/10-mqtt.html +++ b/packages/node_modules/@node-red/nodes/core/network/10-mqtt.html @@ -10,6 +10,55 @@ See the License for the specific language governing permissions and limitations under the License. --> + @@ -84,20 +176,66 @@ -
- - -      
+
+
+ + + +
+ +
+ + +
+ +
+ + + +
+ +
+ + +
+ +
+ + + + + +
+ +
+ + + + + +
+
@@ -113,6 +251,16 @@ topic: {value:""}, qos: {value:""}, retain: {value:""}, + responseTopic: {value:""}, + contentType: {value:""}, + userProperties: {value:'userProperties'}, + userPropertiesType: {value:'none'}, + correlationData: {value:'correlationData'}, + correlationDataType: {value:'none'}, + topicAlias: {value:0}, + messageExpiryInterval: {value:0}, + payloadFormatIndicator: {value:false}, + subscriptionIdentifier: {value:0}, broker: {type:"mqtt-broker", required:true} }, color:"#d8bfd8", @@ -123,6 +271,18 @@ label: function() { return this.name||this.topic||"mqtt"; }, + oneditprepare: function() { + $("#node-input-correlationData").typedInput({ + default: "none", + types:[{ value:"none", label: "None", hasValue:false },'msg','flow','global','bin'], + typeField: $("#node-input-correlationDataType") + }); + $("#node-input-userProperties").typedInput({ + default: "none", + types:[{ value:"none", label: "None", hasValue:false },'msg','flow','global','json'], + typeField: $("#node-input-userPropertiesType") + }); + }, labelStyle: function() { return this.name?"node_label_italic":""; } @@ -163,9 +323,27 @@
- - + +
+
+ + + + + +
+
+ + + + + +