diff --git a/static/js/index/index_map.js b/static/js/index/index_map.js
index 8b5faf0..76c7969 100644
--- a/static/js/index/index_map.js
+++ b/static/js/index/index_map.js
@@ -43,7 +43,7 @@ class MapEventManager {
addMapEvent(mapevent) {
if(this._mapEventArray.length >= MAXIMGROTATION) {
var toDel = this._mapEventArray[0];
- toDel._marker.remove(); // remove marker
+ toDel.marker.remove(); // remove marker
this._coordSet.delete(toDel.text);
this._mapEventArray.slice(1);
}
diff --git a/templates/index.html b/templates/index.html
index 3e65e4e..0845d6a 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -181,7 +181,7 @@ small {
CRITICAL
-
+
diff --git a/zmq_subscriber.py b/zmq_subscriber.py
index f5a0062..3d2711b 100755
--- a/zmq_subscriber.py
+++ b/zmq_subscriber.py
@@ -56,7 +56,6 @@ def getCoordAndPublish(supposed_ip, categ):
coord = rep['coord']
coord_dic = {'lat': coord['lat'], 'lon': coord['lon']}
coord_list = [coord['lat'], coord['lon']]
- print(coord_list)
now = datetime.datetime.now()
today_str = str(now.year)+str(now.month)+str(now.day)
keyname = 'GEO_' + today_str
@@ -87,16 +86,21 @@ def handler_keepalive(jsonevent):
publish_log('Keepalive', to_push)
def handler_event(jsonevent):
- print('sending', 'event')
+ print(jsonevent)
#fields: threat_level_id, id, info
jsonevent = jsonevent['Event']
#redirect to handler_attribute
if 'Attribute' in jsonevent:
- handler_attribute(jsonevent['Attribute'])
+ attributes = jsonevent['Attribute']
+ if attributes is list:
+ for attr in attributes:
+ handler_attribute(attr)
+ else:
+ handler_attribute(attr)
def handler_attribute(jsonattr):
- print('sending', 'attribute')
+ print(jsonattr)
jsonattr = jsonattr['Attribute']
to_push = []
for field in json.loads(cfg.get('Log', 'fieldname_order')):