You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.8KB

  1. <script type="text/javascript">
  2. RED.nodes.registerType('InterruptFlowUltimate',{
  3. category: 'boolean logic ultimate',
  4. color: '#ff8080',
  5. defaults: {
  6. name: {
  7. value: "Interrupt Flow"
  8. },
  9. triggertopic: {
  10. value: "trigger"
  11. }
  12. },
  13. inputs:1,
  14. outputs:1,
  15. outputLabels: function(i) {
  16. var ret="";
  17. switch (i) {
  18. case 0:
  19. return "True";
  20. break;
  21. case 1:
  22. return "False";
  23. break;
  24. default:
  25. break;
  26. }
  27. },
  28. icon: "file-in.png",
  29. label:
  30. function() {
  31. return (this.name||"Interrupt") + " (" + this.triggertopic + ")";
  32. },
  33. paletteLabel: function() {
  34. return "InterruptFlowUltimate";
  35. }
  36. });
  37. </script>
  38. <script type="text/x-red" data-template-name="InterruptFlowUltimate">
  39. <div class="form-row">
  40. <label for="node-input-name"><i class="icon-tag"></i> Name</label>
  41. <input type="text" id="node-input-name" placeholder="Name">
  42. </div>
  43. <div class="form-row">
  44. <label for="node-input-triggertopic"><i class="icon-tag"></i> Trigger by topic</label>
  45. <input type="text" id="node-input-triggertopic" placeholder="Name">
  46. <div><i>Whenever the node receives a payload = false from this topic, it stops output messages to the flow. As soon it receives payload = true from this topic, the output messages start to flow out again.</i></div>
  47. </div>
  48. </script>
  49. <script type="text/x-red" data-help-name="InterruptFlowUltimate">
  50. <p>The meaning of this node is to interrupt/reactivate flow messages.<br/>
  51. <p>The node will stop output messages, if it receives a payload = false from the specified topic.<br/>
  52. </p>
  53. <a href="https://www.paypal.me/techtoday" target="_blank"><img src='https://img.shields.io/badge/Donate-PayPal-blue.svg?style=flat-square' width='30%'></a>
  54. </script>