ndr_error 2.3.2 → 2.4.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: ad25fd23b8e80fe8e1d589ae2469dc173cf9cb096998c397247fde98a02b86e8
4
- data.tar.gz: 6f4d301417b26aeac14890ee7d3c7e37b210dbcad2f58170baaf7ae5133276ca
3
+ metadata.gz: 2a3df3ca931e154b2ad12097ab5725021d6aa1d3bcb3b61706459258d54084c6
4
+ data.tar.gz: 471325de64342030d9e7088eb27bf803dbcce0163aae2a95bbac7ad2ba6a7df5
5
5
  SHA512:
6
- metadata.gz: 3035a5f32346bbc6f994124f8f918635596210b008e19ebd15f98b27e61686a6e3ff1316cc791120bea2550fe4c2ffacb4554c83fc4022440dc0166b9ec1de46
7
- data.tar.gz: 8a4d63cebac01d6a62f87e0b8496256f354809381d9b89be051bde71975282eb3ceb1a2278d52b618543aecc66b206cf7d66c14185bb9b308a4ddffd74463f6a
6
+ metadata.gz: 6a36f65267a128ab83d5eeaf4b836ea70508c89b30c2661f07bb6398ed78351506a632f4b794de621707bc9ca16abdc27d00e044188e4dfd26234986e7610ed6
7
+ data.tar.gz: f0968ff0236b079e0513ee841d3010f4c3135d6931e0f5cb7339471b74729a2b76e7a7707de425d16b0952a50ebda856dd2d5f54ce3f171234b7069d702a72e7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## [Unreleased]
2
- * no unreleased changes
2
+ +* no unreleased changes
3
+
4
+ ## 2.4.0 / 2025-01-31
5
+ ### Changed
6
+ * New views with bootstrap 5 styles
7
+ * Switch to bootstrap-icons as glyphicon no longer available in bootstrap 5
3
8
 
4
9
  ## 2.3.2 / 2024-11-21
5
10
  ### Fixed
@@ -2,11 +2,6 @@ module NdrError
2
2
  # Application-wide helpers.
3
3
  # TODO: await ndr_ui gem!
4
4
  module ApplicationHelper
5
- # Bootstrap icon tag.
6
- def glyphicon_tag(type)
7
- content_tag(:span, '', class: "glyphicon glyphicon-#{type}")
8
- end
9
-
10
5
  # Pagination helper for will_paginate:
11
6
  def pagination_summary_for(collection)
12
7
  page = collection.current_page
@@ -56,9 +56,9 @@ module NdrError
56
56
  bootstrap_list_link_to hash + ' - ' + text, error_fingerprint_path(print)
57
57
  end
58
58
 
59
- def ticket_link_for(fingerprint, small = false)
60
- text = glyphicon_tag('asterisk') + ' View ticket'
61
- css = 'btn btn-default'
59
+ def ticket_link_for(fingerprint, small = false) # rubocop:disable Style/OptionalBooleanParameter
60
+ text = "#{bootstrap_icon_tag('asterisk', :bi)} View ticket"
61
+ css = 'btn btn-outline-secondary'
62
62
  css << ' btn-xs' if small
63
63
 
64
64
  url = fingerprint.ticket_url
@@ -66,15 +66,15 @@ module NdrError
66
66
  end
67
67
 
68
68
  def edit_button_for(fingerprint)
69
- css = 'btn btn-default'
70
- text = glyphicon_tag('pencil') + ' Edit Ticket'
69
+ css = 'btn btn-outline-secondary'
70
+ text = "#{bootstrap_icon_tag('pencil', :bi)} Edit Ticket"
71
71
 
72
72
  link_to(text, edit_error_fingerprint_path(fingerprint), class: css)
73
73
  end
74
74
 
75
75
  def purge_button_for(fingerprint)
76
76
  css = 'btn btn-danger'
77
- text = glyphicon_tag('trash icon-white') + ' Purge'
77
+ text = "#{bootstrap_icon_tag('trash-fill', :bi)} Purge"
78
78
 
