blacklight-spotlight 4.3.4 → 4.3.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,77 +3,74 @@
3
3
  <%= render 'spotlight/shared/exhibit_sidebar' %>
4
4
  <% end %>
5
5
 
6
- <div data-blacklight-modal="container">
7
-
8
- <div class="modal-header border-0">
6
+ <%= render Blacklight::System::ModalComponent.new do |c| %>
7
+ <% c.with_header do %>
9
8
  <h2 class="modal-title"><%= job_status_icon(@job_tracker) %> <%= t @job_tracker.job_class, default: @job_tracker.job_class %> <small class="text-monospace font-monospace font-weight-lighter fw-lighter"><%= @job_tracker.job_id&.truncate(8, omission: '') %></small></h2>
9
+ <% end %>
10
10
 
11
- <button type="button" class="blacklight-modal-close close btn-close" data-dismiss="modal" data-bs-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>">
12
- <span aria-hidden="true" class="visually-hidden">&times;</span>
13
- </button>
14
- </div>
15
-
16
- <div class="modal-body row">
17
- <p class="mx-2 text-small">
18
- <%= t(:".summary.#{@job_tracker.status}", default: '', last_updated: time_ago_in_words(@job_tracker.updated_at, include_seconds: true), created_at: time_ago_in_words(@job_tracker.updated_at, include_seconds: true), duration: distance_of_time_in_words(@job_tracker.created_at, @job_tracker.updated_at)) %>
19
- </p>
20
-
21
- <table class="table table-striped">
22
- <thead>
23
- <th></th>
24
- <th><%= t('.headers.message') %></th>
25
- <th><%= t('.headers.details') %></th>
26
- </thead>
11
+ <% c.with_body do %>
12
+ <div class="modal-body row">
13
+ <p class="mx-2 text-small">
14
+ <%= t(:".summary.#{@job_tracker.status}", default: '', last_updated: time_ago_in_words(@job_tracker.updated_at, include_seconds: true), created_at: time_ago_in_words(@job_tracker.updated_at, include_seconds: true), duration: distance_of_time_in_words(@job_tracker.created_at, @job_tracker.updated_at)) %>
15
+ </p>
27
16
 
28
- <tbody>
29
- <% row_number = 0 %>
30
- <tr>
31
- <th scope="row" title="<%= l @job_tracker.created_at, format: :long %>"><%= row_number += 1 %></th>
32
- <td><%= t('.messages.started') %></td>
33
- <td><%= l @job_tracker.updated_at, format: :long %></td>
34
- </tr>
17
+ <table class="table table-striped">
18
+ <thead>
19
+ <th></th>
20
+ <th><%= t('.headers.message') %></th>
21
+ <th><%= t('.headers.details') %></th>
22
+ </thead>
35
23
 
36
- <% if @job_tracker.user %>
37
- <tr>
38
- <th scope="row" title="<%= l @job_tracker.created_at, format: :long %>"><%= row_number += 1 %></th>
39
- <td><%= t('.messages.created_by', user: @job_tracker.user.email) %></td>
40
- <td></td>
41
- </tr>
42
- <% end %>
43
-
44
- <% @job_tracker.events.order(:created_at, :collation_key).find_each do |e| %>
45
- <tr class="<%= job_tracker_event_table_row_class(e) %>">
46
- <th scope="row" title="<%= l e.created_at, format: :long %>"><%= row_number += 1 %></th>
47
- <td><%= e.data[:message] %></td>
48
- <td><pre><%= JSON.pretty_generate(e.data.except(:message)) %></pre></td>
24
+ <tbody>
25
+ <% row_number = 0 %>
26
+ <tr>
27
+ <th scope="row" title="<%= l @job_tracker.created_at, format: :long %>"><%= row_number += 1 %></th>
28
+ <td><%= t('.messages.started') %></td>
29
+ <td><%= l @job_tracker.updated_at, format: :long %></td>
49
30
  </tr>
50
- <% end %>
51
31
 
