Skip to content

Commit fb52036

Browse files
committed
Update UI to show bread crumbs
1 parent 6decd44 commit fb52036

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

lib/error_tracker/web/live/show.html.heex

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,20 @@
2525
<%= @error.source_line %></pre>
2626
</.section>
2727

28+
<.section :if={@occurrence.bread_crumbs != []} title="Bread crumbs">
29+
<div class="relative overflow-x-auto shadow-md sm:rounded-lg ring-1 ring-gray-900">
30+
<table class="w-full text-sm text-gray-400 table-fixed">
31+
<tr
32+
:for={{bread_crumb, index} <- Enum.with_index(@occurrence.bread_crumbs)}
33+
class="border-b bg-gray-400/10 border-gray-900 last:border-b-0"
34+
>
35+
<td class="w-11 pl-2 py-4 font-medium text-white relative text-right"><%= length(@occurrence.bread_crumbs) - index %>.</td>
36+
<td class="px-2 py-4 font-medium text-white relative"><%= bread_crumb %></td>
37+
</tr>
38+
</table>
39+
</div>
40+
</.section>
41+
2842
<.section :if={@occurrence.stacktrace.lines != []} title="Stacktrace">
2943
<div class="p-4 bg-gray-300/10 border border-gray-900 rounded-lg">
3044
<div class="w-full mb-4">

priv/static/app.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -885,6 +885,10 @@ select {
885885
width: 2.5rem;
886886
}
887887

888+
.w-11 {
889+
width: 2.75rem;
890+
}
891+
888892
.w-28 {
889893
width: 7rem;
890894
}
@@ -1129,6 +1133,10 @@ select {
11291133
padding-bottom: 11.5px;
11301134
}
11311135

1136+
.pl-2 {
1137+
padding-left: 0.5rem;
1138+
}
1139+
11321140
.pr-2 {
11331141
padding-right: 0.5rem;
11341142
}
@@ -1145,6 +1153,10 @@ select {
11451153
text-align: center;
11461154
}
11471155

1156+
.text-right {
1157+
text-align: right;
1158+
}
1159+
11481160
.align-top {
11491161
vertical-align: top;
11501162
}
@@ -1318,6 +1330,10 @@ select {
13181330
border-radius: 4px;
13191331
}
13201332

1333+
.last\:border-b-0:last-child {
1334+
border-bottom-width: 0px;
1335+
}
1336+
13211337
.last-of-type\:border-b-0:last-of-type {
13221338
border-bottom-width: 0px;
13231339
}

0 commit comments

Comments
 (0)