File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -225,8 +225,13 @@ export function UpdateChannels() {
225
225
const channels_topic = useMqttSubscription < Array < Channel > > (
226
226
"/v1/tac/update/channels" ,
227
227
) ;
228
+ const enable_polling_topic = useMqttSubscription < Array < Channel > > (
229
+ "/v1/tac/update/enable_polling" ,
230
+ ) ;
228
231
229
232
const channels = channels_topic !== undefined ? channels_topic : [ ] ;
233
+ const enable_polling =
234
+ enable_polling_topic !== undefined ? enable_polling_topic : false ;
230
235
231
236
return (
232
237
< Table
@@ -260,7 +265,9 @@ export function UpdateChannels() {
260
265
{
261
266
id : "enabled" ,
262
267
header : "Enabled" ,
263
- cell : ( e ) => < Checkbox checked = { e . enabled } /> ,
268
+ cell : ( e ) => (
269
+ < Checkbox checked = { e . enabled } disabled = { ! enable_polling } />
270
+ ) ,
264
271
} ,
265
272
{
266
273
id : "description" ,
@@ -276,8 +283,12 @@ export function UpdateChannels() {
276
283
} ,
277
284
{
278
285
id : "interval" ,
279
- header : "Update Interval" ,
286
+ header : "Polling Interval" ,
280
287
cell : ( e ) => {
288
+ if ( ! enable_polling ) {
289
+ return "Disabled" ;
290
+ }
291
+
281
292
if ( ! e . polling_interval ) {
282
293
return "Never" ;
283
294
}
@@ -313,7 +324,11 @@ export function UpdateChannels() {
313
324
}
314
325
315
326
if ( ! e . bundle ) {
316
- return < Spinner /> ;
327
+ if ( enable_polling ) {
328
+ return < Spinner /> ;
329
+ } else {
330
+ return "Polling disabled" ;
331
+ }
317
332
}
318
333
319
334
if ( ! e . bundle . newer_than_installed ) {
You can’t perform that action at this time.
0 commit comments