mirror of
https://github.com/bugsink/bugsink.git
synced 2025-12-31 02:10:16 -06:00
Issue Tag display: for low event-counts, show more tags
and for high event-counts, display a warning about what is hidden
This commit is contained in:
@@ -127,9 +127,14 @@ class Issue(models.Model):
|
||||
def _get_issue_tags(self, other_cutoff, other_label):
|
||||
result = []
|
||||
|
||||
ds = self.tags \
|
||||
.filter(key__mostly_unique=False)\
|
||||
.values("key")\
|
||||
if self.digested_event_count > other_cutoff:
|
||||
base_qs = self.tags.filter(key__mostly_unique=False)
|
||||
else:
|
||||
# for low-event-count issues, we just show all tags and their values; we _can_ just do it because there's
|
||||
# not too many, and it's actually useful (and maybe even what you expect).
|
||||
base_qs = self.tags
|
||||
|
||||
ds = base_qs.values("key")\
|
||||
.annotate(count_sum=models.Sum("count"))\
|
||||
.distinct()\
|
||||
.order_by("key__key")
|
||||
|
||||
@@ -25,4 +25,10 @@
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% if issue.digested_event_count > 25 %}
|
||||
<div class="mt-4 italic">
|
||||
Note: Tags which have values that are mostly unique per event (such as <span class="not-italic">trace, user, browser version and os version</span>) are not displayed here.
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
2
theme/static/css/dist/styles.css
vendored
2
theme/static/css/dist/styles.css
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user