Commit 19e26d9c35497461d7557ebc61ff943ca17f078b
1 parent
d3beb28d
Exists in
dev
adding observatory no plc in navbar
Showing
2 changed files
with
3 additions
and
1 deletions
Show diff stats
11.9 KB
src/misc/templates/base.html
... | ... | @@ -246,7 +246,9 @@ a { |
246 | 246 | _img.width = 18; |
247 | 247 | _img.height = 18; |
248 | 248 | _img.id ="obs_state_img"; |
249 | - if (weather_status[0]["sitewatch_global_status"] === "OK") | |
249 | + if (parseInt(weather_status[0]["plc_timeout"]) > parseInt(weather_status[0]["max_plc_timeout"])) | |
250 | + _img.src = "{% static 'media/observatory_off.png' %}"; | |
251 | + else if (weather_status[0]["sitewatch_global_status"] === "OK") | |
250 | 252 | _img.src = "{% static 'media/observatory.png' %}"; |
251 | 253 | else |
252 | 254 | _img.src = "{% static 'media/observatory_red.png' %}"; | ... | ... |