-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathecoflow-connect.html
61 lines (55 loc) · 1.91 KB
/
ecoflow-connect.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
<script type="text/javascript">
RED.nodes.registerType('ecoflow-credential',{
category: 'config',
defaults: {
serial_number: {value:"serial_number",required:true},
app_key: {value:"app_key",required:true},
secret_key: {value:"app_key",required:true},
},
label: function() {
return "credentials for " + this.serial_number;
}
});
</script>
<script type="text/html" data-template-name="ecoflow-credential">
<div class="form-row">
<label for="node-config-input-serial_number"><i class="fa fa-bookmark"></i> serial_number</label>
<input type="text" id="node-config-input-serial_number">
</div>
<div class="form-row">
<label for="node-config-input-app_key"><i class="fa fa-bookmark"></i> app_key</label>
<input type="text" id="node-config-input-app_key">
</div>
<div class="form-row">
<label for="node-config-input-secret_key"><i class="fa fa-bookmark"></i> secret_key</label>
<input type="text" id="node-config-input-secret_key">
</div>
</script>
<script type="text/javascript">
RED.nodes.registerType("ecoflow-connect", {
category: "input",
color: "#ffcc66",
defaults: {
server: {value:"", type:"ecoflow-credential", required: true},
command: { value:"getDeviceInfo" },
},
inputs: 1,
outputs: 1,
icon: "feed.png",
label: function() {
return "ecoflow-connect";
}
});
</script>
<script type="text/x-red" data-template-name="ecoflow-connect">
<div class="form-row">
<label for="node-input-server"><i class="fa fa-globe"></i> Credentials</label>
<input type="text" id="node-input-server" />
</div>
<div class="form-row">
<label for="node-input-command"><i class="fa fa-terminal"></i> Command</label>
<select id="node-input-command">
<option value="getDeviceInfo">Device Info</option>
</select>
</div>
</script>