You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -15,11 +16,27 @@ export class SignalTrigger implements INodeType {
15
16
description: INodeTypeDescription={
16
17
displayName: "Signal Trigger",
17
18
name: "signalTrigger",
19
+
icon: "fa:comment",
20
+
iconColor: "blue",
18
21
group: ["trigger"],
19
22
version: 1,
20
-
description: "Triggers when a new message is received",
23
+
description: "Triggers when a new Signal message is received",
24
+
eventTriggerDescription: '',
25
+
activationMessage: 'Waiting for Signal messages...',
21
26
defaults: {
22
27
name: "Signal Trigger",
28
+
color: "#1c75bc",
29
+
},
30
+
triggerPanel: {
31
+
header: '',
32
+
executionsHelp: {
33
+
inactive:
34
+
"<b>While building your workflow</b>, click the 'execute step' button, then send a Signal message. This will trigger an execution, which will show up in this editor.<br /> <br /><b>Once you're happy with your workflow</b>, <a data-key='activate'>activate</a> it. Then every time a Signal message is received, the workflow will execute. These executions will show up in the <a data-key='executions'>executions list</a>, but not in the editor.",
35
+
active:
36
+
"<b>While building your workflow</b>, click the 'execute step' button, then send a Signal message. This will trigger an execution, which will show up in this editor.<br /> <br /><b>Your workflow will also execute automatically</b>, since it's activated. Every time a Signal message is received, this node will trigger an execution. These executions will show up in the <a data-key='executions'>executions list</a>, but not in the editor.",
37
+
},
38
+
activationHint:
39
+
"Once you've finished building your workflow, <a data-key='activate'>activate</a> it to have it also listen continuously for Signal messages.",
23
40
},
24
41
inputs: [],
25
42
// @ts-ignore
@@ -44,44 +61,44 @@ export class SignalTrigger implements INodeType {
44
61
45
62
consteventSource=newEventSource(url);
46
63
47
-
eventSource.onmessage=(event)=>{
64
+
eventSource.addEventListener('error',(err)=>{
65
+
this.logger.error("EventSource error",{
66
+
error: err,
67
+
message: (errasany).message||'Unknown error',
68
+
});
69
+
});
70
+
71
+
eventSource.addEventListener('open',()=>{
72
+
signalTriggerDebug("Connected to %s",url);
73
+
this.logger.info("SignalTrigger connected to Signal CLI API",{ url });
0 commit comments