Implement scrollback modal

This commit is contained in:
2022-08-09 07:20:30 +01:00
parent e335bdf722
commit 703f36751d
10 changed files with 338 additions and 127 deletions

View File

@@ -2,6 +2,22 @@
{% load static %}
{% load joinsep %}
{% block content %}
{% if params.modal == 'context' %}
<div style="display: none;"
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
hx-post="{% url 'modal_context' %}"
hx-vals='{"net": "{{ params.net|escapejs }}",
"num": "{{ params.num|escapejs }}",
"src": "{{ params.src|escapejs }}",
"channel": "{{ params.channel|escapejs }}",
"time": "{{ params.time|escapejs }}",
"date": "{{ params.date|escapejs }}",
"index": "{{ params.index }}"
}'
hx-target="#modals-here"
hx-trigger="load">
</div>
{% endif %}
<script src="{% static 'js/chart.js' %}"></script>
<script>
function setupTags() {

View File

@@ -2,6 +2,7 @@
{% load index %}
{% load joinsep %}
{% include 'partials/notify.html' %}
{% if table %}
<script src="{% static 'js/column-shifter.js' %}"></script>
<div style="display: none" id="jsonData" data-json="{{ data }}">
@@ -26,7 +27,7 @@
{% endif %}
{% endif %}
</div>
{% if params.index == 'main' %}
{% if params.index != 'int' and params.index != 'meta' %}
<div class="box">
<div style="height: 30rem">
<canvas id="volume"></canvas>
@@ -34,6 +35,7 @@
<script src="{% static 'chart.js' %}"></script>
</div>
{% endif %}
{{ params }}
{% include 'ui/drilldown/table_results_partial.html' %}
{% endif %}
{# Update the tags in case the user changed the query #}

View File

@@ -52,7 +52,7 @@
});
</script>
<div class="table-container" style="display:none;">
<div id="table-container" class="table-container" style="display:none;">
<table {% render_attrs table.attrs class="table is-striped is-hoverable is-fullwidth" %}>
{% block table.thead %}
{% if table.show_header %}
@@ -219,10 +219,10 @@
hx-vals='{"net": "{{ row.cells.net|escapejs }}",
"num": "{{ row.cells.num|escapejs }}",
"src": "{{ row.cells.src|escapejs }}",
"nick": "{{ row.cells.nick|escapejs }}",
"channel": "{{ row.cells.channel|escapejs }}",
"time": "{{ row.cells.time|escapejs }}",
"date": "{{ row.cells.date|escapejs }}"
"date": "{{ row.cells.date|escapejs }}",
"index": "{{ params.index }}"
}'
hx-target="#modals-here"
hx-trigger="click">