From 19e26d9c35497461d7557ebc61ff943ca17f078b Mon Sep 17 00:00:00 2001 From: Quentin Durand Date: Thu, 26 Jul 2018 14:47:48 +0200 Subject: [PATCH] adding observatory no plc in navbar --- src/misc/static/media/observatory_off.png | Bin 0 -> 12151 bytes src/misc/templates/base.html | 4 +++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 src/misc/static/media/observatory_off.png diff --git a/src/misc/static/media/observatory_off.png b/src/misc/static/media/observatory_off.png new file mode 100644 index 0000000..69645fd Binary files /dev/null and b/src/misc/static/media/observatory_off.png differ diff --git a/src/misc/templates/base.html b/src/misc/templates/base.html index 9c15cb1..6579799 100644 --- a/src/misc/templates/base.html +++ b/src/misc/templates/base.html @@ -246,7 +246,9 @@ a { _img.width = 18; _img.height = 18; _img.id ="obs_state_img"; - if (weather_status[0]["sitewatch_global_status"] === "OK") + if (parseInt(weather_status[0]["plc_timeout"]) > parseInt(weather_status[0]["max_plc_timeout"])) + _img.src = "{% static 'media/observatory_off.png' %}"; + else if (weather_status[0]["sitewatch_global_status"] === "OK") _img.src = "{% static 'media/observatory.png' %}"; else _img.src = "{% static 'media/observatory_red.png' %}"; -- libgit2 0.21.2