feat(cve): show all CVEs with fixable indicator in list screen
All checks were successful
Build and Release .deb / build-deb (push) Successful in 21s
All checks were successful
Build and Release .deb / build-deb (push) Successful in 21s
- filter_actionable_cves now marks all CVEs with 'fixable' boolean - cve_list in cache contains ALL CVEs (not just actionable ones) - CVEListScreen adds 'Corrigeable' column with 🟢/🔴 indicator - Sidebar counter still shows only actionable CVEs (cve_count)
This commit is contained in:
parent
e22f416500
commit
86eda73eb9
2 changed files with 37 additions and 20 deletions
|
|
@ -9,6 +9,21 @@ except Exception:
|
|||
PYPERCLIP_OK = False
|
||||
|
||||
|
||||
SCREEN_CSS = """
|
||||
align: left top;
|
||||
padding: 1 2;
|
||||
#toolbar {
|
||||
height: auto;
|
||||
dock: top;
|
||||
margin-bottom: 1;
|
||||
}
|
||||
DataTable {
|
||||
height: 1fr;
|
||||
border: solid $primary;
|
||||
}
|
||||
"""
|
||||
|
||||
|
||||
class PackageListScreen(Screen):
|
||||
BINDINGS = [("b", "back", "Retour")]
|
||||
DEFAULT_CSS = """
|
||||
|
|
@ -75,14 +90,15 @@ class CVEListScreen(Screen):
|
|||
with Horizontal(id="toolbar"):
|
||||
yield Button("⬅ Retour", id="cve-back", variant="default")
|
||||
table = DataTable(id="cve-table")
|
||||
table.add_columns("CVE-ID", "Paquet", "Lien")
|
||||
table.add_columns("CVE-ID", "Paquet", "Corrigeable", "Lien")
|
||||
table.cursor_type = "row"
|
||||
for i, cve in enumerate(self.cves):
|
||||
cve_id = cve.get("id", "?")
|
||||
pkg = cve.get("package", "?")
|
||||
url = cve.get("url", "")
|
||||
fixable = "🟢 Oui" if cve.get("fixable") else "🔴 Non"
|
||||
self.urls[i] = url
|
||||
table.add_row(cve_id, pkg, url)
|
||||
table.add_row(cve_id, pkg, fixable, url)
|
||||
yield table
|
||||
|
||||
def on_data_table_row_selected(self, event: DataTable.RowSelected):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue