neptune/core/templates/ui/drilldown/table_results.html

60 lines
1.9 KiB
HTML
Raw Normal View History

2022-08-09 08:04:31 +00:00
{% load static %}
{% load index %}
2022-08-11 06:22:22 +00:00
{% load joinsep %}
2022-08-09 08:04:31 +00:00
{% include 'partials/notify.html' %}
2022-08-09 06:20:30 +00:00
2022-08-09 08:04:31 +00:00
{% if table %}
2022-08-09 06:20:30 +00:00
<script src="{% static 'js/column-shifter.js' %}"></script>
2022-08-09 08:04:31 +00:00
<div style="display: none" id="jsonData" data-json="{{ data }}">
</div>
<div class="has-text-grey-light nowrap-parent">
2022-08-09 10:54:44 +00:00
<div class="nowrap-child block">
<i class="fa-solid fa-chart-mixed"></i>
</div>
<div class="nowrap-child">
<p>fetched {{ table.data|length }} of {{ card }} hits in {{ took }}ms</p>
2022-08-09 10:54:44 +00:00
</div>
{% if exemption is not None %}
2022-08-09 08:04:31 +00:00
<div class="nowrap-child">
<i class="fa-solid fa-book-bible"></i>
</div>
2022-08-09 10:54:44 +00:00
{% else %}
{% if redacted != 0 %}
2022-08-09 08:04:31 +00:00
<div class="nowrap-child">
2022-08-09 10:54:44 +00:00
<p>{{ redacted }} redacted</p>
2022-08-09 08:04:31 +00:00
</div>
{% endif %}
2022-08-09 10:54:44 +00:00
{% endif %}
2022-08-09 08:04:31 +00:00
</div>
2022-08-09 06:20:30 +00:00
{% if params.index != 'int' and params.index != 'meta' %}
2022-08-11 22:09:42 +00:00
<div class="box">
<div style="height: 30rem">
<canvas id="volume"></canvas>
</div>
<script src="{% static 'chart.js' %}"></script>
</div>
2022-08-11 22:09:42 +00:00
{% endif %}
2022-08-09 06:20:30 +00:00
{{ params }}
2022-08-09 06:20:30 +00:00
{% include 'ui/drilldown/table_results_partial.html' %}
2022-08-11 06:22:22 +00:00
{% endif %}
{# Update the tags in case the user changed the query #}
{# Check for focus and refocus #}
<script>
var inputTags = document.getElementsByClassName('tags-input');
var inputBox = document.querySelector("[placeholder='Add query']");
var isFocused = (document.activeElement === inputBox);
for (index = 0; index < inputTags.length; index++) {
if (index == 0) {
inputTags[0].outerHTML = '<input id="tags" class="input" type="tags" placeholder="Add query" value="{{ tags|joinsep:',' }}">';
} else {
inputTags[index].remove();
}
}
// inputTags[0].outerHTML = '<input id="tags" class="input" type="tags" placeholder="Add query" value="{{ tags|joinsep:',' }}">';
setupTags();
var inputBox = document.querySelector("[placeholder='Add query']");
if (isFocused) {
inputBox.focus();
}
</script>