mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Add some info words to config nodes
This commit is contained in:
@@ -227,9 +227,13 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/x-red" data-help-name="mqtt-broker">
|
||||
<p>A minimum MQTT broker connecton requires only a broker server address to be added to the default configuration.</p>
|
||||
<p>To secure the connection with SSL/TLS, a TLS Configuration must also be configured and selected.</p>
|
||||
<p>If you create a Client ID it must be unique to the broker you are connecting to.</p>
|
||||
<p>For more information about MQTT see the <a href="http://www.eclipse.org/paho/" target="_new">Eclipse Paho</a> site.</p>
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
@@ -239,14 +243,14 @@
|
||||
broker: {value:"",required:true},
|
||||
port: {value:1883,required:true,validate:RED.validators.number()},
|
||||
tls: {type:"tls-config",required: false},
|
||||
clientid: { value:"", validate: function(v) {
|
||||
if ($("#node-config-input-clientid").length) {
|
||||
// Currently editing the node
|
||||
return $("#node-config-input-cleansession").is(":checked") || v.length > 0;
|
||||
} else {
|
||||
return this.cleansession || v.length > 0;
|
||||
}
|
||||
}},
|
||||
clientid: {value:"", validate: function(v) {
|
||||
if ($("#node-config-input-clientid").length) {
|
||||
// Currently editing the node
|
||||
return $("#node-config-input-cleansession").is(":checked") || v.length > 0;
|
||||
} else {
|
||||
return this.cleansession || v.length > 0;
|
||||
}
|
||||
}},
|
||||
usetls: {value: false},
|
||||
verifyservercert: { value: false},
|
||||
compatmode: { value: true},
|
||||
@@ -266,7 +270,7 @@
|
||||
password: {type: "password"}
|
||||
},
|
||||
label: function() {
|
||||
if (this.broker == "") { this.broker = "localhost"; }
|
||||
if (this.broker === "") { this.broker = "localhost"; }
|
||||
return (this.clientid?this.clientid+"@":"")+this.broker+":"+this.port;
|
||||
},
|
||||
oneditprepare: function () {
|
||||
@@ -298,15 +302,15 @@
|
||||
this.cleansession = true;
|
||||
$("#node-config-input-cleansession").prop("checked",true);
|
||||
}
|
||||
if (typeof this.usetls === 'undefined'){
|
||||
if (typeof this.usetls === 'undefined') {
|
||||
this.usetls = false;
|
||||
$("#node-config-input-usetls").prop("checked",false);
|
||||
}
|
||||
if (typeof this.compatmode === 'undefined'){
|
||||
if (typeof this.compatmode === 'undefined') {
|
||||
this.compatmode = true;
|
||||
$("#node-config-input-compatmode").prop('checked', true);
|
||||
}
|
||||
if (typeof this.keepalive === 'undefined'){
|
||||
if (typeof this.keepalive === 'undefined') {
|
||||
this.keepalive = 15;
|
||||
$("#node-config-input-keepalive").val(this.keepalive);
|
||||
}
|
||||
|
Reference in New Issue
Block a user