-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Percents + visualization #139
Changes from 7 commits
e4b265a
86fef58
934a25a
fcbe072
86c1cce
8f0c8c6
fc6e950
beae3cf
82b15fc
5d0d6a3
1363c50
475f792
fc65097
d5296f5
c2b1add
d0291e9
84c6f55
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,8 +109,24 @@ | |
<tbody> | ||
{% for location in stats.locations %} | ||
<tr> | ||
<td class="truncate w-full max-w-0">{{location.location|default:"Unknown"|urldisplay}}</td> | ||
<td class="rf">{{location.count|intcomma}}</td> | ||
<td class="truncate w-full max-w-0 relative"> | ||
<div | ||
class="absolute h-6" | ||
style="width: {{location.count|percent:stats.hit_count}}; top: 6px; left: 6px; height: calc(100% - 12px); background-color: var(--color-urge-200-fallback)" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
> | ||
</div> | ||
<div class="relative"> | ||
{{location.location|default:"Unknown"|urldisplay}} | ||
</div> | ||
</td> | ||
<td> | ||
<div class="flex justify-end items-center"> | ||
{{location.count|intcomma}} | ||
<span class="text-xs rf" style="min-width: 48px"> | ||
({{location.count|percent:stats.hit_count}}) | ||
</span> | ||
</div> | ||
</td> | ||
</tr> | ||
{% empty %} | ||
<tr> | ||
|
@@ -131,8 +147,24 @@ | |
<tbody> | ||
{% for referrer in stats.referrers %} | ||
<tr> | ||
<td class="truncate w-full max-w-0">{{referrer.referrer|default:"Direct"|urldisplay}}</td> | ||
<td class="rf">{{referrer.count|intcomma}}</td> | ||
<td class="truncate w-full max-w-0 relative"> | ||
<div | ||
class="absolute h-6" | ||
style="width: {{referrer.count|percent:stats.session_count}}; top: 6px; left: 6px; height: calc(100% - 12px); background-color: var(--color-urge-200-fallback)" | ||
> | ||
</div> | ||
<div class="relative"> | ||
{{referrer.referrer|default:"Direct"|urldisplay}} | ||
</div> | ||
</td> | ||
<td> | ||
<div class="flex justify-end items-center"> | ||
{{referrer.count|intcomma}} | ||
<span class="text-xs rf" style="min-width: 48px"> | ||
({{referrer.count|percent:stats.session_count}}) | ||
</span> | ||
</div> | ||
</td> | ||
</tr> | ||
{% empty %} | ||
<tr> | ||
|
@@ -153,10 +185,24 @@ | |
<tbody> | ||
{% for country in stats.countries %} | ||
<tr> | ||
<td class="truncate w-full max-w-0" title="{{country.country|country_name}}"> | ||
<span class="{{country.country|flag_class}}"></span> {{country.country|country_name}} | ||
<td class="truncate w-full max-w-0 relative" title="{{country.country|country_name}}"> | ||
<div | ||
class="absolute h-6" | ||
style="width: {{country.count|percent:stats.session_count}}; top: 6px; left: 6px; height: calc(100% - 12px); background-color: var(--color-urge-200-fallback)" | ||
> | ||
</div> | ||
<div class="relative"> | ||
<span class="{{country.country|flag_class}}"></span> {{country.country|country_name}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
line, not the one above |
||
</div> | ||
</td> | ||
<td> | ||
<div class="flex justify-end items-center"> | ||
{{country.count|intcomma}} | ||
<span class="text-xs rf" style="min-width: 48px"> | ||
({{country.count|percent:stats.session_count}}) | ||
</span> | ||
</div> | ||
</td> | ||
<td class="rf">{{country.count|intcomma}}</td> | ||
</tr> | ||
{% empty %} | ||
<tr> | ||
|
@@ -177,10 +223,24 @@ | |
<tbody> | ||
{% for os in stats.operating_systems %} | ||
<tr> | ||
<td class="flex items-center truncate w-full max-w-0" title="{{os.os|default:'Unknown'}}"> | ||
{{os.os|iconify}}<span>{{os.os|default:"Unknown"}}</span> | ||
<td class="flex items-center truncate w-full max-w-0 relative" title="{{os.os|default:'Unknown'}}"> | ||
<div | ||
class="absolute h-6" | ||
style="width: {{os.count|percent:stats.session_count}}; top: 6px; left: 6px; height: calc(100% - 12px); background-color: var(--color-urge-200-fallback)" | ||
> | ||
</div> | ||
<div class="relative"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add back |
||
{{os.os|iconify}}<span>{{os.os|default:"Unknown"}}</span> | ||
</div> | ||
</td> | ||
<td> | ||
<div class="flex justify-end items-center"> | ||
{{os.count|intcomma}} | ||
<span class="text-xs rf" style="min-width: 48px"> | ||
({{os.count|percent:stats.session_count}}) | ||
</span> | ||
</div> | ||
</td> | ||
<td class="rf">{{os.count|intcomma}}</td> | ||
</tr> | ||
{% empty %} | ||
<tr> | ||
|
@@ -201,9 +261,24 @@ | |
<tbody> | ||
{% for browser in stats.browsers %} | ||
<tr> | ||
<td class="flex items-center truncate w-full max-w-0" title="{{browser.browser|default:'Unknown'}}"> | ||
{{browser.browser|iconify}}<span>{{browser.browser|default:"Unknown"}}</span></td> | ||
<td class="rf">{{browser.count|intcomma}}</td> | ||
<td class="flex items-center truncate w-full max-w-0 relative" title="{{browser.browser|default:'Unknown'}}"> | ||
<div | ||
class="absolute h-6" | ||
style="width: {{browser.count|percent:stats.session_count}}; top: 6px; left: 6px; height: calc(100% - 12px); background-color: var(--color-urge-200-fallback)" | ||
> | ||
</div> | ||
<div class="relative"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add back |
||
{{browser.browser|iconify}}<span>{{browser.browser|default:"Unknown"}}</span> | ||
</div> | ||
</td> | ||
<td> | ||
<div class="flex justify-end items-center"> | ||
{{browser.count|intcomma}} | ||
<span class="text-xs rf" style="min-width: 48px"> | ||
({{browser.count|percent:stats.session_count}}) | ||
</span> | ||
</div> | ||
</td> | ||
</tr> | ||
{% empty %} | ||
<tr> | ||
|
@@ -224,8 +299,24 @@ | |
<tbody> | ||
{% for device_type in stats.device_types %} | ||
<tr> | ||
<td class="truncate w-full max-w-0">{{device_type.device_type|default:"Unknown"|title}}</td> | ||
<td class="rf">{{device_type.count|intcomma}}</td> | ||
<td class="truncate w-full max-w-0 relative"> | ||
<div | ||
class="absolute h-6" | ||
style="width: {{device_type.count|percent:stats.session_count}}; top: 6px; left: 6px; height: calc(100% - 12px); background-color: var(--color-urge-200-fallback)" | ||
> | ||
</div> | ||
<div class="relative"> | ||
{{device_type.device_type|default:"Unknown"|title}} | ||
</div> | ||
</td> | ||
<td> | ||
<div class="flex justify-end items-center"> | ||
{{device_type.count|intcomma}} | ||
<span class="text-xs rf" style="min-width: 48px"> | ||
({{device_type.count|percent:stats.session_count}}) | ||
</span> | ||
</div> | ||
</td> | ||
</tr> | ||
{% empty %} | ||
<tr> | ||
|
@@ -243,4 +334,4 @@ | |
sessions | ||
→</a> | ||
</div> | ||
{% endblock %} | ||
{% endblock %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe move style attributes to css file to minimize duplicate code like in this commit