Skip to content

Commit

Permalink
Merge pull request #1743 from aboutcode-org/1077-ui-add-description-r…
Browse files Browse the repository at this point in the history
…elease

Add description and reference to the latest release on the homepage
  • Loading branch information
TG1999 authored Jan 16, 2025
2 parents e484e33 + 656fd7d commit 47063de
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 6 deletions.
35 changes: 30 additions & 5 deletions vulnerabilities/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,33 @@
{% endblock %}

{% block content %}
<section class="section pt-0">
{% include "package_search_box.html" %}
{% include "vulnerability_search_box.html" %}
</section>
{% endblock %}
<section class="section pt-2">
<div class="container">
<div class="columns is-centered mb-5 mt-2">
<div class="column is-full-tablet is-full-desktop">
{% include "vulnerability_search_box.html" %}
</div>
</div>
<div class="columns is-centered mb-5">
<div class="column is-full-tablet is-full-desktop">
{% include "package_search_box.html" %}
</div>
</div>
<div class="notification is-info is-light has-text-centered">
<p class="is-size-6 has-text-grey-dark has-text-centered mb-3">
<strong>VulnerableCode</strong> aggregates software
vulnerabilities from multiple public advisory sources
and presents their details along with their affected
packages and fixed-by packages identified by
Package URLs (PURLs).
</p>
<p class="is-size-5">
<strong>What's new in this Release:</strong>
<a href="{{ release_url }}" target="_blank" class="has-text-link is-underlined">
Check out latest updates here!
</a>
</p>
</div>
</div>
</section>
{% endblock %}
3 changes: 2 additions & 1 deletion vulnerabilities/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# See https://aboutcode.org for more information about nexB OSS projects.
#
import logging
from datetime import datetime

from cvss.exceptions import CVSS2MalformedError
from cvss.exceptions import CVSS3MalformedError
Expand All @@ -34,6 +33,7 @@
from vulnerabilities.severity_systems import EPSS
from vulnerabilities.severity_systems import SCORING_SYSTEMS
from vulnerabilities.utils import get_severity_range
from vulnerablecode import __version__ as VULNERABLECODE_VERSION
from vulnerablecode.settings import env

PAGE_SIZE = 20
Expand Down Expand Up @@ -256,6 +256,7 @@ def get(self, request):
context = {
"vulnerability_search_form": VulnerabilitySearchForm(request_query),
"package_search_form": PackageSearchForm(request_query),
"release_url": f"https://github.com/aboutcode-org/vulnerablecode/releases/tag/v{VULNERABLECODE_VERSION}",
}
return render(request=request, template_name=self.template_name, context=context)

Expand Down

0 comments on commit 47063de

Please sign in to comment.