Add MQTT via WebSocket communication option (#1544)

* Add MQTT via WebSocket communication option

Add option in MQTT broker configuration node to enable MQTT via WebSoket comunication

* MQTT over WS error correction

Minimal correction of values and erase debug console.log unnecessary

* original package.json

Erase some changes on grunt build at package.json. Erase package-lock.json and back to the original package.json

* .gitignore

* .gitignore again

* No tabs
This commit is contained in:
delbozkester
2018-01-11 15:22:02 -06:00
committed by Nick O'Leary
parent 9ba011003a
commit af5df890a5
3 changed files with 25 additions and 3 deletions

View File

@@ -187,6 +187,10 @@
<label style="width: auto; margin-left: 20px; margin-right: 10px;" for="node-config-input-tls"><span data-i18n="mqtt.label.tls-config"></span></label><input style="width: 300px;" type="text" id="node-config-input-tls">
</div>
</div>
<div class="form-row">
<input type="checkbox" id="node-config-input-usews" style="display: inline-block; width: auto; vertical-align: top;">
<label for="node-config-input-usews" style="width: auto;" data-i18n="mqtt.label.use-ws"></label>
</div>
<div class="form-row">
<label for="node-config-input-clientid"><i class="fa fa-tag"></i> <span data-i18n="mqtt.label.clientid"></span></label>
<input type="text" id="node-config-input-clientid" data-i18n="[placeholder]mqtt.placeholder.clientid">
@@ -283,6 +287,7 @@
}
}},
usetls: {value: false},
usews: {value: false},
verifyservercert: { value: false},
compatmode: { value: true},
keepalive: {value:60,validate:RED.validators.number()},
@@ -344,6 +349,10 @@
this.usetls = false;
$("#node-config-input-usetls").prop("checked",false);
}
if (typeof this.usews === 'undefined') {
this.usews = false;
$("#node-config-input-usews").prop('checked', false);
}
if (typeof this.compatmode === 'undefined') {
this.compatmode = true;
$("#node-config-input-compatmode").prop('checked', true);