In various places, such as it is assumed that data from the server has content (eg has observing blocks in the queue waiting).
For instance:
|
function createBlockMapping() { |
|
let scheds = [] |
|
let inter = get_sched_blocksData() |
|
for (let key in inter) { |
|
inter[key].id = key |
|
scheds.push(inter[key]) |
|
} |
|
|
|
reserved.g.attr('opacity', 0.05) |
|
|
|
let height = headerSize * 2.5 |
|
let square = parseInt(Math.sqrt(scheds.length)) |
(
get_sched_blocksData() gives
shared.data.server.blocks)
Or:
|
let ce = shared.data.server.external_clock_events[0] |
where it is assumed that there is
len()>0 of the external events.
This is not always the case, as e.g., the queue can be completely empty during daytime.
Safety checks must be added everywhere that data from the server is ingested, to cover all cases of missing / empty data, or of data which is incompatible with the expected format (including proper warning messages in case of unexpected format).
This is a general issue for several other js widgets as well.
In various places, such as it is assumed that data from the server has content (eg has observing blocks in the queue waiting).
For instance:
ctaOperatorGUI/ctaGuiFront/ctaGuiFront/js/widgets/SchedBlockController.js
Lines 3919 to 3930 in 3cbfe75
(
get_sched_blocksData()givesshared.data.server.blocks)Or:
ctaOperatorGUI/ctaGuiFront/ctaGuiFront/js/widgets/SchedBlockController.js
Line 558 in 3cbfe75
where it is assumed that there is
len()>0of the external events.This is not always the case, as e.g., the queue can be completely empty during daytime.
Safety checks must be added everywhere that data from the server is ingested, to cover all cases of missing / empty data, or of data which is incompatible with the expected format (including proper warning messages in case of unexpected format).
This is a general issue for several other
jswidgets as well.