Skip to content

Commit fee6119

Browse files
committed
Fix UI bug causing Essentials and EPSS tabs to overlap
Signed-off-by: Sampurna Pyne <sampurnapyne1710@gmail.com>
1 parent f799b7f commit fee6119

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

vulnerabilities/templates/advisory_detail.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
<div class="tabs is-boxed" id="tabs">
2727
<ul>
28-
<li class="{% if not 'epss_page' in request.GET %}is-active{% endif %}" data-tab="essentials">
28+
<li class="{% if not is_epss_tab_active %}is-active{% endif %}" data-tab="essentials">
2929
<a>
3030
<span>Essentials</span>
3131
</a>
@@ -55,7 +55,7 @@
5555
</li>
5656
{% endif %}
5757

58-
<li class="{% if 'epss_page' in request.GET %}is-active{% endif %}" data-tab="epss">
58+
<li class="{% if is_epss_tab_active %}is-active{% endif %}" data-tab="epss">
5959
<a>
6060
<span>
6161
EPSS
@@ -101,7 +101,7 @@
101101
</ul>
102102
</div>
103103
<div id="tab-content">
104-
<div class="tab-div is-active" data-content="essentials">
104+
<div class="tab-div {% if not is_epss_tab_active %}is-active{% endif %}" data-content="essentials">
105105
<div class="tab-nested-div">
106106
<table class="table vcio-table width-100-pct mt-2">
107107
<tbody>
@@ -459,7 +459,7 @@
459459
{% endfor %}
460460
</div>
461461

462-
<div class="tab-div content {% if 'epss_page' in request.GET %}is-active{% endif %}" data-content="epss">
462+
<div class="tab-div content {% if is_epss_tab_active %}is-active{% endif %}" data-content="epss">
463463
{% if epss_data %}
464464
<div class="has-text-weight-bold tab-nested-div ml-1 mb-1 mt-1">
465465
Exploit Prediction Scoring System (EPSS)

vulnerabilities/views.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,7 @@ def add_ssvc(ssvc):
806806
)
807807

808808
show_epss_chart = "epss_page" in self.request.GET or advisory.severities.exists()
809+
is_epss_tab_active = "epss_page" in self.request.GET
809810

810811
context.update(
811812
{
@@ -821,6 +822,7 @@ def add_ssvc(ssvc):
821822
"epss_history_data": epss_history_data,
822823
"epss_pagination_obj": epss_pagination_obj,
823824
"show_epss_chart": show_epss_chart,
825+
"is_epss_tab_active": is_epss_tab_active,
824826
}
825827
)
826828
return context

0 commit comments

Comments
 (0)