Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion vulnerabilities/templates/advisory_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,35 @@
{% load static %}
{% load show_cvss %}
{% load url_filters %}
{% load utils %}

{% block title %}
VulnerableCode Advisory Details - {{ advisory.advisory_id }}
{% endblock %}

{% block extrahead %}
<style>
.summary-text {
line-height: 1.4;
white-space: pre-wrap;
word-break: break-word;
}

div.summary-text a:link,
div.summary-text a {
color: #3273dc !important;
}

div.summary-text a:visited {
color: #8a4de8 !important;
}

div.summary-text a:hover {
color: #0a0a0a !important;
}
</style>
{% endblock %}

{% block content %}

{% if advisory %}
Expand Down Expand Up @@ -124,7 +148,7 @@
</tr>
<tr>
<td class="two-col-left">Summary</td>
<td class="two-col-right wrap-strings">{{ advisory.summary }}
<td class="two-col-right summary-text">{{ advisory.summary|normalize_links|urlize }}
</td>
</tr>
{% if severity_score_range %}
Expand Down
6 changes: 4 additions & 2 deletions vulnerabilities/templates/advisory_todos.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ <h1>Advisory To-Dos</h1>
{{ form.search }}

{% if form.search.value %}
<a href="?{% querystring request search='' avid='' %}"
<a href="{{ request.path }}"
class="icon is-right"
style="pointer-events: auto; cursor: pointer;">
<i class="fa fa-close" style="color:grey"></i>
Expand All @@ -71,7 +71,7 @@ <h1>Advisory To-Dos</h1>
{{ form.avid }}

{% if form.avid.value %}
<a href="?{% querystring request search='' avid='' %}"
<a href="{{ request.path }}"
class="icon is-right"
style="pointer-events: auto; cursor: pointer;">
<i class="fa fa-close" style="color:gray"></i>
Expand Down Expand Up @@ -220,10 +220,12 @@ <h1>Advisory To-Dos</h1>
searchContainer.style.display = 'none';
lookupContainer.style.display = '';
searchContainer.querySelector('input').value = '';
lookupContainer.querySelector('input').value = avid;
} else {
searchContainer.style.display = '';
lookupContainer.style.display = 'none';
lookupContainer.querySelector('input').value = '';
searchContainer.querySelector('input').value = search;
}
}

Expand Down
10 changes: 9 additions & 1 deletion vulnerabilities/templates/pipeline_dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,16 @@ <h1>Pipeline Dashboard</h1>
</div>
<form method="get" class="box px-6 mx-0" action="">
<div class="field has-addons">
<div class="control is-expanded">
<div class="control is-expanded has-icons-right">
{{ form.search }}

{% if form.search.value %}
<a href="{{ request.path }}"
class="icon is-right"
style="pointer-events: auto; cursor: pointer;">
<i class="fa fa-close" style="color:gray"></i>
</a>
{% endif %}
</div>
<div class="control">
<button type="submit" class="button is-info"><i class="fa fa-search mx-1"></i></button>
Expand Down
5 changes: 5 additions & 0 deletions vulnerabilities/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1002,6 +1002,11 @@ class PipelineScheduleListView(VulnerableCodeListView, FormMixin):
paginate_by = 20
form_class = PipelineSchedulePackageForm

def get_form_kwargs(self):
kwargs = super().get_form_kwargs()
kwargs["data"] = self.request.GET
return kwargs

def get_queryset(self):
form = self.form_class(self.request.GET)
if form.is_valid():
Expand Down