2022-07-21 12:45:28 +00:00
|
|
|
{% extends "base.html" %}
|
2022-07-21 12:46:48 +00:00
|
|
|
{% load static %}
|
2022-08-09 06:20:30 +00:00
|
|
|
{% load joinsep %}
|
2022-08-28 10:48:32 +00:00
|
|
|
{% block outer_content %}
|
2022-08-09 06:20:30 +00:00
|
|
|
{% if params.modal == 'context' %}
|
2022-08-09 06:20:30 +00:00
|
|
|
<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 }}",
|
2022-08-14 21:58:29 +00:00
|
|
|
"index": "{{ params.index }}",
|
|
|
|
"type": "{{ params.type|escapejs }}",
|
|
|
|
"mtype": "{{ params.mtype|escapejs }}",
|
2022-08-14 22:01:21 +00:00
|
|
|
"nick": "{{ params.nick|escapejs }}"}'
|
2022-08-09 06:20:30 +00:00
|
|
|
hx-target="#modals-here"
|
|
|
|
hx-trigger="load">
|
|
|
|
</div>
|
2022-08-09 06:20:30 +00:00
|
|
|
{% endif %}
|
2022-08-05 22:10:07 +00:00
|
|
|
<script src="{% static 'js/chart.js' %}"></script>
|
2022-08-03 06:20:30 +00:00
|
|
|
<script>
|
2022-08-09 06:20:30 +00:00
|
|
|
function setupTags() {
|
2022-08-03 06:20:30 +00:00
|
|
|
var inputTags = document.getElementById('tags');
|
2022-08-09 06:20:30 +00:00
|
|
|
new BulmaTagsInput(inputTags);
|
|
|
|
|
|
|
|
inputTags.BulmaTagsInput().on('before.add', function(item) {
|
|
|
|
if (item.includes(": ")) {
|
|
|
|
var spl = item.split(": ");
|
|
|
|
} else {
|
|
|
|
var spl = item.split(":");
|
|
|
|
}
|
|
|
|
var field = spl[0];
|
|
|
|
try {
|
|
|
|
var value = JSON.parse(spl[1]);
|
|
|
|
} catch {
|
|
|
|
var value = spl[1];
|
|
|
|
}
|
|
|
|
return `${field}: ${value}`;
|
|
|
|
});
|
|
|
|
inputTags.BulmaTagsInput().on('after.remove', function(item) {
|
|
|
|
var spl = item.split(": ");
|
|
|
|
var field = spl[0];
|
2022-08-09 06:20:30 +00:00
|
|
|
var value = spl[1].trim();
|
2022-08-09 06:20:30 +00:00
|
|
|
});
|
2022-08-03 06:20:30 +00:00
|
|
|
}
|
2022-08-09 06:20:30 +00:00
|
|
|
function populateSearch(field, value) {
|
2022-08-26 16:16:55 +00:00
|
|
|
var inputTags = document.getElementById('tags');
|
|
|
|
inputTags.BulmaTagsInput().add(field+": "+value);
|
2022-08-03 06:20:30 +00:00
|
|
|
htmx.trigger("#search", "click");
|
|
|
|
}
|
|
|
|
</script>
|
2022-08-28 10:48:32 +00:00
|
|
|
<div class="grid-stack">
|
2022-08-28 10:57:20 +00:00
|
|
|
<div class="grid-stack-item" gs-w="7" gs-h="10" gs-y="0" gs-x="1">
|
2022-08-28 10:48:32 +00:00
|
|
|
<div class="grid-stack-item-content">
|
|
|
|
<nav class="panel">
|
|
|
|
<p class="panel-heading" style="padding: .2em; line-height: .5em;">
|
|
|
|
<i class="fa-solid fa-arrows-up-down-left-right has-text-grey-light"></i>
|
|
|
|
Search
|
|
|
|
</p>
|
|
|
|
<article class="panel-block is-active">
|
|
|
|
{% include 'ui/drilldown/search_partial.html' %}
|
|
|
|
</article>
|
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
<div class="grid-stack-item" gs-w="10" gs-h="40" gs-y="10" gs-x="1">
|
|
|
|
<div class="grid-stack-item-content">
|
2022-08-28 10:51:27 +00:00
|
|
|
|
2022-08-28 10:48:32 +00:00
|
|
|
<nav class="panel">
|
|
|
|
<p class="panel-heading" style="padding: .2em; line-height: .5em;">
|
|
|
|
<i class="fa-solid fa-arrows-up-down-left-right has-text-grey-light"></i>
|
|
|
|
Results
|
|
|
|
</p>
|
|
|
|
<div class="panel-block is-active">
|
2022-08-03 06:20:30 +00:00
|
|
|
<div class="control">
|
2022-08-28 10:51:27 +00:00
|
|
|
<div id="results">
|
|
|
|
{% include 'ui/drilldown/table_results.html' %}
|
|
|
|
</div>
|
2022-08-03 06:20:30 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-08-28 10:48:32 +00:00
|
|
|
</nav>
|
2022-08-26 16:16:55 +00:00
|
|
|
</div>
|
2022-08-03 22:26:22 +00:00
|
|
|
</div>
|
2022-07-21 12:50:51 +00:00
|
|
|
</div>
|
2022-07-21 12:52:06 +00:00
|
|
|
<div id="modals-here">
|
|
|
|
</div>
|
2022-08-28 10:48:32 +00:00
|
|
|
<script>
|
|
|
|
setupTags();
|
|
|
|
var grid = GridStack.init({
|
|
|
|
cellHeight: 20,
|
|
|
|
// cellWidth: 50,
|
|
|
|
auto: true,
|
|
|
|
float: true,
|
|
|
|
draggable: {handle: '.panel-heading', scroll: false, appendTo: 'body'},
|
|
|
|
removable: false,
|
|
|
|
});
|
|
|
|
|
|
|
|
</script>
|
|
|
|
{% endblock outer_content %}
|