-
Notifications
You must be signed in to change notification settings - Fork 27
/
mqtt_edit.html
242 lines (202 loc) · 7.11 KB
/
mqtt_edit.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
<!-- Table 'mqtt' edit -->
<p align=center>
<a href="?"><<< <#LANG_BACK#></a>
</p>
<form action="?" method="post" enctype="multipart/form-data" name="frmEdit" class="form-horizontal">
[#if OK#]
<div class="alert alert-success"><#LANG_DATA_SAVED#></div>
[#endif OK#]
[#if ERR#]
<div class="alert alert-error"><#LANG_FILLOUT_REQURED#></div>
[#endif ERR#]
<fieldset>
[#if ID=""#]
<legend><#LANG_NEW_RECORD#></legend>
[#endif ID#]
<!-- TITLE (varchar) -->
<div class="form-group">
<label class="control-label"[#if ERR_METRIKA#] style="color:red;font-weight:bold"[#endif#]>
ID:
(*)
</label>
<div class="controls"><input type="text" name="id" value="[#ID#]" class="input form-control" disabled></div>
</div>
<div class="form-group">
<label class="control-label"[#if ERR_METRIKA#] style="color:red;font-weight:bold"[#endif#]>
DEV_ID:
(*)
</label>
<div class="controls"><input type="text" name="dev_id" value="[#DEV_ID#]" class="input form-control" disabled></div>
</div>
<div class="form-group">
<label class="control-label"[#if ERR_METRIKA#] style="color:red;font-weight:bold"[#endif#]>
Metrika:
(*)
</label>
<div class="controls"><input type="text" name="metrika" value="[#METRIKA#]" class="input form-control" disabled></div>
</div>
<div class="form-group">
<label class="control-label">
PATH_WRITE:
(*)
</label>
<div class="controls"><input type="text" name="path_write" value="[#PATH_WRITE#]" class="input form-control" disabled></div>
</div>
<div class="form-group">
<label class="control-label">
COMMAND_VALUE:
(*)
</label>
<div class="controls"><input type="text" name="command_value" value="[#COMMAND_VALUE#]" class="input form-control" disabled></div>
</div>
[#if PAYLOAD_ON<>""#]
<div class="form-group">
<label class="control-label">
PAYLOAD_ON:
(*)
</label>
<div class="controls"><input type="text" name="payload_on" value="[#PAYLOAD_ON#]" class="input form-control" disabled></div>
</div>
[#endif#]
[#if PAYLOAD_OFF<>""#]
<div class="form-group">
<label class="control-label">
PAYLOAD_OFF:
(*)
</label>
<div class="controls"><input type="text" name="payload_off" value="[#PAYLOAD_OFF#]" class="input form-control" disabled></div>
</div>
[#endif#]
[#if PAYLOAD_TRUE<>""#]
<div class="form-group">
<label class="control-label">
PAYLOAD_TRUE:
(*)
</label>
<div class="controls"><input type="text" name="payload_true" value="[#PAYLOAD_TRUE#]" class="input form-control" disabled></div>
</div>
[#endif#]
[#if PAYLOAD_FALSE<>""#]
<div class="form-group">
<label class="control-label">
PAYLOAD_FALSE:
(*)
</label>
<div class="controls"><input type="text" name="payload_false" value="[#PAYLOAD_FALSE#]" class="input form-control" disabled></div>
</div>
[#endif#]
<!--
<div class="form-group">
<label class="control-label">
QoS:
(<#LANG_OPTIONAL#>)
</label>
<div class="controls">
<input type="radio" name="qos" value="0"[#if QOS="0"#] checked[#endif#]> 0
<input type="radio" name="qos" value="1"[#if QOS="1"#] checked[#endif#]> 1
<input type="radio" name="qos" value="2"[#if QOS="2"#] checked[#endif#]> 2
</div>
</div>
<div class="form-group">
<label class="control-label">
Retain:
(<#LANG_OPTIONAL#>)
</label>
<div class="controls">
<input type="radio" name="retain" value="0"[#if RETAIN!="1"#] checked[#endif#]> <#LANG_NO#>
<input type="radio" name="retain" value="1"[#if RETAIN="1"#] checked[#endif#]> <#LANG_YES#>
</div>
</div>
-->
<div class="form-group">
<label class="control-label">
Convert ON/OFF to 1/0:
</label>
<div class="controls">
<input type="radio" name="convertonoff" value="0"[#if CONVERTONOFF!="1"#] checked[#endif#]> <#LANG_NO#>
<input type="radio" name="convertonoff" value="1"[#if CONVERTONOFF="1"#] checked[#endif#]> <#LANG_YES#>
</div>
</div>
<div class="form-group">
<label class="control-label"[#if ERR_VALUE#] style="color:red;font-weight:bold"[#endif#]>
<#LANG_VALUE#>:
</label>
<div class="controls">
[#VALUE#]
</div>
</div>
<div class="form-group">
<label class="control-label"[#if ERR_VALUE#] style="color:red;font-weight:bold"[#endif#]>
<#LANG_SET#>:
</label>
<div class="controls">
<input type="checkbox" name="set_new_value" value="1" style="float: left;">
<span style="overflow:hidden; display:block; padding-left:10px;">
<input type="text" name="new_value" value="" class="input form-control">
</span>
</div>
</div>
<div class="form-group">
<label class="control-label">
Сохранять только новые значения:
</label>
<div class="controls">
<input type="checkbox" name="enable1" value="1"[#if ENABLE1="1"#] checked[#endif#]>
</div>
</div>
<!-- DEVICE -->
<div class="form-group">
<label class="control-label">
<#LANG_DEVICE#>:
</label>
<div class="controls">[#module name="devices" action="link" type="unknow" prefix="mqtt" source_table="mqtt" source_table_id="<#ID#>" linked_object="<#LINKED_OBJECT#>"#]</div>
</div>
<!-- LINKED_OBJECT (varchar) -->
<div class="form-group">
<label class="control-label"[#if ERR_LINKED_OBJECT#] style="color:red;font-weight:bold"[#endif#]>
<#LANG_LINKED_OBJECT#>:
</label>
<div class="controls"><input type="text" name="linked_object" id="linked_object" value="[#LINKED_OBJECT#]" class="input form-control"></div>
</div>
<!-- LINKED_PROPERTY (varchar) -->
<div class="form-group">
<label class="control-label"[#if ERR_LINKED_PROPERTY#] style="color:red;font-weight:bold"[#endif#]>
<#LANG_PROPERTY#>:
</label>
<div class="controls"><input type="text" name="linked_property" id="linked_property" value="[#LINKED_PROPERTY#]" class="input form-control"></div>
</div>
<!-- LINKED_METHOD (varchar) -->
<div class="form-group">
<label class="control-label"[#if ERR_LINKED_METHOD#] style="color:red;font-weight:bold"[#endif#]>
<#LANG_METHOD#>:
</label>
<div class="controls"><input type="text" name="linked_property" id="linked_method" value="[#LINKED_METHOD#]" class="input form-control"></div>
</div>
[#module name="linkedobject" object_field="linked_object" property_field="linked_property" method_field="linked_method" width="200"#]
<!--
<div class="form-group">
<label class="control-label">
Replace list:
<#LANG_HCB#>replacelist<#LANG_HCE#>
</label>
<div class="controls"><input type="text" name="replace_list" id="replace_list" value="[#REPLACE_LIST#]" class="input form-control"></div>
</div>
-->
<div class="form-actions">
[#if ID!=""#]
<button type="submit" name="subm" value="<#LANG_SUBMIT#>" class="btn btn-defaul btn-primary"><#LANG_SUBMIT#></button>
[#else ID#]
<button type="submit" name="subm" value="<#LANG_ADD#>" class="btn btn-defaul btn-primary"><#LANG_ADD#></button>
[#endif ID#]
<a href="?view_mode=view_mqtt&id=[#DEV_ID#]&tab=edit_parametrs" class="btn btn-default"><#LANG_CANCEL#></a>
[#if ID!=""#]
<a href="?view_mode=delete_mqtt&id=[#DEVID#]" onClick="return confirm('<#ARE_YOU_SURE#>')" class="btn btn-default" title="<#LANG_DELETE#>"><i class="glyphicon glyphicon-remove"></i> <#LANG_DELETE#></a>
[#endif#]
<input type="hidden" name="id" value="<#ID#>">
<input type="hidden" name="view_mode" value="<#VIEW_MODE#>">
<input type="hidden" name="edit_mode" value="<#EDIT_MODE#>">
<input type="hidden" name="mode" value="update">
</div>
</fieldset>
</form>