79
79
  options = {
80
80
  'method' => :delete,
@@ -86,18 +86,18 @@ module NdrError
86
86
  end
87
87
 
88
88
  def previous_button_for(error)
89
- css = 'btn btn-default'
89
+ css = 'btn btn-outline-secondary'
90
90
  css << ' disabled' if error.nil?
91
- text = glyphicon_tag('chevron-left')
91
+ text = bootstrap_icon_tag('chevron-left', :bi)
92
92
  path = error.nil? ? '#' : error_fingerprint_path(error.error_fingerprint, log_id: error)
93
93
 
94
94
  link_to(text, path, class: css)
95
95
  end
96
96
 
97
97
  def next_button_for(error)
98
- css = 'btn btn-default'
98
+ css = 'btn btn-outline-secondary'
99
99
  css << ' disabled' if error.nil?
100
- text = glyphicon_tag('chevron-right')
100
+ text = bootstrap_icon_tag('chevron-right', :bi)
101
101
  path = error.nil? ? '#' : error_fingerprint_path(error.error_fingerprint, log_id: error)
102
102
 
103
103
  link_to(text, path, class: css)
@@ -8,19 +8,14 @@
8
8
  </head>
9
9
  <body class="bootstrap">
10
10
 
11
- <div class="navbar navbar-default navbar-fixed-top" role="navigation">
11
+ <div class="navbar navbar-expand-lg fixed-top bg-body-tertiary" role="navigation">
12
12
  <div class="container-fluid">
13
- <!-- Brand and toggle get grouped for better mobile display -->
14
13
  <div class="navbar-header">
15
- <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
16
- <span class="sr-only">Toggle navigation</span>
17
- <span class="icon-bar"></span>
18
- <span class="icon-bar"></span>
19
- <span class="icon-bar"></span>
14
+ <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#menubar" aria-controls="menubar" aria-expanded="false" aria-label="Toggle navigation">
15
+ <span class="navbar-toggler-icon"></span>
20
16
  </button>
21
-
22
17
  <%= link_to '&#171; Back to App'.html_safe, '/', class: "navbar-brand" %>
23
- <p class="navbar-text">Error Logging by NDR</p>
18
+ <span class="navbar-text">Error Logging by NDR</span>
24
19
  </div>
25
20
  </div>
26
21
  </div>
@@ -16,5 +16,5 @@
16
16
  </div>
17
17
 
18
18
  <%= form.submit 'Update', class: 'btn btn-primary' %>
19
- <%= link_to 'Cancel', error_fingerprint_path(@fingerprint), class: 'btn btn-default' %>
19
+ <%= link_to 'Cancel', error_fingerprint_path(@fingerprint), class: 'btn btn-outline-secondary' %>
20
20
  <% end %>
@@ -5,16 +5,14 @@
5
5
  %>
6
6
 
7
7
  <div class="row">
8
- <div id="search_form_container" class="col-md-4 col-md-offset-8">
8
+ <div id="search_form_container" class="col-md-4 offset-md-8">
9
9
  <%= form_tag(error_fingerprints_path, method: :get) do %>
10
10
  <div class="input-group">
11
11
  <% if @keywords.any? %>
12
- <%= link_to glyphicon_tag('list icon-white') + ' ' + glyphicon_tag('arrow-left icon-white'), error_fingerprints_path, class: 'btn btn-info input-group-addon' %>
12
+ <%= link_to bootstrap_icon_tag(:'list-task', :bi) + ' ' + bootstrap_icon_tag(:'arrow-left-circle-fill', :bi), error_fingerprints_path, class: 'btn btn-info' %>
13
13
  <% end %>
14
14
  <%= text_field_tag :q, @keywords.join(', '), class: 'form-control search-query' %>
15
- <span class="input-group-btn">
16
- <button type="submit" class="btn btn-default"><%= glyphicon_tag('search') %></button>
17
- </span>
15
+ <button type="submit" class="btn btn-outline-secondary"><%= bootstrap_icon_tag(:search, :bi) %></button>
18
16
  </div>
19
17
  <% end %>
20
18
  </div>
@@ -45,7 +43,7 @@
45
43
  <%= latest_user_for(fingerprint, @keywords) %>
46
44
  </td>
47
45
  <td>
48
- <div class="pull-right">
46
+ <div class="float-end">
49
47
  <%= ticket_link_for(fingerprint, true) if fingerprint.ticket_url.present? %>
50
48
  </div>
51
49
 
@@ -57,7 +55,8 @@
57
55
  </tbody>
58
56
  </table>
59
57
 
60
- <span class="pull-right text-muted"><%= pagination_summary_for(@fingerprints) %></span>
58
+ <span class="float-end text-muted"><%= pagination_summary_for(@fingerprints) %></span>
59
+ <%# TODO: use bootstrap_will_paginate %>
61
60
  <%= will_paginate(@fingerprints) %>
62
61
  </div>
63
62
  </div>
@@ -7,7 +7,7 @@
7
7
 
8
8
  <hr />
9
9
  <div class="clearfix">
10
- <div class="pull-right">
10
+ <div class="float-end">
11
11
  <div class="btn-group">
12
12
  <%= ticket_link_for(@fingerprint) if @fingerprint.ticket_url.present? %>
13
13
  <%= edit_button_for(@fingerprint) if user_can_edit_errors? %>
@@ -22,7 +22,7 @@
22
22
  <%= previous_button_for(@error.previous) %>
23
23
 
24
24
  <div class="btn-group">
25
- <a class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="#">
25
+ <a class="btn btn-outline-secondary dropdown-toggle" data-toggle="dropdown" href="#">
26
26
  <%= pluralize(@error.similar_errors.length - 1, 'Similar Error') %> Stored
27
27
  <span class="caret"></span>
28
28
  </a>
@@ -39,13 +39,13 @@
39
39
 
40
40
  <% if @fingerprint.causal_error_fingerprint %>
41
41
  <div class="btn-group">
42
- <%= link_to bootstrap_icon_tag('arrow-up') + ' View Cause', error_fingerprint_path(@fingerprint.causal_error_fingerprint), class: 'btn btn-default' %>
42
+ <%= link_to bootstrap_icon_tag('arrow-up') + ' View Cause', error_fingerprint_path(@fingerprint.causal_error_fingerprint), class: 'btn btn-outline-secondary' %>
43
43
  </div>
44
44
  <% end %>
45
45
 
46
46
  <% if @fingerprint.caused_error_fingerprints.any? %>
47
47
  <div class="btn-group">
48
- <a class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="#">
48
+ <a class="btn btn-outline-secondary dropdown-toggle" data-toggle="dropdown" href="#">
49
49
  <%= pluralize(@fingerprint.caused_error_fingerprints.length, 'Downstream Error') %> Stored
50
50
  <span class="caret"></span>
51
51
  </a>
@@ -117,7 +117,7 @@
117
117
  <% end %>
118
118
 
119
119
  <h4>
120
- <small class="pull-right"><%= check_box_tag :toggle_app_trace_only %> only app trace?</small>
120
+ <small class="float-end"><%= check_box_tag :toggle_app_trace_only %> only app trace?</small>
121
121
  Backtrace:
122
122
  </h4>
123
123
  <% if (highlighted_trace = highlighted_trace_for(@error)).present? %>
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Contains the version of NdrError. Sourced by the gemspec.
4
4
  module NdrError
5
- VERSION = '2.3.2'
5
+ VERSION = '2.4.0'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ndr_error
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.2
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - NCRS Development Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-21 00:00:00.000000000 Z
11
+ date: 2025-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -92,14 +92,14 @@ dependencies:
92
92
  requirements:
93
93
  - - ">="
94
94
  - !ruby/object:Gem::Version
95
- version: '0'
95
+ version: '5.0'
96
96
  type: :runtime
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - ">="
101
101
  - !ruby/object:Gem::Version
102
- version: '0'
102
+ version: '5.0'
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: pry
105
105
  requirement: !ruby/object:Gem::Requirement
@@ -142,6 +142,20 @@ dependencies:
142
142
  - - ">="
143
143
  - !ruby/object:Gem::Version
144
144
  version: '0'
145
+ - !ruby/object:Gem::Dependency
146
+ name: psych
147
+ requirement: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - "<"
150
+ - !ruby/object:Gem::Version
151
+ version: '5'
152
+ type: :development
153
+ prerelease: false
154
+ version_requirements: !ruby/object:Gem::Requirement
155
+ requirements:
156
+ - - "<"
157
+ - !ruby/object:Gem::Version
158
+ version: '5'
145
159
  - !ruby/object:Gem::Dependency
146
160
  name: mocha
147
161
  requirement: !ruby/object:Gem::Requirement