52
- <% @job_tracker.subevents.where.not(type: :summary).order(:created_at, :collation_key).find_each do |e| %>
53
- <tr class="<%= job_tracker_event_table_row_class(e) %>">
54
- <th scope="row" title="<%= l e.created_at, format: :long %>"><%= row_number += 1 %></th>
55
- <td><%= e.data[:message] %></td>
56
- <td><pre><%= JSON.pretty_generate(e.data.except(:message)) %></pre></td>
32
+ <% if @job_tracker.user %>
33
+ <tr>
34
+ <th scope="row" title="<%= l @job_tracker.created_at, format: :long %>"><%= row_number += 1 %></th>
35
+ <td><%= t('.messages.created_by', user: @job_tracker.user.email) %></td>
36
+ <td></td>
57
37
  </tr>
58
- <% end %>
38
+ <% end %>
39
+
40
+ <% @job_tracker.events.order(:created_at, :collation_key).find_each do |e| %>
41
+ <tr class="<%= job_tracker_event_table_row_class(e) %>">
42
+ <th scope="row" title="<%= l e.created_at, format: :long %>"><%= row_number += 1 %></th>
43
+ <td><%= e.data[:message] %></td>
44
+ <td><pre><%= JSON.pretty_generate(e.data.except(:message)) %></pre></td>
45
+ </tr>
46
+ <% end %>
59
47
 
60
- <% error_count = @job_tracker.subevents.where(type: :summary).find_each.sum { |e| e.data[:errors] } %>
61
- <tr>
62
- <th scope="row" title="<%= l @job_tracker.updated_at, format: :long %>"><%= row_number += 1 %></th>
63
- <td>
64
- <%= t('.messages.progress', progress: @job_tracker.progress, total: @job_tracker.total, errors: (t('.messages.errors', count: error_count) if error_count.positive?)) %>
65
- </td>
66
- <td></td>
67
- </tr>
48
+ <% @job_tracker.subevents.where.not(type: :summary).order(:created_at, :collation_key).find_each do |e| %>
49
+ <tr class="<%= job_tracker_event_table_row_class(e) %>">
50
+ <th scope="row" title="<%= l e.created_at, format: :long %>"><%= row_number += 1 %></th>
51
+ <td><%= e.data[:message] %></td>
52
+ <td><pre><%= JSON.pretty_generate(e.data.except(:message)) %></pre></td>
53
+ </tr>
54
+ <% end %>
68
55
 
69
- <% unless @job_tracker.in_progress? %>
56
+ <% error_count = @job_tracker.subevents.where(type: :summary).find_each.sum { |e| e.data[:errors] } %>
70
57
  <tr>
71
58
  <th scope="row" title="<%= l @job_tracker.updated_at, format: :long %>"><%= row_number += 1 %></th>
72
- <td><%= t(@job_tracker.status, scope: 'spotlight.job_trackers.show.messages.status', default: :'spotlight.job_trackers.show.messages.status.missing') %></td>
73
- <td><%= l @job_tracker.updated_at, format: :long %></td>
59
+ <td>
60
+ <%= t('.messages.progress', progress: @job_tracker.progress, total: @job_tracker.total, errors: (t('.messages.errors', count: error_count) if error_count.positive?)) %>
61
+ </td>
62
+ <td></td>
74
63
  </tr>
75
- <% end %>
76
- </tbody>
77
- </table>
78
- </div>
79
- </div>
64
+
65
+ <% unless @job_tracker.in_progress? %>
66
+ <tr>
67
+ <th scope="row" title="<%= l @job_tracker.updated_at, format: :long %>"><%= row_number += 1 %></th>
68
+ <td><%= t(@job_tracker.status, scope: 'spotlight.job_trackers.show.messages.status', default: :'spotlight.job_trackers.show.messages.status.missing') %></td>
69
+ <td><%= l @job_tracker.updated_at, format: :long %></td>
70
+ </tr>
71
+ <% end %>
72
+ </tbody>
73
+ </table>
74
+ </div>
75
+ <% end %>
76
+ <% end %>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Spotlight
4
- VERSION = '4.3.4'
4
+ VERSION = '4.3.5'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight-spotlight
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.4
4
+ version: 4.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2024-11-06 00:00:00.000000000 Z
14
+ date: 2024-11-07 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activejob-status