mirror of https://github.com/MISP/misp-dashboard
commit
a196e4a2fa
|
@ -12,6 +12,9 @@ config/config.cfg
|
||||||
# ignore GeoLite DB
|
# ignore GeoLite DB
|
||||||
data/GeoLite2-City*
|
data/GeoLite2-City*
|
||||||
|
|
||||||
|
# ignore redis database dump
|
||||||
|
data/dump.rdb
|
||||||
|
|
||||||
# Created by https://www.gitignore.io/api/python
|
# Created by https://www.gitignore.io/api/python
|
||||||
# Edit at https://www.gitignore.io/?templates=python
|
# Edit at https://www.gitignore.io/?templates=python
|
||||||
|
|
||||||
|
|
|
@ -208,11 +208,15 @@ class Geo_helper:
|
||||||
today_str = util.getDateStrFormat(now)
|
today_str = util.getDateStrFormat(now)
|
||||||
keyname = "{}:{}".format(keyCateg, today_str)
|
keyname = "{}:{}".format(keyCateg, today_str)
|
||||||
try:
|
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:
|
except redis.exceptions.ResponseError as error:
|
||||||
print(error)
|
print(error)
|
||||||
print("Please fix the above, and make sure you use a redis version that supports the GEOADD command.")
|
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")
|
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))
|
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):
|
def push_to_redis_zset(self, keyCateg, toAdd, endSubkey="", count=1):
|
||||||
|
|
|
@ -304,7 +304,7 @@ class LogItem():
|
||||||
def pass_filter(self):
|
def pass_filter(self):
|
||||||
for filter, filterValue in self.filters.items():
|
for filter, filterValue in self.filters.items():
|
||||||
jsonValue = util.getFields(self.feed, filter)
|
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 False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
|
@ -748,8 +748,12 @@ $(document).ready(function() {
|
||||||
'Attribute.type',
|
'Attribute.type',
|
||||||
'Attribute.uuid',
|
'Attribute.uuid',
|
||||||
'Attribute.value',
|
'Attribute.value',
|
||||||
'Event.Org',
|
'Event.Org.id',
|
||||||
'Event.Orgc',
|
'Event.Org.name',
|
||||||
|
'Event.Org.uuid',
|
||||||
|
'Event.Orgc.id',
|
||||||
|
'Event.Orgc.name',
|
||||||
|
'Event.Orgc.uuid',
|
||||||
'Event.analysis',
|
'Event.analysis',
|
||||||
'Event.attribute_count',
|
'Event.attribute_count',
|
||||||
'Event.date',
|
'Event.date',
|
||||||
|
@ -760,8 +764,6 @@ $(document).ready(function() {
|
||||||
'Event.id',
|
'Event.id',
|
||||||
'Event.info',
|
'Event.info',
|
||||||
'Event.locked',
|
'Event.locked',
|
||||||
'Event.org_id',
|
|
||||||
'Event.orgc_id',
|
|
||||||
'Event.proposal_email_lock',
|
'Event.proposal_email_lock',
|
||||||
'Event.publish_timestamp',
|
'Event.publish_timestamp',
|
||||||
'Event.published',
|
'Event.published',
|
||||||
|
@ -769,13 +771,7 @@ $(document).ready(function() {
|
||||||
'Event.threat_level_id',
|
'Event.threat_level_id',
|
||||||
'Event.Tag.name',
|
'Event.Tag.name',
|
||||||
'Event.timestamp',
|
'Event.timestamp',
|
||||||
'Event.uuid',
|
'Event.uuid'
|
||||||
'Org.id',
|
|
||||||
'Org.name',
|
|
||||||
'Org.uuid',
|
|
||||||
'Orgc.id',
|
|
||||||
'Orgc.name',
|
|
||||||
'Orgc.uuid'
|
|
||||||
].forEach(function(field) {
|
].forEach(function(field) {
|
||||||
var tempFilter = {
|
var tempFilter = {
|
||||||
"input": "text",
|
"input": "text",
|
||||||
|
|
Loading…
Reference in New Issue