diff --git a/issues/models.py b/issues/models.py index 9714175..65a2529 100644 --- a/issues/models.py +++ b/issues/models.py @@ -1,4 +1,6 @@ +import json import uuid + from django.db import models @@ -12,3 +14,13 @@ class Issue(models.Model): def get_absolute_url(self): return f"/issues/issue/{ self.id }/events/" + + def parsed_data(self): + # TEMP solution; won't scale + return json.loads(self.events.first().data) + + def title(self): + # TODO: refactor to a (filled-on-create) field + parsed_data = json.loads(self.events.first().data) + foo = parsed_data["exception"]["values"][0] + return foo["type"] + ": " + foo["value"] diff --git a/issues/templates/issues/issue_list.html b/issues/templates/issues/issue_list.html index 582e8d5..8b53a91 100644 --- a/issues/templates/issues/issue_list.html +++ b/issues/templates/issues/issue_list.html @@ -6,13 +6,22 @@ -

Issues for project {{ project_id }}

+
+

Issues for project {{ project_id }}

-{% for issue in issue_list %} +
+ {% for issue in issue_list %} - {{ issue.id }}
+
+
{{ issue.title }} {{ issue.parsed_data.transaction }}
+
from 8 Nov 12:33 | last 8 Nov 12:39 | with 3 events
+
-{% endfor %} + {% endfor %} +
+ + +
diff --git a/theme/static/css/dist/styles.css b/theme/static/css/dist/styles.css index 3a6c35e..98773b1 100644 --- a/theme/static/css/dist/styles.css +++ b/theme/static/css/dist/styles.css @@ -791,6 +791,10 @@ select { margin: 4rem; } +.m-2 { + margin: 0.5rem; +} + .mx-auto { margin-left: auto; margin-right: auto; @@ -840,6 +844,10 @@ select { margin-top: 1.5rem; } +.ml-2 { + margin-left: 0.5rem; +} + .block { display: block; } @@ -1087,6 +1095,11 @@ select { line-height: 2rem; } +.text-sm { + font-size: 0.875rem; + line-height: 1.25rem; +} + .font-bold { font-weight: 700; } @@ -1111,6 +1124,26 @@ select { letter-spacing: 0em; } +.text-blue-800 { + --tw-text-opacity: 1; + color: rgb(30 64 175 / var(--tw-text-opacity)); +} + +.text-slate-700 { + --tw-text-opacity: 1; + color: rgb(51 65 85 / var(--tw-text-opacity)); +} + +.text-slate-500 { + --tw-text-opacity: 1; + color: rgb(100 116 139 / var(--tw-text-opacity)); +} + +.text-slate-600 { + --tw-text-opacity: 1; + color: rgb(71 85 105 / var(--tw-text-opacity)); +} + .filter { filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); }