Skip to content

Commit 9f220ac

Browse files
Add license detection improvements
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
1 parent 973d7aa commit 9f220ac

File tree

5 files changed

+40
-29
lines changed

5 files changed

+40
-29
lines changed

scanpipe/templates/scanpipe/license_detection_list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
{% empty %}
5151
<tr>
5252
<td colspan="42" class="has-text-centered p-3">
53-
No Licenses detected. <a href="?">Clear search and filters</a>
53+
No licenses detected. <a href="?">Clear search and filters</a>
5454
</td>
5555
</tr>
5656
{% endfor %}

scanpipe/templates/scanpipe/panels/license_detections_summary.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="column is-half">
44
<nav class="panel is-info">
55
<p class="panel-heading py-2 is-size-6">
6-
Unique License detections
6+
Unique license detections
77
</p>
88
{% for license_expression, count in license_detection_summary.items %}
99
<a class="panel-block is-align-items-flex-start break-word is-flex is-align-items-center" href="{{ project_licenses_url }}?license_expression={{ license_expression|default:'_EMPTY_' }}" target="_blank">
@@ -16,7 +16,7 @@
1616
{% endfor %}
1717
{% if total_counts.all %}
1818
<a class="panel-block is-align-items-flex-start break-word is-flex is-align-items-center" href="{{ project_licenses_url }}" target="_blank">
19-
See all License Detections
19+
See all license detections
2020
<span class="tag is-rounded ml-1">{{ total_counts.all|intcomma }}</span>
2121
{% if total_counts.with_compliance_error %}
2222
<span class="has-text-danger is-size-6 ml-2">

scanpipe/templates/scanpipe/tabset/tab_license_detections.html

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22
<table class="table is-bordered is-striped is-narrow is-hoverable is-fullwidth">
33
<thead>
44
<tr>
5-
<th>License Expression</th>
6-
<th>Origin Resource Path</th>
5+
<th>License expression</th>
6+
<th>Origin resource path</th>
7+
<th>Matched text</th>
78
<th>Rule URL</th>
89
<th>Score</th>
910
<th>Matcher</th>
10-
<th>Match Length</th>
11-
<th>Match Coverage</th>
12-
<th>Rule Relevance</th>
11+
<th>Match length</th>
12+
<th>Match coverage</th>
13+
<th>Rule relevance</th>
1314
</tr>
1415
</thead>
1516
<tbody>
@@ -22,7 +23,17 @@
2223
<a href="{% url 'resource_detail' project.slug match.from_file %}#detection">{{ match.from_file }}</a>
2324
</td>
2425
<td class="break-all">
25-
{{ match.rule_url }}
26+
{{ match.matched_text }}
27+
</td>
28+
<td class="break-all">
29+
{% if match.rule_url %}
30+
<a href="{{match.rule_url}}">
31+
{{ match.rule_identifier }}
32+
<i class="fa-solid fa-up-right-from-square is-small"></i>
33+
</a>
34+
{% else %}
35+
{{ match.rule_identifier }}
36+
{% endif %}
2637
</td>
2738
<td class="break-all">
2839
{{ match.score }}
@@ -47,7 +58,7 @@
4758
<table class="table is-bordered is-striped is-narrow is-hoverable is-fullwidth">
4859
<thead>
4960
<tr>
50-
<th>Detection Log</th>
61+
<th>Detection log</th>
5162
</tr>
5263
</thead>
5364
<tbody>
@@ -64,9 +75,9 @@
6475
<table class="table is-bordered is-striped is-narrow is-hoverable is-fullwidth">
6576
<thead>
6677
<tr>
67-
<th>Resource Path</th>
68-
<th>Start Line</th>
69-
<th>End Line</th>
78+
<th>Resource path</th>
79+
<th>Start line</th>
80+
<th>End line</th>
7081
</tr>
7182
</thead>
7283
<tbody>

scanpipe/templates/scanpipe/tabset/tab_package_detections.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<table class="table is-bordered is-striped is-narrow is-hoverable is-fullwidth">
33
<thead>
44
<tr>
5-
<th>Datafile Paths</th>
5+
<th>Datafile paths</th>
66
</tr>
77
</thead>
88
<tbody>
@@ -35,9 +35,9 @@
3535
<table class="table is-bordered is-striped is-narrow is-hoverable is-fullwidth">
3636
<thead>
3737
<tr>
38-
<th>License Detections</th>
39-
<th>License Expression</th>
40-
<th>License Expression SPDX</th>
38+
<th>License detections</th>
39+
<th>License expression</th>
40+
<th>License expression SPDX</th>
4141
</tr>
4242
</thead>
4343
<tbody>
@@ -61,9 +61,9 @@
6161
<table class="table is-bordered is-striped is-narrow is-hoverable is-fullwidth">
6262
<thead>
6363
<tr>
64-
<th>License Detections</th>
65-
<th>License Expression</th>
66-
<th>License Expression SPDX</th>
64+
<th>License detections</th>
65+
<th>License expression</th>
66+
<th>License expression SPDX</th>
6767
</tr>
6868
</thead>
6969
<tbody>

scanpipe/templates/scanpipe/tabset/tab_resource_detections.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<table class="table is-bordered is-striped is-narrow is-hoverable is-fullwidth">
44
<thead>
55
<tr>
6-
<th>License Detections</th>
7-
<th>License Expression</th>
8-
<th>License Expression SPDX</th>
6+
<th>License detections</th>
7+
<th>License expression</th>
8+
<th>License expression SPDX</th>
99
</tr>
1010
</thead>
1111
<tbody>
@@ -29,8 +29,8 @@
2929
<table class="table is-bordered is-striped is-narrow is-hoverable is-fullwidth">
3030
<thead>
3131
<tr>
32-
<th>License Expression</th>
33-
<th>License Clue Detials</th>
32+
<th>License expression</th>
33+
<th>License clue detials</th>
3434
</tr>
3535
</thead>
3636
<tbody>
@@ -52,8 +52,8 @@
5252
<thead>
5353
<tr>
5454
<th>Email</th>
55-
<th>Start Line</th>
56-
<th>End Line</th>
55+
<th>Start line</th>
56+
<th>End line</th>
5757
</tr>
5858
</thead>
5959
<tbody>
@@ -78,8 +78,8 @@
7878
<thead>
7979
<tr>
8080
<th>URL</th>
81-
<th>Start Line</th>
82-
<th>End Line</th>
81+
<th>Start line</th>
82+
<th>End line</th>
8383
</tr>
8484
</thead>
8585
<tbody>

0 commit comments

Comments
 (0)