Skip to content

Commit

Permalink
[FIX] UI issue with IOC without TLPs
Browse files Browse the repository at this point in the history
  • Loading branch information
whikernel committed Dec 20, 2024
1 parent 06e1829 commit a36cd0e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion source/app/datamgmt/case/case_iocs_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def get_detailed_iocs(caseid):
IocLink.ioc_id == Ioc.ioc_id)
).join(IocLink.ioc)
.join(Ioc.ioc_type)
.join(Ioc.tlp)
.outerjoin(Ioc.tlp)
.order_by(IocType.type_name).all())

return detailed_iocs
Expand Down
8 changes: 6 additions & 2 deletions source/app/static/assets/js/iris/case.ioc.js
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,12 @@ $(document).ready(function(){
"data": "tlp_name",
"render": function(data, type, row, meta) {
if (type === 'display') {
data = sanitizeHTML(data);
data = '<span class="badge badge-'+ row['tlp_bscolor'] +' ml-2">tlp:' + data + '</span>';
if (data) {
data = sanitizeHTML(data);
data = '<span class="badge badge-' + row['tlp_bscolor'] + ' ml-2">tlp:' + data + '</span>';
} else {
return `<span class="badge badge-light ml-2">unspecified</span>`
}
}
return data;
}
Expand Down

0 comments on commit a36cd0e

Please sign in to comment.