chg: [UI correlation graph] tooltip: show domain tags

pull/453/head
Terrtia 2019-12-10 16:29:56 +01:00
parent 362afc2253
commit 0fb4990d98
No known key found for this signature in database
GPG Key ID: 1E1B1F50D84613D0
2 changed files with 6 additions and 2 deletions

View File

@ -50,7 +50,7 @@ def exist_object(object_type, correlation_id, type_id=None):
def get_object_metadata(object_type, correlation_id, type_id=None):
if object_type == 'domain':
return Domain.Domain(correlation_id).get_domain_metadata()
return Domain.Domain(correlation_id).get_domain_metadata(tags=True)
elif object_type == 'paste':
return Item.get_item({"id": correlation_id, "date": True, "date_separator": True, "tags": True})[0]
elif object_type == 'decoded':

View File

@ -355,7 +355,7 @@ class Domain(object):
def get_domain_all_ports(self):
return get_domain_all_ports(self.domain, self.type)
def get_domain_metadata(self, first_seen=True, last_ckeck=True, status=True, ports=True):
def get_domain_metadata(self, first_seen=True, last_ckeck=True, status=True, ports=True, tags=False):
'''
Get Domain basic metadata
@ -365,6 +365,8 @@ class Domain(object):
:type last_ckeck: boolean
:param ports: get all domain ports
:type ports: boolean
:param tags: get all domain tags
:type tags: boolean
:return: a dict of all metadata for a given domain
:rtype: dict
@ -382,6 +384,8 @@ class Domain(object):
dict_metadata['status'] = self.is_domain_up()
if ports:
dict_metadata['ports'] = self.get_domain_all_ports()
if tags:
dict_metadata['tags'] = self.get_domain_tags()
return dict_metadata
def get_domain_tags(self):