mirror of
https://github.com/bugsink/bugsink.git
synced 2026-05-06 15:00:22 -05:00
Breadcrumbs, at least implement _something_
This commit is contained in:
@@ -108,6 +108,7 @@
|
||||
<a href="/issues/issue/{{ issue.id }}/events/"><div class="p-4 font-bold hover:bg-slate-200 {% if tab == "event-list" %}text-cyan-500 border-cyan-500 border-b-4{% else %}text-slate-500 border-slate-400 hover:border-b-4{% endif %}">Event List</div></a>
|
||||
<a href="/issues/issue/{{ issue.id }}/history/"><div class="p-4 font-bold hover:bg-slate-200 {% if tab == "history" %}text-cyan-500 border-cyan-500 border-b-4{% else %}text-slate-500 border-slate-400 hover:border-b-4{% endif %}">History</div></a>
|
||||
<a href="/issues/issue/{{ issue.id }}/grouping/"><div class="p-4 font-bold hover:bg-slate-200 {% if tab == "grouping" %}text-cyan-500 border-cyan-500 border-b-4{% else %}text-slate-500 border-slate-400 hover:border-b-4{% endif %}">Grouping</div></a>
|
||||
<a href="/issues/issue/{{ issue.id }}/event/{{ event.id }}/breadcrumbs/"><div class="p-4 font-bold hover:bg-slate-200 {% if tab == "breadcrumbs" %}text-cyan-500 border-cyan-500 border-b-4{% else %}text-slate-500 border-slate-400 hover:border-b-4{% endif %}">Breadcrumbs</div></a>
|
||||
</div>
|
||||
|
||||
<div class="p-4"><!-- div for tab_content -->
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
{% extends "issues/base.html" %}
|
||||
{% load static %}
|
||||
{% load stricter_templates %}
|
||||
{% load issues %}
|
||||
|
||||
{% block tab_content %}
|
||||
|
||||
<table class="w-full">
|
||||
{# <thead> </thead> #}
|
||||
<tbody>
|
||||
{% for breadcrumb in parsed_data.breadcrumbs.values %}
|
||||
<tr class="border-slate-200 border-2 ">
|
||||
|
||||
<td class="p-4 font-bold text-slate-500 align-top">
|
||||
{{ breadcrumb.category }}
|
||||
</td>
|
||||
|
||||
{% comment %}
|
||||
{# not _that_ useful
|
||||
<td class="ml-0 pb-4 pt-4 pr-4">
|
||||
{{ breadcrumb.type }}
|
||||
</td>
|
||||
{% endcomment %}
|
||||
|
||||
<td class="w-full p-4 font-mono">
|
||||
{{ breadcrumb.message }}
|
||||
</td>
|
||||
<td class="p-4 font-bold text-slate-500 align-top">
|
||||
{{ breadcrumb.timestamp }}
|
||||
{# {{ breadcrumb.timestamp|date:"G:i" and milis }} #}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
+2
-1
@@ -2,7 +2,7 @@ from django.urls import path
|
||||
|
||||
from .views import (
|
||||
issue_list, issue_event_stacktrace, issue_event_details, issue_last_event, issue_event_list, issue_history,
|
||||
issue_grouping)
|
||||
issue_grouping, issue_event_breadcrumbs)
|
||||
|
||||
urlpatterns = [
|
||||
path('<int:project_pk>/', issue_list, {"state_filter": "open"}, name="issue_list_open"),
|
||||
@@ -13,6 +13,7 @@ urlpatterns = [
|
||||
|
||||
path('issue/<uuid:issue_pk>/event/<uuid:event_pk>/', issue_event_stacktrace),
|
||||
path('issue/<uuid:issue_pk>/event/<uuid:event_pk>/details/', issue_event_details),
|
||||
path('issue/<uuid:issue_pk>/event/<uuid:event_pk>/breadcrumbs/', issue_event_breadcrumbs),
|
||||
path('issue/<uuid:issue_pk>/history/', issue_history),
|
||||
path('issue/<uuid:issue_pk>/grouping/', issue_grouping),
|
||||
path('issue/<uuid:issue_pk>/event/last/', issue_last_event),
|
||||
|
||||
@@ -200,6 +200,26 @@ def issue_event_stacktrace(request, issue, event_pk):
|
||||
})
|
||||
|
||||
|
||||
@issue_membership_required
|
||||
def issue_event_breadcrumbs(request, issue, event_pk):
|
||||
if request.method == "POST":
|
||||
return _handle_post(request, issue)
|
||||
|
||||
event = get_object_or_404(Event, pk=event_pk)
|
||||
|
||||
parsed_data = json.loads(event.data)
|
||||
|
||||
return render(request, "issues/issue_breadcrumbs.html", {
|
||||
"tab": "breadcrumbs",
|
||||
"project": issue.project,
|
||||
"issue": issue,
|
||||
"event": event,
|
||||
"is_event_page": True,
|
||||
"parsed_data": parsed_data,
|
||||
"mute_options": GLOBAL_MUTE_OPTIONS,
|
||||
})
|
||||
|
||||
|
||||
@issue_membership_required
|
||||
def issue_event_details(request, issue, event_pk):
|
||||
if request.method == "POST":
|
||||
|
||||
Vendored
+4
@@ -1319,6 +1319,10 @@ select {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.align-top {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.font-mono {
|
||||
font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user