solid_errors 0.2.9 → 0.2.11
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '033943c98cec3b0ad1b2f5154c957ba896f2aa8c9deabb5928cd9dec42bae938'
|
4
|
+
data.tar.gz: 020f8653b236de3d3cd0128bccbe8b9998d790b92a562f8c65a55de717a996b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 042ef5b51655eb86a095a284db8bfc3714bd0d3ed56ddaf4883ea9ab3f48f269cf9de1a980d5addd46a00612770846d7b35cc331bd840a5bea936b9d328ea194
|
7
|
+
data.tar.gz: f2655775dcd4ce7e7ca32cdb25a663a3a42a71a8788dafa90a06f3f1857fe13a9df88df4320abc8c228050fb0748a45ec174080bdc5e7a88dea27d00e862f8b4
|
@@ -7,6 +7,11 @@ module SolidErrors
|
|
7
7
|
warning: "⚠️",
|
8
8
|
info: "ℹ️"
|
9
9
|
}
|
10
|
+
SEVERITY_TO_BADGE_CLASSES = {
|
11
|
+
error: "bg-red-100 text-red-800",
|
12
|
+
warning: "bg-yellow-100 text-yellow-800",
|
13
|
+
info: "bg-blue-100 text-blue-800"
|
14
|
+
}
|
10
15
|
|
11
16
|
has_many :occurrences, class_name: "SolidErrors::Occurrence", dependent: :destroy
|
12
17
|
|
@@ -20,5 +25,9 @@ module SolidErrors
|
|
20
25
|
def emoji
|
21
26
|
SEVERITY_TO_EMOJI[severity.to_sym]
|
22
27
|
end
|
28
|
+
|
29
|
+
def badge_classes
|
30
|
+
"px-2 inline-flex text-[.75em] font-semibold rounded-md #{SEVERITY_TO_BADGE_CLASSES[severity.to_sym]}"
|
31
|
+
end
|
23
32
|
end
|
24
33
|
end
|
@@ -1,12 +1,16 @@
|
|
1
1
|
<div class="inline-flex items-center justify-start flex-wrap gap-3 whitespace-nowrap">
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
2
|
+
<%= link_to errors_path, class: "inline-flex items-center justify-center gap-2 font-medium cursor-pointer border rounded-lg py-3 px-5 bg-gray-100 text-initial border-gray-300 hover:ring-gray-200 hover:ring-8" do %>
|
3
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-left" viewBox="0 0 16 16">
|
4
|
+
<path fill-rule="evenodd" d="M15 8a.5.5 0 0 0-.5-.5H2.707l3.147-3.146a.5.5 0 1 0-.708-.708l-4 4a.5.5 0 0 0 0 .708l4 4a.5.5 0 0 0 .708-.708L2.707 8.5H14.5A.5.5 0 0 0 15 8"/>
|
5
|
+
</svg>
|
6
|
+
<span>Back to errors</span>
|
7
7
|
<% end %>
|
8
8
|
|
9
9
|
<%= button_to error_path(error), method: :patch, class: "inline-flex items-center justify-center gap-2 font-medium cursor-pointer border rounded-lg py-3 px-5 bg-transparent text-blue-500 border-blue-500 hover:ring-blue-200 hover:ring-8", params: { error: { resolved_at: Time.now } } do %>
|
10
|
-
|
10
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-check2-circle" viewBox="0 0 16 16">
|
11
|
+
<path d="M2.5 8a5.5 5.5 0 0 1 8.25-4.764.5.5 0 0 0 .5-.866A6.5 6.5 0 1 0 14.5 8a.5.5 0 0 0-1 0 5.5 5.5 0 1 1-11 0"/>
|
12
|
+
<path d="M15.354 3.354a.5.5 0 0 0-.708-.708L8 9.293 5.354 6.646a.5.5 0 1 0-.708.708l3 3a.5.5 0 0 0 .708 0z"/>
|
13
|
+
</svg>
|
14
|
+
<span>Resolve Error<span class="sr-only"> #<%= error.id %></span></span>
|
11
15
|
<% end %>
|
12
16
|
</div>
|
data/lib/solid_errors/version.rb
CHANGED