diff --git a/.gitignore b/.gitignore index 25954a6..8f63e9a 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,9 @@ config/config.cfg # ignore GeoLite DB data/GeoLite2-City* +# ignore redis database dump +data/dump.rdb + # Created by https://www.gitignore.io/api/python # Edit at https://www.gitignore.io/?templates=python diff --git a/helpers/geo_helper.py b/helpers/geo_helper.py index 5fe678b..4900732 100644 --- a/helpers/geo_helper.py +++ b/helpers/geo_helper.py @@ -208,11 +208,15 @@ class Geo_helper: today_str = util.getDateStrFormat(now) keyname = "{}:{}".format(keyCateg, today_str) try: - self.serv_redis_db.geoadd(keyname, lon, lat, content) + self.serv_redis_db.geoadd(keyname, [lon, lat, content]) except redis.exceptions.ResponseError as error: print(error) print("Please fix the above, and make sure you use a redis version that supports the GEOADD command.") print("To test for support: echo \"help GEOADD\"| redis-cli") + except redis.exceptions.DataError as error: + print(error) + print("Please fix the above, and make sure you use a redis version that supports the GEOADD command.") + print("To test for support: echo \"help GEOADD\"| redis-cli") self.logger.debug('Added to redis: keyname={}, lon={}, lat={}, content={}'.format(keyname, lon, lat, content)) def push_to_redis_zset(self, keyCateg, toAdd, endSubkey="", count=1): diff --git a/server.py b/server.py index f4ba7c3..6b45af2 100755 --- a/server.py +++ b/server.py @@ -304,7 +304,7 @@ class LogItem(): def pass_filter(self): for filter, filterValue in self.filters.items(): jsonValue = util.getFields(self.feed, filter) - if jsonValue is None or jsonValue != filterValue: + if jsonValue is None or ("!" not in filterValue and jsonValue != filterValue) or ("!" in filterValue and jsonValue == filterValue.strip("!")): return False return True diff --git a/static/js/index/index.js b/static/js/index/index.js index 1a4f005..ca63f63 100644 --- a/static/js/index/index.js +++ b/static/js/index/index.js @@ -748,8 +748,12 @@ $(document).ready(function() { 'Attribute.type', 'Attribute.uuid', 'Attribute.value', - 'Event.Org', - 'Event.Orgc', + 'Event.Org.id', + 'Event.Org.name', + 'Event.Org.uuid', + 'Event.Orgc.id', + 'Event.Orgc.name', + 'Event.Orgc.uuid', 'Event.analysis', 'Event.attribute_count', 'Event.date', @@ -760,8 +764,6 @@ $(document).ready(function() { 'Event.id', 'Event.info', 'Event.locked', - 'Event.org_id', - 'Event.orgc_id', 'Event.proposal_email_lock', 'Event.publish_timestamp', 'Event.published', @@ -769,13 +771,7 @@ $(document).ready(function() { 'Event.threat_level_id', 'Event.Tag.name', 'Event.timestamp', - 'Event.uuid', - 'Org.id', - 'Org.name', - 'Org.uuid', - 'Orgc.id', - 'Orgc.name', - 'Orgc.uuid' + 'Event.uuid' ].forEach(function(field) { var tempFilter = { "input": "text",