-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathjetstream-publish.html
58 lines (56 loc) · 1.7 KB
/
jetstream-publish.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<script type="text/javascript">
RED.nodes.registerType('NATS JetStream Publish', {
category: 'function',
color: '#00bb88',
credentials: {
},
defaults: {
name: {
value: ""
},
server: {
value: "",
type: "NATS JetStream Server"
},
subject: {
value: ""
},
payloadType: {
value: "json"
},
},
inputs: 1,
outputs: 0,
icon: 'nats-icon-white.png',
label: function() {
return this.name || 'NATS JetStream Publish';
},
oneditprepare: function() {
}
});
</script>
<script type="text/x-red" data-template-name="NATS JetStream Publish">
<div class="form-row">
<label for="node-input-name" style="width: 130px"><i class="fa fa-stack-exchange"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-server" style="width: 130px"><i class="fa fa-server"></i> Server</label>
<input type="text" id="node-input-server" placeholder="localhost:4222">
</div>
<div class="form-row">
<label for="node-input-subject" style="width: 130px"><i class="fa fa-stack-exchange"></i> Subject</label>
<input type="text" id="node-input-subject" placeholder="Subject">
</div>
<div class="form-row">
<label for="node-input-payloadType" style="width: 130px"><i class="fa fa-stack-exchange"></i> Payload Type</label>
<select id="node-input-payloadType" style='width:70%'>
<option value="json">JSON</option>
<option value="string">String</option>
<option value="buffer">Buffer</option>
</select>
</div>
</script>
<script type="text/html" data-help-name="NATS JetStream Publish">
<p>Publish messages to NATS JetStream Server</p>
</script>