|
143 | 143 | <input type="checkbox" id="node-config-input-muteNotifyEvents" style="display: inline-block; width: auto; vertical-align: top;"> |
144 | 144 | <label for="node-config-input-muteNotifyEvents" style="width: 70%;" data-i18n="generic-ble.label.muteNotifyEvents"></label> |
145 | 145 | </div> |
146 | | - <div class='form-row'> |
147 | | - <label for='node-config-input-operationTimeout'> |
148 | | - <i class='fa fa-tag'></i> |
149 | | - <span data-i18n='generic-ble.label.operationTimeout'></span> |
150 | | - </label> |
151 | | - <input type='text' id='node-config-input-operationTimeout' data-i18n='[placeholder]generic-ble.placeholder.operationTimeout'> |
152 | | - </div> |
153 | 146 | <div class='form-row node-config-input-characteristics-container-row'> |
154 | 147 | <i class='fa fa-gear'></i> <span data-i18n='generic-ble.label.characteristics'></span> |
155 | 148 | <ol id='node-config-input-characteristics-container'></ol> |
|
158 | 151 |
|
159 | 152 | <script type="text/javascript"> |
160 | 153 | 'use strict'; |
161 | | - const MAX_MILLIS = 60 * 1000; |
162 | | - const MIN_MILLIS = 300; |
163 | 154 | const LIST_BLE_DEVICE_INTERVAL_MS = 10 * 1000; |
164 | 155 | const LIST_BLE_DEVICE_DELAY_MS = 5 * 1000; |
165 | 156 | var charBuff = []; |
|
179 | 170 | address: { value: '', required: false }, |
180 | 171 | uuid: { value: '', required: false }, |
181 | 172 | muteNotifyEvents: { value: false, required: false }, |
182 | | - operationTimeout: { value: '', required: false }, |
183 | 173 | // characteristic |
184 | 174 | // { |
185 | 175 | // "uuid": "2a19", |
|
208 | 198 | if (uuid) { |
209 | 199 | $('#node-config-input-uuid').val(uuid.toLowerCase()); |
210 | 200 | } |
211 | | - var operationTimeout = $('#node-config-input-operationTimeout').val(); |
212 | | - if (operationTimeout) { |
213 | | - operationTimeout = parseInt(operationTimeout); |
214 | | - if (operationTimeout < MIN_MILLIS) { |
215 | | - operationTimeout = MIN_MILLIS; |
216 | | - } else if (operationTimeout > MAX_MILLIS) { |
217 | | - operationTimeout = MAX_MILLIS; |
218 | | - } else if (isNaN(operationTimeout)){ |
219 | | - operationTimeout = ''; |
220 | | - } |
221 | | - $('#node-config-input-operationTimeout').val(operationTimeout); |
222 | | - } |
223 | 201 | this.characteristics = charBuff; |
224 | 202 | }, |
225 | 203 | oneditprepare: function() { |
|
0 commit comments