I think this is obvious?#}
{% for exception in exceptions %}
{# option: make multi-exception stacktraces more clear
}#}
-
{{ exception.type }}
{# potentially: hide this whole block if there is only a single exception #}
-
{{ exception.value }}
+
{{ exception.type }}
{# potentially: hide this whole block if there is only a single exception #}
+
{{ exception.value }}
{% for frame in exception.stacktrace.frames %}
-
+
-
+
+ {{ frame.filename }} in {{ frame.function }} line {{ frame.lineno }}.
+
-
-
-
{{ frame.filename }} in
{{ frame.function }} line
{{ frame.lineno }}.
+
+
+
+ {% for line in frame.pre_context %}{{ line }} {# leave space to avoid collapse #}
{% endfor %}
+ {{ frame.context_line }} {# leave space to avoid collapse #}
+ {% for line in frame.post_context %}{{ line }} {# leave space to avoid collapse #}
{% endfor %}
+
-
- {% for line in frame.pre_context %}{{ line }} {# leave space to avoid collapse #}
{% endfor %}
- {{ frame.context_line }} {# leave space to avoid collapse #}
- {% for line in frame.post_context %}{{ line }} {# leave space to avoid collapse #}
{% endfor %}
-
+
+
+ {% for var, value in frame.vars.items %}
+
+
{{ var }}
+
{{ value }}
+
+ {% endfor %}
+
-
-
- {% for var, value in frame.vars.items %}
-
-
{{ var }}
-
{{ value }}
-
- {% endfor %}
-
-
-
-
{% endfor %}
{#
#} {# per-exception div in the multi-exception case #}
{% if not forloop.last %}
-
During handling of the above exception, another exception occurred:
+
During handling of the above exception, another exception occurred:
{# note: the above is specific to Python. In Python there's also "The above exception was the direct cause of the following exception:" (raise ... from) but we cannot distinguish those at this level because the info is lost #}
{% endif %}
@@ -129,3 +131,7 @@ Issue grouper:
"{{ issue_grouper }}"Event 55 out of 55 which occured at {{ event.timestamp }} (most recent)
{# the border #}
{% endblock %}
+
+{% block extra_js %}
+
+{% endblock %}
diff --git a/static/js/issue.js b/static/js/issue.js
new file mode 100644
index 0000000..bdd398c
--- /dev/null
+++ b/static/js/issue.js
@@ -0,0 +1,13 @@
+"use strict";
+
+function toggleFrameVisibility(frameHeader) {
+ const frameDetails = frameHeader.parentNode.querySelector(".js-frame-details");
+ console.log("FD", frameDetails);
+ if (frameDetails.classList.contains("hidden")) {
+ frameDetails.classList.remove("hidden");
+ frameDetails.classList.add("xl:flex"); // add back
+ } else {
+ frameDetails.classList.add("hidden");
+ frameDetails.classList.remove("xl:flex"); // this appears to be necessary, not sure why
+ }
+}
diff --git a/theme/static/css/dist/styles.css b/theme/static/css/dist/styles.css
index b261a0f..4972f12 100644
--- a/theme/static/css/dist/styles.css
+++ b/theme/static/css/dist/styles.css
@@ -755,6 +755,10 @@ select {
visibility: visible;
}
+.invisible {
+ visibility: hidden;
+}
+
.collapse {
visibility: collapse;
}
@@ -940,6 +944,10 @@ select {
border-left-width: 4px;
}
+.border-t-2 {
+ border-top-width: 2px;
+}
+
.border-slate-300 {
--tw-border-opacity: 1;
border-color: rgb(203 213 225 / var(--tw-border-opacity));
diff --git a/theme/templates/base.html b/theme/templates/base.html
index 7a9a3f9..9ab6b27 100644
--- a/theme/templates/base.html
+++ b/theme/templates/base.html
@@ -1,10 +1,10 @@
-{% load static tailwind_tags %}
-
+{% load static tailwind_tags %}
{% block title %}Bugsink{% endblock %}
+
{% tailwind_css %}
@@ -17,5 +17,7 @@
{% block content %}{% endblock %}
+
+ {% block extra_js %}{% endblock %}