File tree Expand file tree Collapse file tree 4 files changed +20
-4
lines changed
templates/product_portfolio/tabs Expand file tree Collapse file tree 4 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ <h1 class="header-title text-break">
9191 </ nav >
9292
9393 < div class ="background-white ">
94- < div class ="tab-content pt-4 px-0 container " style ="height: 100%; min-height: 28.5em; ">
94+ < div class ="tab-content pt-3 px-0 container " style ="height: 100%; min-height: 28.5em; ">
9595 {% for tab_name, tab_context in tabsets.items %}
9696 {# IDs are prefixed with "tab_" to avoid autoscroll issue #}
9797 < div class ="tab-pane{% if forloop.first %} show active{% endif %} " id ="tab_{{ tab_name|slugify }} " role ="tabpanel " aria-labelledby ="tab_{{ tab_name|slugify }}-tab " tabindex ="0 ">
Original file line number Diff line number Diff line change 11{% load humanize %}
22< div class ="row align-items-end ">
3- < div class ="col mb-3 ">
3+ < div class ="col mb-2 ">
44 < ul class ="nav nav-pills ">
55 < li class ="nav-item ">
66 < form id ="tab-{{ tab_id }}-search-form " class ="mt-md-0 me-sm-2 ">
Original file line number Diff line number Diff line change 22{% load as_icon from dje_tags %}
33
44{% include 'tabs/pagination.html' %}
5+
6+ {% if risk_threshold %}
7+ < small class ="d-inline-flex mb-3 px-2 py-1 fw-semibold text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 ">
8+ A risk threshold filter at "{{ risk_threshold }}" is currently applied.
9+ < a class ="ms-1 " href ="?vulnerabilities-bypass_risk_threshold=Yes#vulnerabilities "> Click here to see all vulnerabilities.</ a >
10+ </ small >
11+ {% endif %}
12+
513< table class ="table table-bordered table-md text-break ">
614 {% include 'includes/object_list_table_header.html' with filter=filterset include_actions=True %}
715 < tbody >
Original file line number Diff line number Diff line change @@ -541,7 +541,11 @@ def tab_vulnerabilities(self):
541541 if not all (display_tab_contions ):
542542 return
543543
544- risk_threshold = product .get_vulnerabilities_risk_threshold ()
544+ if self .request .GET .get ("vulnerabilities-bypass_risk_threshold" ):
545+ risk_threshold = None
546+ else :
547+ risk_threshold = product .get_vulnerabilities_risk_threshold ()
548+
545549 vulnerability_count = product .get_vulnerability_qs (risk_threshold = risk_threshold ).count ()
546550 if not vulnerability_count :
547551 label = 'Vulnerabilities <span class="badge bg-secondary">0</span>'
@@ -1153,7 +1157,11 @@ class ProductTabVulnerabilitiesView(
11531157
11541158 def get_context_data (self , ** kwargs ):
11551159 product = self .object
1156- risk_threshold = product .get_vulnerabilities_risk_threshold ()
1160+
1161+ if self .request .GET .get ("vulnerabilities-bypass_risk_threshold" ):
1162+ risk_threshold = None
1163+ else :
1164+ risk_threshold = product .get_vulnerabilities_risk_threshold ()
11571165
11581166 total_count = product .get_vulnerability_qs (risk_threshold = risk_threshold ).count ()
11591167 vulnerability_qs = (
You can’t perform that action at this time.
0 commit comments