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
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
{% include 'component_catalog/includes/vulnerability_icon_link.html' with url=instance.get_absolute_url count=relation.vulnerability_count %}
{% endif %}
{% if relation.package_id and relation.package.declared_dependencies.all %}
<a class="btn badge text-bg-primary rounded-pill ms-1"
<a class="btn badge bg-primary-subtle text-primary-emphasis rounded-pill ms-1"
href="{{ product.get_absolute_url }}?dependencies-for_package__uuid={{ relation.package.uuid }}#dependencies" data-bs-toggle="tooltip" title="Dependencies" aria-label="Dependencies">
{{ relation.package.declared_dependencies.all|length }}<i class="fa-solid fa-share-nodes ms-1"></i>
</a>
Expand Down
3 changes: 3 additions & 0 deletions dejacode/static/css/dejacode_bootstrap.css
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ table.text-break thead {
background-color: var(--bs-djc-blue-bg);
height: 54px;
}
.nav {
--bs-nav-link-padding-x: 0.75rem;
}
.navbar-nav .active>.nav-link,
.navbar-nav .show>.nav-link
.navbar-nav .nav-link.active,
Expand Down
2 changes: 1 addition & 1 deletion dje/templates/dataspace_home.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ <h2 class="card-header fw-bold px-2 h6">{{ card.title }}</h2>
{% if forloop.first %}
<ul class="mb-1 ps-3">
{% endif %}
<li>{{ obj }}</li>
<li class="mb-1">{{ obj }}</li>
{% if forloop.last %}
</ul>
{% endif %}
Expand Down
11 changes: 7 additions & 4 deletions dje/templates/hierarchy_base.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,13 @@
// Draw if the hierarchy tab is active
if (isTabActive(tabId)) jsPlumbHierarchy.setSuspendDrawing(false, true);

document.querySelector('button[data-bs-target="#tab_hierarchy"]').addEventListener('shown.bs.tab', function (e) {
// Second argument instructs jsPlumb to perform a full repaint.
jsPlumbHierarchy.setSuspendDrawing(false, true);
});
const hierarchyTab = document.querySelector('button[data-bs-target="#tab_hierarchy"]');
if (hierarchyTab) {
hierarchyTab.addEventListener('shown.bs.tab', function (e) {
// Second argument instructs jsPlumb to perform a full repaint.
jsPlumbHierarchy.setSuspendDrawing(false, true);
});
}

// Repaint on resizing the browser window if the related tab is active
window.addEventListener('resize', function(){
Expand Down
2 changes: 1 addition & 1 deletion dje/templates/object_details_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ <h1 class="header-title text-break">
{% endblock %}

<nav role="navigation">
<ul class="nav nav-tabs container px-3" id="details_tab" role="tablist">
<ul class="nav nav-tabs container px-1" id="details_tab" role="tablist">
{% for tab_name, tab_context in tabsets.items %}
<li class="nav-item" role="presentation"{% if tab_context.tooltip %} data-bs-toggle="tooltip" title="{{ tab_context.tooltip }}"{% endif %}>
<button class="nav-link{% if forloop.first %} active{% endif %}" id="tab_{{ tab_name|slugify }}-tab" data-bs-toggle="tab" data-bs-target="#tab_{{ tab_name|slugify }}" type="button" role="tab" aria-controls="tab_{{ tab_name|slugify }}" aria-selected="{% if forloop.first %}true{% else %}false{% endif %}"{% if tab_context.disabled %} disabled="disabled"{% endif %}>
Expand Down
2 changes: 2 additions & 0 deletions license_library/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class LicenseFilterSet(DataspacedFilterSet):
"category",
"license_profile",
"owner",
"usage_policy",
],
empty_label="Relevance",
)
Expand Down Expand Up @@ -98,6 +99,7 @@ class Meta:
"license_profile",
"usage_policy",
"in_spdx_list",
"usage_policy__compliance_alert",
]

def __init__(self, *args, **kwargs):
Expand Down
3 changes: 0 additions & 3 deletions product_portfolio/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,9 +431,6 @@ def get_manage_components_url(self):
def get_manage_packages_url(self):
return self.get_url("manage_packages")

def get_license_summary_url(self):
return self.get_url("license_summary")

