Merge branch 'nodeSettings' into 0.17

This commit is contained in:
Nick O'Leary
2017-03-09 20:00:54 +00:00
12 changed files with 197 additions and 12 deletions

View File

@@ -156,7 +156,7 @@
clearNameData("ca");
});
if (RED.settings.tlsDisableLocalFiles) {
if (RED.settings.tlsConfigDisableLocalFiles) {
$("#node-config-row-uselocalfiles").hide();
} else {
$("#node-config-row-uselocalfiles").show();
@@ -178,7 +178,7 @@
} else {
$("#node-config-input-ca").val("");
$("#node-config-input-cert").val("");
$("#node-config-input-key").val("");
$("#node-config-input-key").val("");
}
}
});

View File

@@ -48,13 +48,13 @@ module.exports = function(RED) {
this.valid = false;
this.error(err.toString());
return;
}
}
} else {
if (this.credentials) {
var certData = this.credentials.certdata || "";
var keyData = this.credentials.keydata || "";
var caData = this.credentials.cadata || "";
if ((certData.length > 0) !== (keyData.length > 0)) {
this.valid = false;
this.error(RED._("tls.error.missing-file"));
@@ -78,6 +78,12 @@ module.exports = function(RED) {
certdata: {type:"text"},
keydata: {type:"text"},
cadata: {type:"text"}
},
settings: {
tlsConfigDisableLocalFiles: {
value: true,
exportable: false
}
}
});