-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path98-iothub.html
82 lines (72 loc) · 2.79 KB
/
98-iothub.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!--
Copyright 2013,2014 IBM Corp.
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="iothub">
<div class="form-row">
<label for="node-input-hostname"><i class="fa fa-globe"></i> Host Name</label>
<input type="text" id="node-input-hostname" placeholder="">
</div>
<div class="form-row">
<label for="node-input-deviceid"><i class="fa fa-random"></i> Device ID</label>
<input type="text" id="node-input-deviceid" placeholder="">
</div>
<div class="form-row">
<label for="node-input-devicekey"><i class="fa fa-user"></i> Device Key</label>
<input type="text" id="node-input-devicekey">
</div>
<br/>
<div class="form-row">
<label for="node-input-dname"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-dname" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="e-mail">
<p>Sends the <b>msg.payload</b> as an email, with a subject of <b>msg.topic</b>.</p>
<!-- <p>It sends the message to the configured recipient <i>only</i>.</p> -->
<p>You may dynamically overide the default recipient by setting a <b>msg.to</b> property.</p>
<!-- <p><b>msg.topic</b> is used to set the subject of the email, and <b>msg.payload</b> is the body text.</p> -->
</script>
<script type="text/javascript">
(function() {
RED.nodes.registerType('iothub',{
category: 'Nexcom',
color:"#72b0cf",
defaults: {
hostname: {value:"",required:true},
deviceid: {value:"",required:true},
devicekey: {value:"",required:true},
dname: {value:""}
},
credentials: {
keyname: {type:"text"},
key: {type: "password"},
global: { type:"boolean"}
},
inputs:1,
outputs:1,
icon: "iothub.png",
label: function() {
return this.dname||this.name||"IoTHub";
},
labelStyle: function() {
return (this.dname||!this.topic)?"node_label_italic":"";
},
oneditprepare: function() {
if (this.credentials.global) {
$('#node-tip').show();
} else {
$('#node-tip').hide();
};
}
});
})();
</script>