Improve results rendering
This commit is contained in:
parent
d8005fa15d
commit
455da73b95
|
@ -212,6 +212,12 @@
|
|||
z-index: 39 !important;
|
||||
}
|
||||
|
||||
.small-field {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
</style>
|
||||
<!-- Piwik --> {# Yes it's in the source, fight me #}
|
||||
<script type="text/javascript">
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
{% load joinsep %}
|
||||
{% load urlsafe %}
|
||||
{% load pretty %}
|
||||
{% load splitstr %}
|
||||
|
||||
{% block table-wrapper %}
|
||||
<script src="{% static 'js/column-shifter.js' %}"></script>
|
||||
<div id="drilldown-table" class="column-shifter-container" style="position:relative; z-index:1;">
|
||||
|
@ -168,6 +170,13 @@
|
|||
<p>{{ row.cells.date }}</p>
|
||||
<p>{{ row.cells.time }}</p>
|
||||
</td>
|
||||
{% elif column.name == 'match_ts' %}
|
||||
<td class="{{ column.name }}">
|
||||
{% with match_ts=cell|splitstr:'T' %}
|
||||
<p>{{ match_ts.0 }}</p>
|
||||
<p>{{ match_ts.1 }}</p>
|
||||
{% endwith %}
|
||||
</td>
|
||||
{% elif column.name == 'type' or column.name == 'mtype' %}
|
||||
<td class="{{ column.name }}">
|
||||
<a
|
||||
|
@ -376,7 +385,29 @@
|
|||
</td>
|
||||
{% elif column.name == "meta" %}
|
||||
<td class="{{ column.name }}">
|
||||
<pre>{{ cell|pretty }}</pre>
|
||||
<pre class="small-field" style="cursor: pointer;">{{ cell|pretty }}</pre>
|
||||
</td>
|
||||
{% elif 'id' in column.name %}
|
||||
<td class="{{ column.name }}">
|
||||
<div class="buttons">
|
||||
<div class="nowrap-parent">
|
||||
<!-- <input class="input" type="text" value="{{ cell }}" style="width: 50px;" readonly> -->
|
||||
<a
|
||||
class="has-text-grey button nowrap-child"
|
||||
onclick="populateSearch('{{ column.name }}', '{{ cell|escapejs }}')">
|
||||
<span class="icon" data-tooltip="Populate {{ cell }}">
|
||||
<i class="fa-solid fa-arrow-left-long-to-line" aria-hidden="true"></i>
|
||||
</span>
|
||||
</a>
|
||||
<a
|
||||
class="has-text-grey button nowrap-child"
|
||||
onclick="window.prompt('Copy to clipboard: Ctrl+C, Enter', '{{ cell|escapejs }}');">
|
||||
<span class="icon" data-tooltip="Copy to clipboard">
|
||||
<i class="fa-solid fa-copy" aria-hidden="true"></i>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
{% else %}
|
||||
<td class="{{ column.name }}">
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
from django import template
|
||||
|
||||
register = template.Library()
|
||||
|
||||
|
||||
@register.filter
|
||||
def splitstr(value, arg):
|
||||
return value.split(arg)
|
Loading…
Reference in New Issue