dragnet 6.0.0 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f7d753aca8090f87852e9d4e85f021c6ce0a8500210385337651316119b52c44
4
- data.tar.gz: 8feb400e7bc41e1f41bc8987d1777273ee8dd7075a8c6ffcbc3d7d5091e01a8b
3
+ metadata.gz: ef69b75eaf7784a81c38f595c3472545d93169ce9835c1cd02401652b12bded8
4
+ data.tar.gz: e1543ca68c142d5b2a3450652126cfcc94931f88b133c358b4a998babf0dfda1
5
5
  SHA512:
6
- metadata.gz: 76d385680a7d5a5610f8d959f23e1e3c9f73fd4adf8dca34aa8ab82b7dd65ded853aa20b7361f93443d02626e954079784d5ee036694ee8de2076bbeb18d2df5
7
- data.tar.gz: fce543298fcc34525a61abbc2c268b86eb971a95cd842a5cce5f0bc503b38cfa36310ebffb642957c5b2706b55d54d21437f23ba2f5f212339b2d482618fab79
6
+ metadata.gz: c4da21f5b7d812bb272ab683cbe78723d484491f9541cadf11a47016c244c2385cb05d0671e04d01c9f255297f8f0a3e8e68db3efcc78e74a6957c219874b21a
7
+ data.tar.gz: 3faeb02b126e6599135bb7e862e30c06a160900c25a55928e86123a75c87dc2c55d38403bce02a5676923e5c3e27f23933d183de8c58b174120348726d79ecbf
data/CHANGELOG.md CHANGED
@@ -8,6 +8,12 @@ Please mark backwards incompatible changes with an exclamation mark at the start
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## [6.1.0] - 2026-05-08
12
+
13
+ ### Added
14
+ - The "Test Results" table in the HTML report can now be sorted by clicking on
15
+ the table's headers.
16
+
11
17
  ## [6.0.0] - 2025-09-23
12
18
 
13
19
  ### Changed
@@ -91,7 +91,7 @@ module Dragnet
91
91
  color = test_record.reviewed? ? 'green' : 'red'
92
92
  review_status = test_record.review_status.capitalize
93
93
  else
94
- color = 'gray'
94
+ color = 'muted'
95
95
  review_status = '(unknown)'
96
96
  end
97
97
 
@@ -143,7 +143,7 @@ module Dragnet
143
143
  # @return [String] The HTML code to produce a badge with the given color
144
144
  # and text.
145
145
  def badge_html(color, text)
146
- "<span class=\"badge bg-#{color}\">#{text}</span>"
146
+ "<span class=\"badge bg-#{color} text-#{color}-fg\">#{text}</span>"
147
147
  end
148
148
 
149
149
  # Converts the ID (+String+) or IDs (+Array<String>+) of a +TestRecord+
@@ -2,9 +2,10 @@
2
2
  <head>
3
3
  <meta charset="UTF-8" />
4
4
  <title>Dragnet Report for <%= repository.multi? ? "Multiple Repositories" : shorten_sha1(repository.head.sha) %></title>
5
- <script src="https://unpkg.com/@tabler/core@1.0.0-beta2/dist/js/tabler.min.js"></script>
5
+ <script src="https://unpkg.com/@tabler/core@1.0.0/dist/js/tabler.min.js"></script>
6
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/list.js/2.3.1/list.min.js"></script>
6
7
  <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
7
- <link rel="stylesheet" href="https://unpkg.com/@tabler/core@1.0.0-beta2/dist/css/tabler.min.css">
8
+ <link rel="stylesheet" href="https://unpkg.com/@tabler/core@1.0.0/dist/css/tabler.min.css">
8
9
  </head>
9
10
  <body class="antialiased"> <!-- theme-dark -->
10
11
  <div class="wrapper">
@@ -81,16 +82,6 @@
81
82
  <div class="page-wrapper">
82
83
  <div class="page-body">
83
84
  <div class="container-xl">
84
- <div class="alert alert-warning alert-dismissible" role="alert">
85
- <div class="d-flex">
86
- <div>
87
- <h4 class="alert-title">Not a customer report</h4>
88
- <div class="text-muted">Please be aware that this report should not be shared with external stakeholders. Exports for customers can be provided by other tools.</div>
89
- </div>
90
- </div>
91
- <a class="btn-close" data-bs-dismiss="alert" aria-label="close"></a>
92
- </div>
93
-
94
85
  <div class="row row-deck row-cards mb-3">
95
86
  <div class="col-sm-12">
96
87
  <div class="card">
@@ -294,7 +285,7 @@
294
285
 
295
286
  <tr>
296
287
  <td><%= relative_to_repo(error[:file]) %></td>
