diff --git a/core/api/views/threshold.py b/core/api/views/threshold.py index 03a8612..68681f7 100644 --- a/core/api/views/threshold.py +++ b/core/api/views/threshold.py @@ -96,6 +96,7 @@ class ThresholdInfoModal(LoginRequiredMixin, APIView): else: inter_chans = [] context = { + "net": net, "nick": nick, "channel": channel, "chans": channels, diff --git a/core/static/chart.js b/core/static/chart.js index ee10484..df45866 100644 --- a/core/static/chart.js +++ b/core/static/chart.js @@ -21,6 +21,8 @@ new Chart(ctx, { ], }, options: { + responsive: true, + maintainAspectRatio: false, parsing: { xAxisKey: 'date', yAxisKey: 'value', diff --git a/core/templates/modals/info.html b/core/templates/modals/info.html index f0ad2f0..a5d5224 100644 --- a/core/templates/modals/info.html +++ b/core/templates/modals/info.html @@ -60,7 +60,7 @@
src | +type | ts | msg | host | @@ -28,15 +26,51 @@net |
---|---|---|---|---|---|
{% if item.src == 'irc' %} - + + + {% elif item.src == 'dis' %} - + + + + {% endif %} + | ++ {% if item.type == 'msg' %} + + + + {% elif item.type == 'join' %} + + + + {% elif item.type == 'part' %} + + + + {% elif item.type == 'quit' %} + + + + {% elif item.type == 'kick' %} + + + + {% elif item.type == 'nick' %} + + + + {% elif item.type == 'mode' %} + + + + {% else %} + {{ item.type }} {% endif %} | @@ -47,11 +81,20 @@ | {{ item.host }} | {% if item.online is True %} - {{ item.nick }} + + + + {{ item.nick }} {% elif item.online is False %} - {{ item.nick }} + + + + {{ item.nick }} {% else %} - {{ item.nick }} + + + + {{ item.nick }} {% endif %} | @@ -62,9 +105,8 @@ hx-vals='{"net": "{{ item.net }}", "nick": "{{ item.nick }}", "channel": "{{ item.channel }}"}' hx-target="#modals-here" hx-trigger="click" - class="btn btn-primary" - _="on htmx:afterOnLoad wait 10ms then add .show to #modal then add .show to #modal-backdrop"> - Information + class="btn btn-primary"> + Information {% endif %} |