diff options
author | 2019-02-20 15:00:24 -0800 | |
---|---|---|
committer | 2019-02-20 15:00:24 -0800 | |
commit | ab29b17e353d961a0736e678794cee4931e68422 (patch) | |
tree | 0fda51bd1e04c2e2096b5bd4c65edf57e0a2a660 | |
parent | 652a7ebc28edecbaac24a6fbb543544866037d29 (diff) | |
download | srtool-ab29b17e353d961a0736e678794cee4931e68422.tar.gz srtool-ab29b17e353d961a0736e678794cee4931e68422.tar.bz2 srtool-ab29b17e353d961a0736e678794cee4931e68422.zip |
srtool_reports: fix investigations product filter, CVE report
Fix the key for the product filter in the investigations table,
and the output for full reports in the CVE->defects report.
Signed-off-by: David Reyna <David.Reyna@windriver.com>
-rw-r--r-- | lib/srtgui/reports.py | 17 | ||||
-rw-r--r-- | lib/srtgui/tables.py | 2 |
2 files changed, 7 insertions, 12 deletions
diff --git a/lib/srtgui/reports.py b/lib/srtgui/reports.py index 297b885a..572e45bf 100644 --- a/lib/srtgui/reports.py +++ b/lib/srtgui/reports.py @@ -824,7 +824,7 @@ class CvesReport(Report): '%s %s' % (cve.cvssV3_baseScore,cve.cvssV3_baseSeverity), cve.get_publish_text, vulnerability.name if vulnerability else '<no_vulnerability>', - investigation.name if investigation else '', + investigation.name if investigation else '<no_investigation>', investigation.product.long_name if investigation and investigation.product else '<no_product>', investigation.get_priority_text if investigation else '', investigation.get_status_text if investigation else '', @@ -836,24 +836,19 @@ class CvesReport(Report): ]) else: writer.writerow([ - cve.name, cve.get_status_text, - '%s %s' % (cve.recommend,cve.recommend_list), - cve.cve_data_type, - cve.cve_data_format, - cve.cve_data_version, '%s %s' % (cve.cvssV3_baseScore,cve.cvssV3_baseSeverity), - '%s %s' % (cve.cvssV2_baseScore,cve.cvssV2_severity), cve.get_publish_text, - vulnerability.name if vulnerability else '', - investigation.name if investigation else '', + vulnerability.name if vulnerability else '<no_vulnerability>', + investigation.name if investigation else '<no_investigation>', + investigation.product.long_name if investigation and investigation.product else '<no_product>', investigation.get_priority_text if investigation else '', investigation.get_status_text if investigation else '', investigation.get_outcome_text if investigation else '', - defect.name if defect else '', + defect.name if defect else '<no_defect>', defect.get_priority_text if defect else '', defect.get_status_text if defect else '', - defect.get_outcome_text if defect else '', + defect.get_resolution_text if defect else '', ]) def exec_report(self, *args, **kwargs): diff --git a/lib/srtgui/tables.py b/lib/srtgui/tables.py index 0bfef4e5..44d02a11 100644 --- a/lib/srtgui/tables.py +++ b/lib/srtgui/tables.py @@ -1480,7 +1480,7 @@ class InvestigationsTable(ToasterTable): title="Filter Investigations by 'Product'") for p in Product.objects.all(): is_product.add_action( TableFilterActionToggle( - p.pk, + p.key, p.long_name, Q(product=p)) ) self.add_filter(is_product) |