297
- <td><span class="badge bg-red">Failed</span></td>
288
+ <td><span class="badge bg-red text-red-fg">Failed</span></td>
298
289
  <td><%= error[:message] %><br><%= error[:exception].message %></td>
299
290
  </tr>
300
291
 
@@ -304,7 +295,7 @@
304
295
 
305
296
  <tr>
306
297
  <td><%= relative_to_repo(test_record.source_file) %></td>
307
- <td><span class="badge bg-green">Successfully Loaded</span></td>
298
+ <td><span class="badge bg-green text-green-fg">Successfully Loaded</span></td>
308
299
  <td>-</td>
309
300
  </tr>
310
301
 
@@ -324,28 +315,40 @@
324
315
  <div class="card-header">
325
316
  <h3 class="card-title">Overview</h3>
326
317
  </div>
327
- <div class="table-responsive">
318
+ <div id="test-results-table" class="table-responsive">
328
319
  <table class="table table-vcenter table-hover">
329
320
  <thead>
330
321
  <tr>
331
- <th>#</th>
332
- <th>Requirement ID</th>
333
- <th>SHA1</th>
334
- <th>Files</th>
335
- <th>Review Status</th>
336
- <th>Test Result</th>
322
+ <th>
323
+ <button class="table-sort d-flex justify-content-between" data-sort="sort-number">#</button>
324
+ </th>
325
+ <th>
326
+ <button class="table-sort d-flex justify-content-between" data-sort="sort-requirement-id">Requirement ID</button>
327
+ </th>
328
+ <th>
329
+ <button class="table-sort d-flex justify-content-between" data-sort="sort-sha1">SHA1</button>
330
+ </th>
331
+ <th>
332
+ <button class="table-sort d-flex justify-content-between" data-sort="sort-files">Files</button>
333
+ </th>
334
+ <th>
335
+ <button class="table-sort d-flex justify-content-between" data-sort="sort-review-status">Review Status</button>
336
+ </th>
337
+ <th>
338
+ <button class="table-sort d-flex justify-content-between" data-sort="sort-test-result">Test Result</button>
339
+ </th>
337
340
  <th>Details</th>
338
341
  </tr>
339
342
  </thead>
340
- <tbody>
343
+ <tbody class="table-tbody">
341
344
 
342
345
  <% test_records.each_with_index do |test_record, index| %>
343
346
 
344
347
  <tr>
345
- <td><%= index + 1 %></td>
346
- <td><%= test_record_id_to_string(test_record) %></td>
347
- <td><%= test_record.sha1 ? shorten_sha1(test_record.sha1) : '(None)' %></td>
348
- <td>
348
+ <td class="sort-number"><%= index + 1 %></td>
349
+ <td class="sort-requirement-id"><%= test_record_id_to_string(test_record) %></td>
350
+ <td class="sort-sha1"><%= test_record.sha1 ? shorten_sha1(test_record.sha1) : '(None)' %></td>
351
+ <td class="sort-files">
349
352
 
350
353
  <% if test_record.files&.any? %>
351
354
 
@@ -358,8 +361,8 @@
358
361
  <% end %>
359
362
 
360
363
  </td>
361
- <td><%= review_status_badge(test_record) %></td>
362
- <td><%= verification_result_badge(test_record.verification_result) %></td>
364
+ <td class="sort-review-status"><%= review_status_badge(test_record) %></td>
365
+ <td class="sort-test-result"><%= verification_result_badge(test_record.verification_result) %></td>
363
366
  <td><a href="#test-record-<%= index %>">
364
367
  <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-chevrons-down" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
365
368
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
@@ -516,12 +519,26 @@
516
519
  </div>
517
520
  </div>
518
521
  <script type="text/javascript">
519
- elements = document.getElementsByClassName('md-description')
520
-
521
- for(let element of elements) {
522
- const source = element.innerText
523
- element.innerHTML = marked.parse(source)
524
- }
522
+ document.addEventListener("DOMContentLoaded", function () {
523
+ let headers = []
524
+
525
+ document.querySelectorAll('#test-results-table thead button').forEach(function(headerButton){
526
+ headers.push(headerButton.dataset.sort)
527
+ })
528
+
529
+ new List("test-results-table", {
530
+ sortClass: "table-sort",
531
+ listClass: "table-tbody",
532
+ valueNames: headers,
533
+ })
534
+
535
+ const elements = document.getElementsByClassName('md-description')
536
+
537
+ for (let element of elements) {
538
+ const source = element.innerText
539
+ element.innerHTML = marked.parse(source)
540
+ }
541
+ })
525
542
  </script>
526
543
  </body>
527
544
  </html>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dragnet
4
- VERSION = '6.0.0'
4
+ VERSION = '6.1.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dragnet
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0
4
+ version: 6.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ESR Labs GmbH
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-09-23 00:00:00.000000000 Z
11
+ date: 2026-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport