Skip to content

Commit

Permalink
Finish package details code and template, refactor/create package-rel…
Browse files Browse the repository at this point in the history
…ated tests #1228

Reference: #1228

Signed-off-by: John M. Horan <johnmhoran@gmail.com>
  • Loading branch information
johnmhoran committed Sep 12, 2023
1 parent f904f09 commit b750d65
Show file tree
Hide file tree
Showing 3 changed files with 149 additions and 499 deletions.
20 changes: 6 additions & 14 deletions vulnerabilities/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -747,14 +747,6 @@ def fixed_package_details(self):
sort_fixed_by_packages_by_version = self.sort_by_version(later_fixed_packages)
closest_fixed_package = sort_fixed_by_packages_by_version[0]
closest_fixed_package_vulns = closest_fixed_package.affected_by
print(
"\nclosest_fixed_package_vulns = {}\n".format(closest_fixed_package_vulns)
)
print(
"\ntype(closest_fixed_package_vulns) = {}\n".format(
type(closest_fixed_package_vulns)
)
)

else:
closest_fixed_package = None
Expand All @@ -776,13 +768,13 @@ def fixed_package_details(self):
dict_vuln["fixed_by_purl_vulnerabilities"] = []

# Temporary print output during dev/testing.
from pprint import pprint
# from pprint import pprint

pprint(
purl_dict,
sort_dicts=False,
)
print("")
# pprint(
# purl_dict,
# sort_dicts=False,
# )
# print("")

return purl_dict

Expand Down
2 changes: 1 addition & 1 deletion vulnerabilities/templates/package_details.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<table class="table vcio-table width-100-pct mt-2">
<tbody>
<tr>
<td class="two-col-left" style="width: 175px;">
<td class="two-col-left">
<span
class="has-tooltip-multiline has-tooltip-black has-tooltip-arrow has-tooltip-text-left"
data-tooltip="The package url or purl is a URL string used to identify and locate a software package."
Expand Down
Loading

0 comments on commit b750d65

Please sign in to comment.