mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-27 00:07:16 +00:00
chg: [UI correlation graph] tooltip: show domain tags
This commit is contained in:
parent
362afc2253
commit
0fb4990d98
2 changed files with 6 additions and 2 deletions
|
@ -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):
|
def get_object_metadata(object_type, correlation_id, type_id=None):
|
||||||
if object_type == 'domain':
|
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':
|
elif object_type == 'paste':
|
||||||
return Item.get_item({"id": correlation_id, "date": True, "date_separator": True, "tags": True})[0]
|
return Item.get_item({"id": correlation_id, "date": True, "date_separator": True, "tags": True})[0]
|
||||||
elif object_type == 'decoded':
|
elif object_type == 'decoded':
|
||||||
|
|
|
@ -355,7 +355,7 @@ class Domain(object):
|
||||||
def get_domain_all_ports(self):
|
def get_domain_all_ports(self):
|
||||||
return get_domain_all_ports(self.domain, self.type)
|
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
|
Get Domain basic metadata
|
||||||
|
|
||||||
|
@ -365,6 +365,8 @@ class Domain(object):
|
||||||
:type last_ckeck: boolean
|
:type last_ckeck: boolean
|
||||||
:param ports: get all domain ports
|
:param ports: get all domain ports
|
||||||
:type ports: boolean
|
:type ports: boolean
|
||||||
|
:param tags: get all domain tags
|
||||||
|
:type tags: boolean
|
||||||
|
|
||||||
:return: a dict of all metadata for a given domain
|
:return: a dict of all metadata for a given domain
|
||||||
:rtype: dict
|
:rtype: dict
|
||||||
|
@ -382,6 +384,8 @@ class Domain(object):
|
||||||
dict_metadata['status'] = self.is_domain_up()
|
dict_metadata['status'] = self.is_domain_up()
|
||||||
if ports:
|
if ports:
|
||||||
dict_metadata['ports'] = self.get_domain_all_ports()
|
dict_metadata['ports'] = self.get_domain_all_ports()
|
||||||
|
if tags:
|
||||||
|
dict_metadata['tags'] = self.get_domain_tags()
|
||||||
return dict_metadata
|
return dict_metadata
|
||||||
|
|
||||||
def get_domain_tags(self):
|
def get_domain_tags(self):
|
||||||
|
|
Loading…
Reference in a new issue