diff --git a/config.cfg b/config.cfg index fcdf268..b538d36 100644 --- a/config.cfg +++ b/config.cfg @@ -6,6 +6,8 @@ rotation_wait_time = 30 max_img_rotation = 10 hours_spanned = 48 zoomlevel = 15 +size_openStreet_pannel_perc = 55 +size_world_pannel_perc = 35 [Log] fieldname_order=["id", "category", "type", "value"] @@ -15,7 +17,7 @@ host=localhost port=6250 db=0 channel=1 -zmq_url="tcp://crf.circl.lu:5556" +zmq_url=tcp://localhost:9990 [RedisMap] host=localhost diff --git a/server.py b/server.py index 6c9282f..b65103c 100755 --- a/server.py +++ b/server.py @@ -82,7 +82,16 @@ class EventMessage(): @app.route("/") def index(): + ratioCorrection = 88 + pannelSize = [ + "{:.0f}".format(cfg.getint('Dashboard' ,'size_openStreet_pannel_perc')/100*ratioCorrection), + "{:.0f}".format((100-cfg.getint('Dashboard' ,'size_openStreet_pannel_perc'))/100*ratioCorrection), + "{:.0f}".format(cfg.getint('Dashboard' ,'size_world_pannel_perc')/100*ratioCorrection), + "{:.0f}".format((100-cfg.getint('Dashboard' ,'size_world_pannel_perc'))/100*ratioCorrection) + ] + print(pannelSize) return render_template('index.html', + pannelSize=pannelSize, graph_log_refresh_rate=cfg.getint('Dashboard' ,'graph_log_refresh_rate'), rotation_wait_time=cfg.getint('Dashboard' ,'rotation_wait_time'), max_img_rotation=cfg.getint('Dashboard' ,'max_img_rotation'), diff --git a/static/js/index/index.js b/static/js/index/index.js index 94b8bcc..ce70bbe 100644 --- a/static/js/index/index.js +++ b/static/js/index/index.js @@ -2,6 +2,7 @@ var feedStatusFreqCheck = 1000*15; var maxNumPoint = hours_spanned; var keepaliveTime = 0; var emptyArray = []; +var _timeoutLed; for(i=0; i feedStatusFreqCheck) { // no feed $("#status_led").removeClass("led_green"); $("#status_led").addClass("led_red"); @@ -163,8 +165,9 @@ function ledColorManager() { $("#status_led").removeClass("led_red"); $("#status_led").addClass("led_green"); } - setTimeout(function(){ ledColorManager(); }, feedStatusFreqCheck); + _timeoutLed = setTimeout(function(){ ledColorManager(); }, feedStatusFreqCheck); } +_timeoutLed = setTimeout(function(){ ledColorManager(); }, feedStatusFreqCheck); // LOG TABLE @@ -198,6 +201,7 @@ function updateLogTable(feedName, log) { } } else if (feedName == "Keepalive") { keepaliveTime = new Date().getTime(); + clearTimeout(_timeoutLed); //cancel current led timeout ledColorManager(); } else { // do nothing diff --git a/templates/index.html b/templates/index.html index 5ae9a43..3e65e4e 100644 --- a/templates/index.html +++ b/templates/index.html @@ -51,6 +51,17 @@ table { box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 7px 1px, inset #304701 0 -1px 9px, #FF0303 0 2px 12px; } +.led_orange { + float: right; + margin: auto auto; + margin-top: 12.5px; + width: 24px; + height: 24px; + background-color: #FFB400; + border-radius: 50%; + box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 7px 1px, inset #304701 0 -1px 9px, #FF9000 0 2px 12px; +} + .marker_animation { stroke: darkred; position: absolute; @@ -93,7 +104,7 @@ small {