133 lines
4.0 KiB
HTML
133 lines
4.0 KiB
HTML
{% extends "base.html" %}
|
|
{% load static %}
|
|
{% block content %}
|
|
|
|
<div class="box">
|
|
<form method="POST">
|
|
{% csrf_token %}
|
|
<div class="field">
|
|
<label class="label">Search</label>
|
|
<div class="field-body">
|
|
<div class="field">
|
|
<div class="control is-expanded has-icons-left">
|
|
<input name="query" class="input" type="text" placeholder="Query">
|
|
<span class="icon is-small is-left">
|
|
<i class="fas fa-magnifying-glass"></i>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="columns">
|
|
<div class="column">
|
|
<label class="label">Timescale</label>
|
|
<div class="field-body">
|
|
<div class="field">
|
|
<div class="control is-expanded has-icons-left">
|
|
<div class="select is-fullwidth">
|
|
<select name="timescale">
|
|
<option value="minute">Minute</option>
|
|
<option value="hour">Hour</option>
|
|
<option value="day">Day</option>
|
|
<option value="week">Week</option>
|
|
<option value="month">Month</option>
|
|
<option value="6months">6 months</option>
|
|
</select>
|
|
<span class="icon is-small is-left">
|
|
<i class="fas fa-magnifying-glass"></i>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="column">
|
|
<label class="label">Fields</label>
|
|
|
|
<div class="field">
|
|
<div class="control is-expanded has-icons-left">
|
|
<div class="select is-fullwidth is-multiple">
|
|
<select multiple name="fields">
|
|
{% for field in fields %}
|
|
<option value="{{ field }}">{{ field }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
<span class="icon is-small is-left">
|
|
<i class="fas fa-magnifying-glass"></i>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="column">
|
|
<label class="label">Results</label>
|
|
<div class="field">
|
|
<div class="control is-expanded has-icons-left">
|
|
<div class="select is-fullwidth">
|
|
<select name="results">
|
|
<option value="5">5</option>
|
|
<option value="10">10</option>
|
|
<option value="15">15</option>
|
|
<option value="20">20</option>
|
|
<option value="50">50</option>
|
|
<option value="100">100</option>
|
|
<option value="200">200</option>
|
|
</select>
|
|
<span class="icon is-small is-left">
|
|
<i class="fas fa-magnifying-glass"></i>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="field">
|
|
<div class="control">
|
|
|
|
<button class="button is-primary is-fullwidth">
|
|
Search
|
|
</button>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|
|
</div>
|
|
{% if results is not None %}
|
|
<div class="box">
|
|
<div class="table-container">
|
|
<table class="table is-striped is-hoverable is-fullwidth">
|
|
<thead>
|
|
<tr>
|
|
<th>TS</th>
|
|
<th>msg</th>
|
|
<th>host</th>
|
|
<th>nick</th>
|
|
<th>channel</th>
|
|
<th>net</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
{% for item in results %}
|
|
<tr>
|
|
<td>{{ item.ts }}</td>
|
|
<td>{{ item.msg }}</td>
|
|
<td>{{ item.host }}</td>
|
|
<td>{{ item.nick }}</td>
|
|
<td>{{ item.channel }}</td>
|
|
<td>{{ item.net }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<p>{{ card }} hits</p>
|
|
<p>{{ took }}ms</p>
|
|
{% endif %}
|
|
|
|
{% endblock %}
|