You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Hydro/packages/ui-default/templates/record_main.html

129 lines
5.2 KiB
HTML

{% extends "layout/basic.html" %}
{% block content %}
{% if filterTid %}
{{ set(UiContext, 'socketUrl', "/record-conn?domainId=" + handler.domainId + "&tid=" + filterTid) }}
{% else %}
{{ set(UiContext, 'socketUrl', "/record-conn?domainId=" + handler.domainId) }}
{% endif %}
{{ set(UiContext, 'rids', rdocs.map(eval("rdoc=>rdoc._id.toString()"))) }}
<div class="row">
<div class="medium-12 columns">
<form method="get">
<div class="section">
<div class="section__header">
<h1 class="section__title">{{ _('Filter') }}</h1>
<div class="section__tools">
<button type="submit" class="primary button"><span class="icon icon-filter"></span> {{ _('Filter') }}</button>
<a href="{{ url('record_main') }}" class="button">{{ _('Reset') }}</a>
</div>
</div>
<div class="section__body">
<div class="row">
<div class="medium-3 columns">
<label class="filter-user">
{{ _('By Username / UID') }}
<input name="uidOrName" type="text" class="textbox" value="{{ filterUidOrName }}" autocomplete="off" data-autofocus>
</label>
</div>
<div class="medium-3 columns">
<label>
{{ _('By Problem') }}
<input name="pid" type="text" class="textbox" value="{{ filterPid }}">
</label>
</div>
<div class="medium-3 columns">
<label>
{{ _('By Contest') }}
<input name="tid" type="text" class="textbox" value="{{ filterTid }}">
</label>
</div>
<div class="medium-3 columns">
<label>
{{ _('By Status') }}
</label>
<select class="inline compact select" name="status">
<option value="">{{ _('All Submissions') }}</option>
<option value="1">{{ _('Accepted') }}</option>
<option value="2">{{ _('Wrong Answer') }}</option>
<option value="3">{{ _('Time Limit Exceeded') }}</option>
<option value="4">{{ _('Memory Limit Exceeded') }}</option>
<option value="6">{{ _('Runtime Error') }}</option>
<option value="7">{{ _('Compile Error') }}</option>
<option value="8">{{ _('System Error') }}</option>
</select>
</div>
</div>
</div>
</div>
</form>
<div class="section">
<div class="section__body no-padding">
{% if not rdocs %}
{% if not filterUidOrName and not filterPid and not filterTid %}
{{ nothing.render('Oh, there is no task in the queue!') }}
{% else %}
{{ nothing.render('Oh, there is no task that matches the filter!') }}
{% endif%}
{% else %}
<table class="data-table record_main__table">
<colgroup>
<col class="col--status">
<col class="col--problem">
<col class="col--submit-by">
<col class="col--time">
<col class="col--memory">
<col class="col--lang">
<col class="col--submit-at">
</colgroup>
<thead>
<tr>
<th class="col--status record-status--border">{{ _('Status') }}</th>
<th class="col--problem">{{ _('Problem') }}</th>
<th class="col--submit-by">{{ _('Submit By') }}</th>
<th class="col--time">{{ _('Time') }}</th>
<th class="col--memory">{{ _('Memory') }}</th>
<th class="col--lang">{{ _('Language') }}</th>
<th class="col--submit-at">{{ _('Submit At') }}</th>
</tr>
</thead>
<tbody>
{%- for rdoc in rdocs -%}
{% set udoc = udict[rdoc['uid']] %}
{% set pdoc = pdict[rdoc['pid']] or pdict[rdoc.pdomain + ':' + rdoc.pid] %}
{% include 'record_main_tr.html' %}
{%- endfor -%}
</tbody>
</table>
{% if handler.user.hasPriv(PRIV.PRIV_VIEW_JUDGE_STATISTICS) %}
<ul class="pager">
<li>
<a class="pager__item next link" href="?page={{ page + 1 }}&{{ query_string }}">{{ _('pager_next') }}</a>
</li>
</ul>
{% endif %}
{% endif %}
</div>
</div>
{% if statistics %}
<div class="section">
<div class="section__header">
<h1 class="section__title">{{ _('Statistics') }}</h1>
</div>
<div class="section__body">
<dl class="large horizontal">
<dt>{{ _('Delay')}}</dt><dd>{{ statistics.delay[0]|int }}</dd>
<dt>{{ _('5 Min')}}</dt><dd>{{ statistics['d5min'] }}</dd>
<dt>{{ _('1 Hour')}}</dt><dd>{{ statistics['d1h'] }}</dd>
<dt>{{ _('Day') }}</dt><dd>{{ statistics['day'] }}</dd>
<dt>{{ _('Week') }}</dt><dd>{{ statistics['week'] }}</dd>
<dt>{{ _('Month') }}</dt><dd>{{ statistics['month'] }}</dd>
<dt>{{ _('Year') }}</dt><dd>{{ statistics['year'] }}</dd>
<dt>{{ _('Total') }}</dt><dd>{{ statistics['total'] }}</dd>
</dl>
</div>
</div>
{% endif %}
</div>
</div>
{% endblock %}