def get_check_package_version_url(self):
return self.get_url("check_package_version")

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% load i18n %}
{% url product.get_absolute_url as product_url %}
<div class="row g-4 mb-4">
{# License panel #}
<div class="col-lg-6">
Expand Down Expand Up @@ -43,9 +44,9 @@ <h3 class="fs-6 fw-medium mb-0">{% trans "License compliance" %}</h3>
{% if license_issues_count == 0 %}
<span class="badge bg-success-subtle text-success-emphasis">{% trans "OK" %}</span>
{% elif license_error_count > 0 %}
<span class="badge bg-danger-subtle text-danger-emphasis">{% trans "Error" %}</span>
<a href="{{ product_url }}?licenses-usage_policy__compliance_alert=error#licenses" class="badge bg-danger-subtle text-danger-emphasis">{% trans "Error" %}</a>
{% else %}
<span class="badge bg-warning-subtle text-warning-emphasis">{% trans "Warning" %}</span>
<a href="{{ product_url }}?licenses-usage_policy__compliance_alert=warning#licenses" class="badge bg-warning-subtle text-warning-emphasis">{% trans "Warning" %}</a>
{% endif %}
</div>
</div>
Expand Down Expand Up @@ -76,9 +77,9 @@ <h3 class="fs-6 fw-medium mb-0">{% trans "License compliance" %}</h3>
</td>
<td class="text-end">
{% if license.compliance_alert == "error" %}
<span class="badge bg-danger-subtle text-danger-emphasis">{% trans "Error" %}</span>
<a href="{{ product_url }}?licenses-usage_policy__compliance_alert=error#licenses" class="badge bg-danger-subtle text-danger-emphasis">{% trans "Error" %}</a>
{% elif license.compliance_alert == "warning" %}
<span class="badge bg-warning-subtle text-warning-emphasis">{% trans "Warning" %}</span>
<a href="{{ product_url }}?licenses-usage_policy__compliance_alert=warning#licenses" class="badge bg-warning-subtle text-warning-emphasis">{% trans "Warning" %}</a>
{% else %}
<span class="badge bg-success-subtle text-success-emphasis">{% trans "OK" %}</span>
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,17 @@ <h1 class="h3 mb-0">
</td>
<td class="text-end">
{% if product.license_error_count %}
<span class="badge bg-danger-subtle text-danger-emphasis">
<a href="{{ product_url }}?licenses-usage_policy__compliance_alert=warning#licenses" class="badge bg-danger-subtle text-danger-emphasis">
{{ product.license_error_count }} {% trans "error" %}{{ product.license_error_count|pluralize }}
</span>
</a>
{% endif %}
{% if product.license_warning_count %}
<span class="badge bg-warning-subtle text-warning-emphasis ms-1">
<a href="{{ product_url }}?licenses-usage_policy__compliance_alert=error#licenses" class="badge bg-warning-subtle text-warning-emphasis ms-1">
{{ product.license_warning_count }} {% trans "warning" %}{{ product.license_warning_count|pluralize }}
</span>
</a>
{% endif %}
{% if not product.license_error_count and not product.license_warning_count %}
<span class="badge bg-success-subtle text-success-emphasis">{% trans "OK" %}</span>
<a href="{{ product_url }}#licenses" class="badge bg-success-subtle text-success-emphasis">{% trans "OK" %}</a>
{% endif %}
</td>
<td class="text-end">
Expand All @@ -170,16 +170,16 @@ <h1 class="h3 mb-0">
</span>
{% endif %}
{% if product.critical_count %}
<span class="badge bg-danger-subtle text-danger-emphasis">{{ product.critical_count }} {% trans "critical" %}</span>
<a href="{{ product_url }}?vulnerabilities-weighted_risk_score=critical#vulnerabilities" class="badge bg-danger-subtle text-danger-emphasis">{{ product.critical_count }} {% trans "critical" %}</a>
{% endif %}
{% if product.high_count %}
<span class="badge bg-warning-orange-subtle text-warning-orange ms-1">{{ product.high_count }} {% trans "high" %}</span>
<a href="{{ product_url }}?vulnerabilities-weighted_risk_score=high#vulnerabilities" class="badge bg-warning-orange-subtle text-warning-orange ms-1">{{ product.high_count }} {% trans "high" %}</a>
{% endif %}
{% if product.medium_count %}
<span class="badge bg-warning-subtle text-warning-emphasis ms-1">{{ product.medium_count }} {% trans "medium" %}</span>
<a href="{{ product_url }}?vulnerabilities-weighted_risk_score=medium#vulnerabilities" class="badge bg-warning-subtle text-warning-emphasis ms-1">{{ product.medium_count }} {% trans "medium" %}</a>
{% endif %}
{% if product.low_count %}
<span class="badge bg-info-subtle text-info-emphasis ms-1">{{ product.low_count }} {% trans "low" %}</span>
<a href="{{ product_url }}?vulnerabilities-weighted_risk_score=low#vulnerabilities" class="badge bg-info-subtle text-info-emphasis ms-1">{{ product.low_count }} {% trans "low" %}</a>
{% endif %}
{% if not product.vulnerability_count %}
<span class="text-body-tertiary small">{% trans "None" %}</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
</span>
{% endif %}
{% if relation.package_id and relation.package.declared_dependencies.all %}
<a class="btn badge text-bg-primary rounded-pill ms-1"
<a class="btn badge bg-primary-subtle text-primary-emphasis rounded-pill ms-1"
href="{{ product.get_absolute_url }}?dependencies-for_package__uuid={{ relation.package.uuid }}#dependencies" class="ms-1" data-bs-toggle="tooltip" title="Dependencies" aria-label="Dependencies">
{{ relation.package.declared_dependencies.all|length }}<i class="fa-solid fa-share-nodes ms-1"></i>
</a>
Expand Down
75 changes: 0 additions & 75 deletions product_portfolio/templates/product_portfolio/license_summary.html

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
<i class="fas fa-plus-circle"></i> {% trans 'Add custom Component' %}
</button>
{% endif %}
<a class="dropdown-item" href="{{ object.get_license_summary_url }}"><i class="fa fa-book"></i> {% trans 'License summary' %}</a>
{% if purldb_enabled %}
<a class="dropdown-item" href="#" id="check-package-versions"><i class="fas fa-arrow-alt-circle-up"></i> {% trans 'Check for new Package versions' %}</a>
{% endif %}
Expand Down Expand Up @@ -143,7 +142,7 @@
{% if has_edit_productpackage or has_edit_productcomponent %}
{% include 'product_portfolio/modals/edit_productpackage_modal.html' %}
{% endif %}
{% if tabsets.Imports %}
{% if tabsets.Activity %}
{% include 'product_portfolio/modals/scancode_project_status_modal.html' %}
{% endif %}
{% if request.user.dataspace.enable_vulnerablecodedb_access and product.vulnerability_count %}
Expand Down
Loading
Loading