1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Rename exec node hideWin option

This commit is contained in:
Nick O'Leary 2021-07-02 09:22:08 +01:00
parent 04f4a76b41
commit 2baff243ed
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
4 changed files with 11 additions and 11 deletions

View File

@ -41,8 +41,8 @@
<span data-i18n="exec.label.seconds"></span>
</div>
<div class="form-row">
<label for="node-input-windowsHide" style="width: auto !important; padding-right:10px"><i class="fa fa-windows"></i> <span data-i18n="exec.label.windowshide"></span></label>
<input type="checkbox" id="node-input-windowsHide" style="display:inline-block; width:auto;">
<label for="node-input-winHide" style="width: auto !important; padding-right:10px"><i class="fa fa-windows"></i> <span data-i18n="exec.label.winHide"></span></label>
<input type="checkbox" id="node-input-winHide" style="margin-top: 0; display:inline-block; width:auto;">
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label>
@ -60,7 +60,7 @@
append: {value:""},
useSpawn: {value:"false"},
timer: {value:""},
windowsHide: {value:false},
winHide: {value:false},
oldrc: {value:false},
name: {value:""}
},
@ -98,10 +98,10 @@
$("#node-input-addpay-cb").trigger("change")
if (this.windowsHide === "true" || this.windowsHide === true) {
$("#node-input-windowsHide").prop("checked",true);
if (this.winHide === "true" || this.winHide === true) {
$("#node-input-winHide").prop("checked",true);
} else {
$("#node-input-windowsHide").prop("checked",false);
$("#node-input-winHide").prop("checked",false);
}
},
oneditsave: function() {

View File

@ -34,8 +34,8 @@ module.exports = function(RED) {
this.timer = Number(n.timer || 0)*1000;
this.activeProcesses = {};
this.oldrc = (n.oldrc || false).toString();
this.execOpt = {encoding:'binary', maxBuffer:RED.settings.execMaxBufferSize||10000000, windowsHide: (n.windowsHide === true)};
this.spawnOpt = {windowsHide: (n.windowsHide === true) }
this.execOpt = {encoding:'binary', maxBuffer:RED.settings.execMaxBufferSize||10000000, windowsHide: (n.winHide === true)};
this.spawnOpt = {windowsHide: (n.winHide === true) }
var node = this;
if (process.platform === 'linux' && fs.existsSync('/bin/bash')) { node.execOpt.shell = '/bin/bash'; }

View File

@ -73,6 +73,7 @@
<p>The returned <code>payload</code> is usually a <i>string</i>, unless non-UTF8 characters are detected, in which
case it is a <i>buffer</i>.</p>
<p>The node&apos;s status icon and PID will be visible while the node is active. Changes to this can be read by the <code>Status</code> node.</p>
<p>The <code>Hide console</code> option will hide the process console normally shown on Windows systems.</p>
<h4>Killing processes</h4>
<p>Sending <code>msg.kill</code> will kill a single active process. <code>msg.kill</code> should be a string containing
the type of signal to be sent, for example, <code>SIGINT</code>, <code>SIGQUIT</code> or <code>SIGHUP</code>.
@ -80,5 +81,4 @@
<p>If the node has more than one process running then <code>msg.pid</code> must also be set with the value of the PID to be killed.</p>
<p>If a value is provided in the <code>Timeout</code> field then, if the process has not completed when the specified number of seconds has elapsed, the process will be killed automatically</p>
<p>Tip: if running a Python app you may need to use the <code>-u</code> parameter to stop the output being buffered.</p>
<p>The <code>Hide windows</code> option can be set to hide shell windows under Windows. This option will only affect Windows operating systems.</p>
</script>

View File

@ -199,7 +199,7 @@
"stdout": "stdout",
"stderr": "stderr",
"retcode": "return code",
"windowshide": "Hide windows"
"winHide": "Hide console"
},
"placeholder": {
"extraparams": "extra input parameters"