|
10 | 10 | </div> |
11 | 11 |
|
12 | 12 | {% if page_obj.object_list %} |
13 | | - <table class="table table-bordered table-md text-break"> |
14 | | - <thead> |
| 13 | + <table class="table table-hover"> |
| 14 | + <thead class="table-light"> |
15 | 15 | <tr> |
16 | | - <th>{% trans "Package" %}</th> |
17 | | - <th>{% trans "Recommended action" %}</th> |
18 | | - <th>{% trans "Ruleset" %}</th> |
19 | | - <th>{% trans "Rules triggered" %}</th> |
20 | | - <th>{% trans "Detected" %}</th> |
| 16 | + <th style="width: 38%">{% trans "Package" %}</th> |
| 17 | + <th style="width: 22%">{% trans "Recommended action" %}</th> |
| 18 | + <th>{% trans "Vulnerability exposure" %}</th> |
| 19 | + <th style="width: 10%" class="text-nowrap">{% trans "Detected" %}</th> |
21 | 20 | </tr> |
22 | 21 | </thead> |
23 | 22 | <tbody> |
24 | 23 | {% for record in page_obj.object_list %} |
25 | | - <tr> |
26 | | - <td> |
27 | | - <strong> |
28 | | - <a href="{{ record.product_package.package.get_absolute_url }}#vulnerabilities" target="_blank"> |
29 | | - {{ record.product_package.package }} |
30 | | - </a> |
31 | | - </strong> |
| 24 | + <tr class="align-top"> |
| 25 | + <td class="py-3"> |
| 26 | + <a class="fw-semibold text-decoration-none" |
| 27 | + href="{{ record.product_package.package.get_absolute_url }}#vulnerabilities" |
| 28 | + target="_blank"> |
| 29 | + {{ record.product_package.package }} |
| 30 | + </a> |
| 31 | + <div class="d-flex flex-wrap gap-2 mt-2"> |
| 32 | + {% with score=record.product_package.weighted_risk_score %} |
| 33 | + {% if score %} |
| 34 | + <span class="badge {% if score >= 8.0 %}bg-danger-subtle text-danger-emphasis{% elif score >= 6.0 %}bg-warning-subtle text-warning-emphasis{% elif score >= 3.0 %}bg-info-subtle text-info-emphasis{% else %}bg-secondary-subtle text-secondary-emphasis{% endif %}"> |
| 35 | + {% trans "Risk" %} {{ score }} |
| 36 | + </span> |
| 37 | + {% endif %} |
| 38 | + {% endwith %} |
| 39 | + {% if record.product_package.is_deployed %} |
| 40 | + <span class="badge bg-body-tertiary text-body-secondary border"> |
| 41 | + {% trans "Deployed" %} |
| 42 | + </span> |
| 43 | + {% endif %} |
| 44 | + {% if record.product_package.purpose %} |
| 45 | + <span class="badge bg-body-tertiary text-body-secondary border"> |
| 46 | + {{ record.product_package.purpose.label }} |
| 47 | + </span> |
| 48 | + {% endif %} |
| 49 | + </div> |
32 | 50 | </td> |
33 | | - <td> |
34 | | - <span class="badge bg-warning-subtle text-warning-emphasis"> |
35 | | - {{ record.action_label }} |
36 | | - </span> |
| 51 | + <td class="py-3"> |
| 52 | + <div> |
| 53 | + <span class="badge {{ record.action_badge_class }} px-2 py-1"> |
| 54 | + <i class="fas {{ record.action_icon }} me-1"></i>{{ record.action_label }} |
| 55 | + </span> |
| 56 | + </div> |
| 57 | + <div class="small text-body-secondary mt-2"> |
| 58 | + <i class="fas fa-layer-group fa-xs me-1"></i>{{ record.ruleset.name }} |
| 59 | + </div> |
37 | 60 | </td> |
38 | | - <td class="text-nowrap">{{ record.ruleset.name }}</td> |
39 | | - <td> |
40 | | - {% for label in record.rule_labels %} |
41 | | - <div class="small">{{ label }}</div> |
42 | | - {% endfor %} |
| 61 | + <td class="py-3"> |
| 62 | + <div class="d-flex flex-wrap align-items-center gap-1"> |
| 63 | + {% if record.critical_count %} |
| 64 | + <span class="badge bg-danger-subtle text-danger-emphasis"> |
| 65 | + {{ record.critical_count }} {% trans "critical" %} |
| 66 | + </span> |
| 67 | + {% endif %} |
| 68 | + {% if record.high_count %} |
| 69 | + <span class="badge bg-warning-subtle text-warning-emphasis"> |
| 70 | + {{ record.high_count }} {% trans "high" %} |
| 71 | + </span> |
| 72 | + {% endif %} |
| 73 | + {% if record.vulnerability_count and not record.critical_count and not record.high_count %} |
| 74 | + <span class="badge bg-warning-subtle text-warning-emphasis"> |
| 75 | + {{ record.vulnerability_count }} {% trans "vulnerabilities" %} |
| 76 | + </span> |
| 77 | + {% endif %} |
| 78 | + </div> |
| 79 | + {% if record.vulnerability_count %} |
| 80 | + <div class="mt-2"> |
| 81 | + <a href="{{ record.product_package.package.get_absolute_url }}#vulnerabilities" |
| 82 | + target="_blank" |
| 83 | + class="small text-body-secondary text-decoration-none"> |
| 84 | + {{ record.vulnerability_count }} {% trans "total" %} → |
| 85 | + </a> |
| 86 | + </div> |
| 87 | + {% endif %} |
| 88 | + </td> |
| 89 | + <td class="py-3 small text-body-secondary text-nowrap"> |
| 90 | + {{ record.detected_date|date:"N j, Y" }} |
43 | 91 | </td> |
44 | | - <td class="text-nowrap small text-body-secondary">{{ record.detected_date|date:"Y-m-d" }}</td> |
45 | 92 | </tr> |
46 | 93 | {% endfor %} |
47 | 94 | </tbody> |
|
53 | 100 | <div class="text-center py-5"> |
54 | 101 | <i class="fa-solid fa-circle-check text-success fs-2"></i> |
55 | 102 | <div class="mt-2 fw-semibold">{% trans "No pending triage actions" %}</div> |
56 | | - <div class="text-body-secondary small mt-1">{% trans "All packages are within acceptable risk parameters." %}</div> |
| 103 | + <div class="text-body-secondary small mt-1"> |
| 104 | + {% trans "All packages are within acceptable risk parameters." %} |
| 105 | + </div> |
57 | 106 | </div> |
58 | 107 | {% endif %} |
0 commit comments