Commit 19e26d9c35497461d7557ebc61ff943ca17f078b

Authored by Quentin Durand
1 parent d3beb28d
Exists in dev

adding observatory no plc in navbar

src/misc/static/media/observatory_off.png 0 → 100644

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' %}";
... ...