Skip to content

Commit

Permalink
Display the dependency Package URL in the tab table #138
Browse files Browse the repository at this point in the history
Signed-off-by: tdruez <[email protected]>
  • Loading branch information
tdruez committed Jul 17, 2024
1 parent a8b79f9 commit 38e4c8c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
4 changes: 4 additions & 0 deletions product_portfolio/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1401,3 +1401,7 @@ class Meta:

def __str__(self):
return self.dependency_uid

@property
def package_url(self):
return self.dependency_uid.split("?")[0]
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
<table class="table table-bordered table-hover table-md text-break">
<thead>
<tr>
<th>
{% trans 'Package URL' %}
</th>
<th>
{% trans 'For package' %}
</th>
Expand All @@ -43,26 +46,29 @@
{% trans 'Scope' %}
</th>
<th>
{% trans 'Is runtime' %}
{% trans 'Runtime' %}
{{ filter_dependency.form.is_runtime }}
</th>
<th>
{% trans 'Is optional' %}
{% trans 'Optional' %}
{{ filter_dependency.form.is_optional }}
</th>
<th>
{% trans 'Is resolved' %}
{% trans 'Resolved' %}
{{ filter_dependency.form.is_resolved }}
</th>
<th>
{% trans 'Is direct' %}
{% trans 'Direct' %}
{{ filter_dependency.form.is_direct }}
</th>
</tr>
</thead>
<tbody class="text-break">
{% for dependency in page_obj.object_list %}
<tr class="{% cycle 'odd' '' %}">
<td title="{{ dependency.dependency_uid }}">
{{ dependency.package_url }}
</td>
<td>
{% if dependency.for_package %}
<strong>
Expand Down

0 comments on commit 38e4c8c

Please sign in to comment.