mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Update some core nodes info
This commit is contained in:
parent
4689d56955
commit
45fbd22e28
@ -1,18 +1,3 @@
|
|||||||
<!--
|
|
||||||
Copyright JS Foundation and other contributors, http://js.foundation
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<script type="text/x-red" data-template-name="catch">
|
<script type="text/x-red" data-template-name="catch">
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
@ -41,6 +26,20 @@
|
|||||||
</script>
|
</script>
|
||||||
<script type="text/x-red" data-help-name="catch">
|
<script type="text/x-red" data-help-name="catch">
|
||||||
<p>Catch errors thrown by nodes on the same tab.</p>
|
<p>Catch errors thrown by nodes on the same tab.</p>
|
||||||
|
<h3>Outputs</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>msg <span class="property-type">object</span></dt>
|
||||||
|
<dd>the original msg object message (if available).</dd>
|
||||||
|
<dt>msg.error.message <span class="property-type">string</span></dt>
|
||||||
|
<dd>the error message.</dd>
|
||||||
|
<dt>msg.error.source.id <span class="property-type">string</span></dt>
|
||||||
|
<dd>the id of the node that threw the error.</dd>
|
||||||
|
<dt>msg.error.source.type <span class="property-type">string</span></dt>
|
||||||
|
<dd>the type of the node that threw the error.</dd>
|
||||||
|
<dt>msg.error.source.name <span class="property-type">string</span></dt>
|
||||||
|
<dd>the name, if set, of the node that threw the error.</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>Details</h3>
|
||||||
<p>If a node throws a error whilst handling a message, the flow will typically
|
<p>If a node throws a error whilst handling a message, the flow will typically
|
||||||
halt. This node can be used to catch those errors and handle them with a
|
halt. This node can be used to catch those errors and handle them with a
|
||||||
dedicated flow.</p>
|
dedicated flow.</p>
|
||||||
@ -49,16 +48,6 @@
|
|||||||
<p>If an error is thrown within a subflow, the error will get handled by any
|
<p>If an error is thrown within a subflow, the error will get handled by any
|
||||||
catch nodes within the subflow. If none exists, the error is propagated
|
catch nodes within the subflow. If none exists, the error is propagated
|
||||||
up to the tab the subflow instance is on.</p>
|
up to the tab the subflow instance is on.</p>
|
||||||
<p>The message sent by this node will be the original message if the node that
|
|
||||||
threw the error provided it. The message will have an <code>error</code>
|
|
||||||
property with the following attributes:
|
|
||||||
<ul>
|
|
||||||
<li><code>message</code> : the error message</li>
|
|
||||||
<li><code>source.id</code> : the id of the node that threw the error</li>
|
|
||||||
<li><code>source.type</code> : the type of the node that threw the error</li>
|
|
||||||
<li><code>source.name</code> : the name, if set, of the node that threw the error</li>
|
|
||||||
</ul>
|
|
||||||
</p>
|
|
||||||
<p>If the message already had a <code>error</code> property, it is copied to <code>_error</code>.</p>
|
<p>If the message already had a <code>error</code> property, it is copied to <code>_error</code>.</p>
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
@ -123,7 +112,7 @@
|
|||||||
var editorRow = $("#dialog-form>div.node-input-target-row");
|
var editorRow = $("#dialog-form>div.node-input-target-row");
|
||||||
height -= (parseInt(editorRow.css("marginTop"))+parseInt(editorRow.css("marginBottom")));
|
height -= (parseInt(editorRow.css("marginTop"))+parseInt(editorRow.css("marginBottom")));
|
||||||
$("#node-input-catch-target-container-div").css("height",height+"px");
|
$("#node-input-catch-target-container-div").css("height",height+"px");
|
||||||
}
|
};
|
||||||
|
|
||||||
function createNodeList() {
|
function createNodeList() {
|
||||||
var scope = node.scope || [];
|
var scope = node.scope || [];
|
||||||
@ -233,11 +222,11 @@
|
|||||||
|
|
||||||
$("#node-input-target-sort-type").click(function(e) {
|
$("#node-input-target-sort-type").click(function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
sortNodeList('sublabel')
|
sortNodeList('sublabel');
|
||||||
});
|
});
|
||||||
$("#node-input-target-node-checkbox-all").change(function() {
|
$("#node-input-target-node-checkbox-all").change(function() {
|
||||||
$(".node-input-target-node-checkbox").prop('checked',this.checked);
|
$(".node-input-target-node-checkbox").prop('checked',this.checked);
|
||||||
})
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -251,7 +240,7 @@
|
|||||||
}
|
}
|
||||||
node.resize();
|
node.resize();
|
||||||
});
|
});
|
||||||
if (this.scope == null) {
|
if (this.scope === null) {
|
||||||
$("#node-input-scope-select").val("all");
|
$("#node-input-scope-select").val("all");
|
||||||
} else {
|
} else {
|
||||||
$("#node-input-scope-select").val("target");
|
$("#node-input-scope-select").val("target");
|
||||||
@ -269,7 +258,7 @@
|
|||||||
if ($(this).prop("checked")) {
|
if ($(this).prop("checked")) {
|
||||||
node.scope.push($(this).data('node-id'));
|
node.scope.push($(this).data('node-id'));
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
oneditresize: function(size) {
|
oneditresize: function(size) {
|
||||||
|
@ -1,18 +1,3 @@
|
|||||||
<!--
|
|
||||||
Copyright JS Foundation and other contributors, http://js.foundation
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<script type="text/x-red" data-template-name="status">
|
<script type="text/x-red" data-template-name="status">
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
@ -40,17 +25,22 @@
|
|||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
<script type="text/x-red" data-help-name="status">
|
<script type="text/x-red" data-help-name="status">
|
||||||
<p>Send status messages from other nodes on the same tab.</p>
|
<p>Report status messages from other nodes on the same tab.</p>
|
||||||
<p>The message sent by this node will have a <code>status</code> property
|
<h3>Outputs</h3>
|
||||||
with the following attributes:
|
<dl class="message-properties">
|
||||||
<ul>
|
<dt>status.text <span class="property-type">string</span></dt>
|
||||||
<li><code>text</code> : the status text</li>
|
<dd>the status text.</dd>
|
||||||
<li><code>source.type</code> : the type of the node that reported status</li>
|
<dt>status.source.type <span class="property-type">string</span></dt>
|
||||||
<li><code>source.id</code> : the id of the node that reported status</li>
|
<dd>the type of the node that reported status.</dd>
|
||||||
<li><code>source.name</code> : the name, if set, of the node that reported status</li>
|
<dt>status.source.id <span class="property-type">string</span></dt>
|
||||||
|
<dd>the id of the node that reported status.</dd>
|
||||||
</ul>
|
<dt>status.source.name <span class="property-type">string</span></dt>
|
||||||
</p>
|
<dd>the name, if set, of the node that reported status.</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>Details</h3>
|
||||||
|
<p>This node does not produce a <code>payload</code>.</p>
|
||||||
|
<p>By default the node reports status for all nodes on the same workspace tab.
|
||||||
|
It can be configured to selectively report status for individual nodes.</p>
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
#node-input-status-target-container {
|
#node-input-status-target-container {
|
||||||
@ -114,7 +104,7 @@
|
|||||||
var editorRow = $("#dialog-form>div.node-input-target-row");
|
var editorRow = $("#dialog-form>div.node-input-target-row");
|
||||||
height -= (parseInt(editorRow.css("marginTop"))+parseInt(editorRow.css("marginBottom")));
|
height -= (parseInt(editorRow.css("marginTop"))+parseInt(editorRow.css("marginBottom")));
|
||||||
$("#node-input-status-target-container-div").css("height",height+"px");
|
$("#node-input-status-target-container-div").css("height",height+"px");
|
||||||
}
|
};
|
||||||
|
|
||||||
function createNodeList() {
|
function createNodeList() {
|
||||||
var scope = node.scope || [];
|
var scope = node.scope || [];
|
||||||
@ -224,11 +214,11 @@
|
|||||||
|
|
||||||
$("#node-input-target-sort-type").click(function(e) {
|
$("#node-input-target-sort-type").click(function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
sortNodeList('sublabel')
|
sortNodeList('sublabel');
|
||||||
});
|
});
|
||||||
$("#node-input-target-node-checkbox-all").change(function() {
|
$("#node-input-target-node-checkbox-all").change(function() {
|
||||||
$(".node-input-target-node-checkbox").prop('checked',this.checked);
|
$(".node-input-target-node-checkbox").prop('checked',this.checked);
|
||||||
})
|
});
|
||||||
|
|
||||||
$("#node-input-scope-select").change(function(e) {
|
$("#node-input-scope-select").change(function(e) {
|
||||||
var scope = $(this).val();
|
var scope = $(this).val();
|
||||||
@ -240,7 +230,7 @@
|
|||||||
}
|
}
|
||||||
node.resize();
|
node.resize();
|
||||||
});
|
});
|
||||||
if (this.scope == null) {
|
if (this.scope === null) {
|
||||||
$("#node-input-scope-select").val("all");
|
$("#node-input-scope-select").val("all");
|
||||||
} else {
|
} else {
|
||||||
$("#node-input-scope-select").val("target");
|
$("#node-input-scope-select").val("target");
|
||||||
@ -258,8 +248,7 @@
|
|||||||
if ($(this).prop("checked")) {
|
if ($(this).prop("checked")) {
|
||||||
node.scope.push($(this).data('node-id'));
|
node.scope.push($(this).data('node-id'));
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
oneditresize: function(size) {
|
oneditresize: function(size) {
|
||||||
|
@ -1,18 +1,3 @@
|
|||||||
<!--
|
|
||||||
Copyright JS Foundation and other contributors, http://js.foundation
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<script type="text/x-red" data-template-name="debug">
|
<script type="text/x-red" data-template-name="debug">
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
@ -36,13 +21,16 @@
|
|||||||
<script type="text/x-red" data-help-name="debug">
|
<script type="text/x-red" data-help-name="debug">
|
||||||
<p>The Debug node can be connected to the output of any node. It can be used to display the output of any message
|
<p>The Debug node can be connected to the output of any node. It can be used to display the output of any message
|
||||||
property in the debug tab of the sidebar. The default is to display <code>msg.payload</code>.</p>
|
property in the debug tab of the sidebar. The default is to display <code>msg.payload</code>.</p>
|
||||||
<p>Each message will also display the timestamp, <code>msg.topic</code> and the type of property chosen to output.</p>
|
<p>Each message will also display the date, time, node-id and the type of the chosen property.</p>
|
||||||
<p>The sidebar can be accessed under the options drop-down in the top right corner.</p>
|
<p>The sidebar can be accessed under the options drop-down ( <i class="fa fa-bars"></i> ) in the top right corner.</p>
|
||||||
<p>The button to the right of the node will toggle its output on and off so you can de-clutter the debug window.</p>
|
<p>The button to the right of the node will toggle its output on and off so you can de-clutter the debug window.</p>
|
||||||
<p>If the payload is an object or buffer it will be stringified first for display and indicate that by saying "(Object)" or "(Buffer)".</p>
|
<p>You can explore the received messages further by clicking on them. Numbers will be shown in decimal and hex and
|
||||||
<p>Selecting any particular message will highlight (in red) the debug node that reported it. This is useful if you wire up multiple debug nodes.</p>
|
as a timestamp if appropriate. Objects and arrays can be further expanded as required. Buffers may be able to be
|
||||||
<p>Optionally can show the complete <code>msg</code> object, and send messages to the console log (⇶).</p>
|
shown as strings if possible.</p>
|
||||||
<p>In addition any calls to node.warn or node.error will appear here.</p>
|
<p>Selecting the node-id of any particular message will highlight (in red) the debug node that reported it.
|
||||||
|
This is useful if you wire up multiple debug nodes.</p>
|
||||||
|
<p>The node can also be configured to send all messages to the console log (⇶).</p>
|
||||||
|
<p><b>Note: </b>In addition, any calls to <b>node.warn</b> or <b>node.error</b> will also appear in the debug tab.</p>
|
||||||
</script>
|
</script>
|
||||||
<script src="debug/view/debug-utils.js"></script>
|
<script src="debug/view/debug-utils.js"></script>
|
||||||
|
|
||||||
@ -105,7 +93,7 @@
|
|||||||
error: function(jqXHR,textStatus,errorThrown) {
|
error: function(jqXHR,textStatus,errorThrown) {
|
||||||
if (jqXHR.status == 404) {
|
if (jqXHR.status == 404) {
|
||||||
RED.notify(node._("common.notification.error", {message: node._("common.notification.errors.not-deployed")}),"error");
|
RED.notify(node._("common.notification.error", {message: node._("common.notification.errors.not-deployed")}),"error");
|
||||||
} else if (jqXHR.status == 0) {
|
} else if (jqXHR.status === 0) {
|
||||||
RED.notify(node._("common.notification.error", {message: node._("common.notification.errors.no-response")}),"error");
|
RED.notify(node._("common.notification.error", {message: node._("common.notification.errors.no-response")}),"error");
|
||||||
} else {
|
} else {
|
||||||
RED.notify(node._("common.notification.error",{message:node._("common.notification.errors.unexpected",{status:err.status,message:err.response})}),"error");
|
RED.notify(node._("common.notification.error",{message:node._("common.notification.errors.unexpected",{status:err.status,message:err.response})}),"error");
|
||||||
@ -147,7 +135,7 @@
|
|||||||
});
|
});
|
||||||
RED.view.redraw();
|
RED.view.redraw();
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
var uiComponents = RED.debug.init(options);
|
var uiComponents = RED.debug.init(options);
|
||||||
|
|
||||||
@ -159,7 +147,7 @@
|
|||||||
toolbar: uiComponents.footer,
|
toolbar: uiComponents.footer,
|
||||||
enableOnEdit: true
|
enableOnEdit: true
|
||||||
});
|
});
|
||||||
RED.actions.add("core:show-debug-tab",function() { RED.sidebar.show('debug')});
|
RED.actions.add("core:show-debug-tab",function() { RED.sidebar.show('debug'); });
|
||||||
|
|
||||||
var that = this;
|
var that = this;
|
||||||
RED._debug = function(msg) {
|
RED._debug = function(msg) {
|
||||||
@ -167,18 +155,18 @@
|
|||||||
name:"debug",
|
name:"debug",
|
||||||
msg:msg
|
msg:msg
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
this.refreshMessageList = function() {
|
this.refreshMessageList = function() {
|
||||||
RED.debug.refreshMessageList(RED.workspaces.active());
|
RED.debug.refreshMessageList(RED.workspaces.active());
|
||||||
if (subWindow) {
|
if (subWindow) {
|
||||||
try {
|
try {
|
||||||
subWindow.postMessage({event:"workspaceChange",activeWorkspace:RED.workspaces.active()},"*")
|
subWindow.postMessage({event:"workspaceChange",activeWorkspace:RED.workspaces.active()},"*");
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
this.handleDebugMessage = function(t,o) {
|
this.handleDebugMessage = function(t,o) {
|
||||||
var sourceNode = RED.nodes.node(o.id) || RED.nodes.node(o.z);
|
var sourceNode = RED.nodes.node(o.id) || RED.nodes.node(o.z);
|
||||||
@ -189,7 +177,7 @@
|
|||||||
RED.debug.handleDebugMessage(o);
|
RED.debug.handleDebugMessage(o);
|
||||||
if (subWindow) {
|
if (subWindow) {
|
||||||
try {
|
try {
|
||||||
subWindow.postMessage({event:"message",msg:o},"*")
|
subWindow.postMessage({event:"message",msg:o},"*");
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
}
|
}
|
||||||
@ -204,13 +192,13 @@
|
|||||||
subWindow = window.open(document.location.toString().replace(/[?#].*$/,"")+"debug/view/view.html"+document.location.search,"nodeREDDebugView","menubar=no,location=no,toolbar=no,chrome,height=500,width=600");
|
subWindow = window.open(document.location.toString().replace(/[?#].*$/,"")+"debug/view/view.html"+document.location.search,"nodeREDDebugView","menubar=no,location=no,toolbar=no,chrome,height=500,width=600");
|
||||||
subWindow.onload = function() {
|
subWindow.onload = function() {
|
||||||
subWindow.postMessage({event:"workspaceChange",activeWorkspace:RED.workspaces.active()},"*");
|
subWindow.postMessage({event:"workspaceChange",activeWorkspace:RED.workspaces.active()},"*");
|
||||||
}
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
$(window).unload(function() {
|
$(window).unload(function() {
|
||||||
if (subWindow) {
|
if (subWindow) {
|
||||||
try {
|
try {
|
||||||
subWindow.close()
|
subWindow.close();
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
}
|
}
|
||||||
@ -228,7 +216,7 @@
|
|||||||
} else if (msg.event === "clear") {
|
} else if (msg.event === "clear") {
|
||||||
options.clear();
|
options.clear();
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
window.addEventListener('message',this.handleWindowMessage);
|
window.addEventListener('message',this.handleWindowMessage);
|
||||||
},
|
},
|
||||||
onpaletteremove: function() {
|
onpaletteremove: function() {
|
||||||
@ -251,8 +239,7 @@
|
|||||||
$("#node-input-typed-complete").typedInput('value',property);
|
$("#node-input-typed-complete").typedInput('value',property);
|
||||||
}
|
}
|
||||||
$("#node-input-typed-complete").on('change',function() {
|
$("#node-input-typed-complete").on('change',function() {
|
||||||
if ($("#node-input-typed-complete").typedInput('type') === 'msg'
|
if ($("#node-input-typed-complete").typedInput('type') === 'msg' &&
|
||||||
&&
|
|
||||||
$("#node-input-typed-complete").typedInput('value') === ''
|
$("#node-input-typed-complete").typedInput('value') === ''
|
||||||
) {
|
) {
|
||||||
$("#node-input-typed-complete").typedInput('value','payload');
|
$("#node-input-typed-complete").typedInput('value','payload');
|
||||||
|
@ -1,18 +1,3 @@
|
|||||||
/**
|
|
||||||
* Copyright JS Foundation and other contributors, http://js.foundation
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
**/
|
|
||||||
|
|
||||||
module.exports = function(RED) {
|
module.exports = function(RED) {
|
||||||
"use strict";
|
"use strict";
|
||||||
@ -86,6 +71,8 @@ module.exports = function(RED) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function sendDebug(msg) {
|
function sendDebug(msg) {
|
||||||
|
// don't put blank errors in sidebar (but do add to logs)
|
||||||
|
//if ((msg.msg === "") && (msg.hasOwnProperty("level")) && (msg.level === 20)) { return; }
|
||||||
if (msg.msg instanceof Error) {
|
if (msg.msg instanceof Error) {
|
||||||
msg.format = "error";
|
msg.format = "error";
|
||||||
var errorMsg = {};
|
var errorMsg = {};
|
||||||
@ -129,7 +116,7 @@ module.exports = function(RED) {
|
|||||||
msg.msg = msg.msg.slice(0,debuglength);
|
msg.msg = msg.msg.slice(0,debuglength);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isArray || msg.format === "Object") {
|
if (isArray || (msg.format === "Object")) {
|
||||||
msg.msg = safeJSONStringify(msg.msg, function(key, value) {
|
msg.msg = safeJSONStringify(msg.msg, function(key, value) {
|
||||||
if (key === '_req' || key === '_res') {
|
if (key === '_req' || key === '_res') {
|
||||||
return "[internal]"
|
return "[internal]"
|
||||||
|
@ -1,18 +1,3 @@
|
|||||||
<!--
|
|
||||||
Copyright JS Foundation and other contributors, http://js.foundation
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<script type="text/x-red" data-template-name="link in">
|
<script type="text/x-red" data-template-name="link in">
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
@ -30,21 +15,33 @@
|
|||||||
</script>
|
</script>
|
||||||
<script type="text/x-red" data-help-name="link in">
|
<script type="text/x-red" data-help-name="link in">
|
||||||
<p>Create virtual wires between flows.</p>
|
<p>Create virtual wires between flows.</p>
|
||||||
<p>The node can be connected to any <b>link out</b> node that exists on any tab.
|
<h3>Outputs</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>msg <span class="property-type">object</span></dt>
|
||||||
|
<dd>a msg object that was sent to a link out node.</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>Details</h3>
|
||||||
|
<p>The node can be connected to any <code>link out</code> node that exists on any tab.
|
||||||
Once connected, they behave as if they were wired together.</p>
|
Once connected, they behave as if they were wired together.</p>
|
||||||
<p>The wires between link nodes are only displayed when a link node is selected.
|
<p>The wires between link nodes are only displayed when a link node is selected.
|
||||||
If there are any wires to other tabs, a virtual node is show that can be clicked
|
If there are any wires to other tabs, a virtual node is shown that can be clicked
|
||||||
on to jump to the appropriate tab.</p>
|
on to jump to the appropriate tab.</p>
|
||||||
<p>Links cannot be created going into, or out of, a subflow.</p>
|
<p><b>Note: </b>Links cannot be created going into, or out of, a subflow.</p>
|
||||||
</script>
|
</script>
|
||||||
<script type="text/x-red" data-help-name="link out">
|
<script type="text/x-red" data-help-name="link out">
|
||||||
<p>Create virtual wires between flows.</p>
|
<p>Create virtual wires between flows.</p>
|
||||||
<p>The node can be connected to any <b>link in</b> node that exists on any tab.
|
<h3>Inputs</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>msg <span class="property-type">object</span></dt>
|
||||||
|
<dd>a msg object to send to a link in node.</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>Details</h3>
|
||||||
|
<p>The node can be connected to any <code>link in</code> node that exists on any tab.
|
||||||
Once connected, they behave as if they were wired together.</p>
|
Once connected, they behave as if they were wired together.</p>
|
||||||
<p>The wires between link nodes are only displayed when a link node is selected.
|
<p>The wires between link nodes are only displayed when a link node is selected.
|
||||||
If there are any wires to other tabs, a virtual node is show that can be clicked
|
If there are any wires to other tabs, a virtual node is show that can be clicked
|
||||||
on to jump to the appropriate tab.</p>
|
on to jump to the appropriate tab.</p>
|
||||||
<p>Links cannot be created going into, or out of, a subflow.</p>
|
<p><b>Note: </b>Links cannot be created going into, or out of, a subflow.</p>
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
#node-input-link-container {
|
#node-input-link-container {
|
||||||
@ -141,14 +138,14 @@
|
|||||||
|
|
||||||
var nodeList = $("#node-input-link-container");
|
var nodeList = $("#node-input-link-container");
|
||||||
var candidateNodes = RED.nodes.filterNodes({type:targetType});
|
var candidateNodes = RED.nodes.filterNodes({type:targetType});
|
||||||
var inSubflow = (RED.nodes.subflow(node.z) != null);
|
var inSubflow = (RED.nodes.subflow(node.z) !== null);
|
||||||
candidateNodes.forEach(function(n) {
|
candidateNodes.forEach(function(n) {
|
||||||
if (inSubflow) {
|
if (inSubflow) {
|
||||||
if (n.z !== node.z) {
|
if (n.z !== node.z) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (RED.nodes.subflow(n.z)!=null) {
|
if (RED.nodes.subflow(n.z) !== null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -223,7 +220,7 @@
|
|||||||
if ($(this).prop("checked")) {
|
if ($(this).prop("checked")) {
|
||||||
node.links.push($(this).data('node-id'));
|
node.links.push($(this).data('node-id'));
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
node.oldLinks.sort();
|
node.oldLinks.sort();
|
||||||
node.links.sort();
|
node.links.sort();
|
||||||
var nodeMap = {};
|
var nodeMap = {};
|
||||||
|
@ -1,18 +1,3 @@
|
|||||||
<!--
|
|
||||||
Copyright JS Foundation and other contributors, http://js.foundation
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<script type="text/x-red" data-template-name="function">
|
<script type="text/x-red" data-template-name="function">
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
@ -42,14 +27,14 @@
|
|||||||
<h4>Logging and Error Handling</h4>
|
<h4>Logging and Error Handling</h4>
|
||||||
<p>To log any information, or report an error, the following functions are available:</p>
|
<p>To log any information, or report an error, the following functions are available:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><code>node.log("Log")</code></li>
|
<li><code>node.log("Log message")</code></li>
|
||||||
<li><code>node.warn("Warning")</code></li>
|
<li><code>node.warn("Warning")</code></li>
|
||||||
<li><code>node.error("Error")</code></li>
|
<li><code>node.error("Error")</code></li>
|
||||||
</ul>
|
</ul>
|
||||||
</p>
|
</p>
|
||||||
<p>The Catch node can also be used to handle errors. To invoke a Catch node,
|
<p>The Catch node can also be used to handle errors. To invoke a Catch node,
|
||||||
pass <code>msg</code> as a second argument to <code>node.error</code>:</p>
|
pass <code>msg</code> as a second argument to <code>node.error</code>:</p>
|
||||||
<pre>node.error("Error",msg)</pre>
|
<pre>node.error("Error",msg);</pre>
|
||||||
<h4>Sending messages</h4>
|
<h4>Sending messages</h4>
|
||||||
<p>The function can either return the messages it wants to pass on to the next nodes
|
<p>The function can either return the messages it wants to pass on to the next nodes
|
||||||
in the flow, or can call <code>node.send(messages)</code>.</p>
|
in the flow, or can call <code>node.send(messages)</code>.</p>
|
||||||
@ -63,7 +48,6 @@
|
|||||||
<p>If null is returned, either by itself or as an element of the array, no
|
<p>If null is returned, either by itself or as an element of the array, no
|
||||||
message is passed on.</p>
|
message is passed on.</p>
|
||||||
<p>See the <a target="_blank" href="http://nodered.org/docs/writing-functions.html">online documentation</a> for more help.</p>
|
<p>See the <a target="_blank" href="http://nodered.org/docs/writing-functions.html">online documentation</a> for more help.</p>
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
@ -1,18 +1,3 @@
|
|||||||
<!--
|
|
||||||
Copyright JS Foundation and other contributors, http://js.foundation
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<script type="text/x-red" data-template-name="template">
|
<script type="text/x-red" data-template-name="template">
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
@ -64,6 +49,17 @@
|
|||||||
|
|
||||||
<script type="text/x-red" data-help-name="template">
|
<script type="text/x-red" data-help-name="template">
|
||||||
<p>Sets a property based on the provided template.</p>
|
<p>Sets a property based on the provided template.</p>
|
||||||
|
<h3>Inputs</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>msg <span class="property-type">object</span></dt>
|
||||||
|
<dd>A msg object containing information to populate the template.</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>Outputs</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>msg <span class="property-type">object</span></dt>
|
||||||
|
<dd>a msg with a property set by populating the configured template with properties from the incoming msg.</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>Details</h3>
|
||||||
<p>By default this uses the <i><a href="http://mustache.github.io/mustache.5.html" target="_blank">mustache</a></i>
|
<p>By default this uses the <i><a href="http://mustache.github.io/mustache.5.html" target="_blank">mustache</a></i>
|
||||||
format, but this can be switched off if required.</p>
|
format, but this can be switched off if required.</p>
|
||||||
<p>For example, when a template of:
|
<p>For example, when a template of:
|
||||||
@ -76,8 +72,8 @@
|
|||||||
}</pre>
|
}</pre>
|
||||||
<p>The resulting property will be:
|
<p>The resulting property will be:
|
||||||
<pre>Hello Fred. Today is Monday</pre>
|
<pre>Hello Fred. Today is Monday</pre>
|
||||||
<p>It is possible to use property from flow context or global context. Just use <code>{{flow.name}}</code> or <code>{{global.name}}</code>.
|
<p>It is possible to use a property from the flow context or global context. Just use <code>{{flow.name}}</code> or <code>{{global.name}}</code>.
|
||||||
<p>By default, mustache will escape any HTML entities in the values it substitutes.
|
<p><b>Note: </b>By default, <i>mustache</i> will escape any HTML entities in the values it substitutes.
|
||||||
To prevent this, use <code>{{{triple}}}</code> braces.
|
To prevent this, use <code>{{{triple}}}</code> braces.
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -133,7 +129,7 @@
|
|||||||
that.editor.getSession().setMode({
|
that.editor.getSession().setMode({
|
||||||
path: mod,
|
path: mod,
|
||||||
v: Date.now()
|
v: Date.now()
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
oneditsave: function() {
|
oneditsave: function() {
|
||||||
|
@ -1,18 +1,3 @@
|
|||||||
<!--
|
|
||||||
Copyright JS Foundation and other contributors, http://js.foundation
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<script type="text/x-red" data-template-name="comment">
|
<script type="text/x-red" data-template-name="comment">
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
@ -31,6 +16,9 @@
|
|||||||
|
|
||||||
<script type="text/x-red" data-help-name="comment">
|
<script type="text/x-red" data-help-name="comment">
|
||||||
<p>A node you can use to add comments to your flows.</p>
|
<p>A node you can use to add comments to your flows.</p>
|
||||||
|
<h3>Details</h3>
|
||||||
|
<p>The edit panel will accept Markdown syntax. The text will be rendered into
|
||||||
|
this information side panel.</p>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
@ -1,18 +1,3 @@
|
|||||||
<!--
|
|
||||||
Copyright JS Foundation and other contributors, http://js.foundation
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<script type="text/x-red" data-template-name="unknown">
|
<script type="text/x-red" data-template-name="unknown">
|
||||||
<div class="form-tips"><span data-i18n="[html]unknown.tip"></span></div>
|
<div class="form-tips"><span data-i18n="[html]unknown.tip"></span></div>
|
||||||
@ -20,11 +5,14 @@
|
|||||||
|
|
||||||
<script type="text/x-red" data-help-name="unknown">
|
<script type="text/x-red" data-help-name="unknown">
|
||||||
<p>This node is a type unknown to your installation of Node-RED.</p>
|
<p>This node is a type unknown to your installation of Node-RED.</p>
|
||||||
<p><i>If you deploy with the node in this state, it's configuration will be preserved, but
|
<h3>Details</h3>
|
||||||
|
<p><i>If you deploy with the node in this state, its configuration will be preserved, but
|
||||||
the flow will not start until the missing type is installed.</i></p>
|
the flow will not start until the missing type is installed.</i></p>
|
||||||
<p>It is possible this node type is already installed, but is missing a dependency. Check the Node-RED start-up log for
|
<p>Use the <code>Menu - Manage Palette</code> option
|
||||||
any error messages associated with the missing node type. Use <b>npm install <module></b> to install any missing modules
|
to search for and install nodes, or <b>npm install <module></b> to
|
||||||
and restart Node-RED and reimport the nodes.</p>
|
install, any missing modules and restart Node-RED and reimport the nodes.</p>
|
||||||
|
<p>It is possible this node type is already installed, but is missing a dependency. Check the Node-RED start-up
|
||||||
|
log for any error messages associated with the missing node type.</p>
|
||||||
<p>Otherwise, you should contact the author of the flow to obtain a copy of the missing node type.</p>
|
<p>Otherwise, you should contact the author of the flow to obtain a copy of the missing node type.</p>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
"enabled": "Enabled",
|
"enabled": "Enabled",
|
||||||
"disabled":"Disabled",
|
"disabled":"Disabled",
|
||||||
"info": "Description",
|
"info": "Description",
|
||||||
"tip": "Description will accept Markdown and will appear in the Info tab."
|
"tip": "Description accepts Markdown and will appear in the Info tab."
|
||||||
},
|
},
|
||||||
"menu": {
|
"menu": {
|
||||||
"label": {
|
"label": {
|
||||||
|
Loading…
Reference in New Issue
Block a user