-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathifttt-broker.html
executable file
·59 lines (57 loc) · 1.81 KB
/
ifttt-broker.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
59
<script type="text/javascript">
RED.nodes.registerType('ifttt-broker',{
category: 'config',
defaults: {
host: {
value:"localhost",
required: true
},
port: {
value: 80,
validate: RED.validators.number(),
required: true
},
apiVersion: {
value: "v1",
required: false
},
name: {
value: ""
}
},
credentials: {
serviceKey: { type: "password" }
},
color: "#ffcc00",
inputs: 0,
outputs: 1,
icon: "logo.png",
label: function() {
return this.host+":"+this.port;
},
labelStyle: function() {
return this.name ? "node_label_italic" : "";
}
});
</script>
<script type="text/x-red" data-template-name="ifttt-broker">
<div class="form-row">
<label for="node-config-input-host"><i class="icon-bookmark"></i> Host</label>
<input type="text" id="node-config-input-host">
</div>
<div class="form-row">
<label for="node-config-input-port"><i class="icon-bookmark"></i> Port</label>
<input type="text" id="node-config-input-port">
</div>
<div class="form-row">
<label for="node-config-input-serviceKey"><i class="fa fa-user"></i> Service Key</label>
<input type="password" id="node-config-input-serviceKey">
</div>
<div class="form-row">
<label for="node-config-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-config-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="ifttt-broker">
<p>An IFTTT broker for Node-RED.</p>
</script>