Skip to content

Commit 8bafcb6

Browse files
committed
Reorder tabs
Signed-off-by: Philippe Ombredanne <[email protected]>
1 parent cc2d2b8 commit 8bafcb6

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

vulnerabilities/migrations/0027_alter_all_models_to_add_ordering.py renamed to vulnerabilities/migrations/0024_alter_all_models_to_add_ordering.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
class Migration(migrations.Migration):
77

88
dependencies = [
9-
('vulnerabilities', '0026_alter_package_purl'),
9+
('vulnerabilities', '0023_vcid_migration'),
1010
]
1111

1212
operations = [
@@ -16,7 +16,7 @@ class Migration(migrations.Migration):
1616
),
1717
migrations.AlterModelOptions(
1818
name='package',
19-
options={'ordering': ['purl']},
19+
options={'ordering': ['type', 'namespace', 'name', 'version', 'qualifiers', 'subpath']},
2020
),
2121
migrations.AlterModelOptions(
2222
name='packagerelatedvulnerability',

vulnerabilities/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def purl(self):
174174

175175
class Meta:
176176
unique_together = ["type", "namespace", "name", "version", "qualifiers", "subpath"]
177-
ordering = ["purl"]
177+
ordering = ["type", "namespace", "name", "version", "qualifiers", "subpath"]
178178

179179
def __str__(self):
180180
return self.package_url

vulnerabilities/templates/vulnerability_details.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,36 +28,36 @@
2828

2929
<div class="tabs is-boxed" id="tabs">
3030
<ul>
31-
<li class="is-active" data-tab="1">
31+
<li class="is-active" data-tab="essentials">
3232
<a>
3333
<span>Essentials</span>
3434
</a>
3535
</li>
36-
<li data-tab="2">
36+
<li data-tab="fixed-by">
3737
<a>
3838
<span>
39-
References ({{ vulnerability.references.all|length }})
39+
Fixed by packages ({{ vulnerability.resolved_to|length }})
4040
</span>
4141
</a>
4242
</li>
43-
<li data-tab="3">
43+
<li data-tab="affected-packages">
4444
<a>
4545
<span>
4646
Affected packages ({{ vulnerability.vulnerable_to|length }})
4747
</span>
4848
</a>
4949
</li>
50-
<li data-tab="4">
50+
<li data-tab="references">
5151
<a>
5252
<span>
53-
Fixed by packages ({{ vulnerability.resolved_to|length }})
53+
References ({{ vulnerability.references.all|length }})
5454
</span>
5555
</a>
5656
</li>
5757
</ul>
5858
</div>
5959
<div id="tab-content">
60-
<div class="tab-div is-active" data-content="1">
60+
<div class="tab-div is-active" data-content="essentials">
6161
<div class="tab-nested-div">
6262
<table class="table vcio-table width-100-pct width-100-pct mt-2">
6363
<tbody>
@@ -178,7 +178,7 @@
178178
</div>
179179
</div>
180180

181-
<div class="tab-div content" data-content="2">
181+
<div class="tab-div content" data-content="references">
182182
<table class="table is-bordered is-striped is-narrow is-hoverable is-fullwidth">
183183
<thead>
184184
<tr>
@@ -205,7 +205,7 @@
205205
</table>
206206
</div>
207207

208-
<div class="tab-div content" data-content="3">
208+
<div class="tab-div content" data-content="affected-packages">
209209
<table class="table is-bordered is-striped is-narrow is-hoverable is-fullwidth">
210210
<thead>
211211
<tr>
@@ -234,7 +234,7 @@
234234
</table>
235235
</div>
236236

237-
<div class="tab-div content" data-content="4">
237+
<div class="tab-div content" data-content="fixed-by">
238238
<table class="table is-bordered is-striped is-narrow is-hoverable is-fullwidth">
239239
<thead>
240240
<tr>

0 commit comments

Comments
 (0)