97 lines
3.2 KiB
HTML
97 lines
3.2 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}Results — PhysCom{% endblock %}
|
|
|
|
{% block content %}
|
|
<h1>Results</h1>
|
|
|
|
<div class="form-row" style="margin-bottom:1rem">
|
|
{% for d in domains %}
|
|
<a href="{{ url_for('results.results_domain', domain_name=d.name) }}"
|
|
class="btn {{ 'btn-primary' if domain and domain.name == d.name else '' }}">
|
|
{{ d.name }}
|
|
</a>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
{% if domain and results is not none %}
|
|
<div class="card">
|
|
<div class="page-header">
|
|
<h2>{{ domain.name }} <span class="subtitle">{{ domain.description }}</span></h2>
|
|
<form method="post" action="{{ url_for('results.reset_results', domain_name=domain.name) }}"
|
|
class="inline-form"
|
|
onsubmit="return confirm('Delete all results for {{ domain.name }}? This cannot be undone.')">
|
|
<button type="submit" class="btn btn-danger btn-sm">Reset results</button>
|
|
</form>
|
|
</div>
|
|
|
|
{% if statuses %}
|
|
<div class="filter-row">
|
|
<span>Filter:</span>
|
|
<a href="{{ url_for('results.results_domain', domain_name=domain.name) }}"
|
|
class="btn btn-sm {{ '' if status_filter else 'btn-primary' }}">All ({{ total_results }})</a>
|
|
{% for s, cnt in statuses.items() %}
|
|
<a href="{{ url_for('results.results_domain', domain_name=domain.name, status=s) }}"
|
|
class="btn btn-sm {{ 'btn-primary' if status_filter == s else '' }}">
|
|
{{ s }} ({{ cnt }})
|
|
</a>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if not results %}
|
|
{% if status_filter %}
|
|
<p class="empty">No results with status "{{ status_filter }}" in this domain.</p>
|
|
{% else %}
|
|
<p class="empty">No results for this domain yet. <a href="{{ url_for('pipeline.pipeline_form') }}">Run the pipeline</a> first.</p>
|
|
{% endif %}
|
|
{% else %}
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>#</th>
|
|
<th>Score</th>
|
|
<th>Entities</th>
|
|
<th>Status</th>
|
|
<th>Details</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for r in results %}
|
|
<tr>
|
|
<td>{{ loop.index }}</td>
|
|
<td class="score-cell">{{ "%.4f"|format(r.composite_score) if r.composite_score is not none else '—' }}</td>
|
|
<td>{{ r.combination.entities|map(attribute='name')|join(' + ') }}</td>
|
|
<td>
|
|
{%- if r.domain_block_reason -%}
|
|
<span class="badge badge-p1_fail">domain_blocked</span>
|
|
{%- else -%}
|
|
<span class="badge badge-{{ r.combination.status }}">{{ r.combination.status }}</span>
|
|
{%- endif -%}
|
|
</td>
|
|
<td class="block-reason-cell">
|
|
{%- if r.domain_block_reason -%}
|
|
{{ r.domain_block_reason }}
|
|
{%- elif r.combination.status.endswith('_fail') and r.combination.block_reason -%}
|
|
{{ r.combination.block_reason }}
|
|
{%- elif r.novelty_flag -%}
|
|
{{ r.novelty_flag }}
|
|
{%- else -%}
|
|
—
|
|
{%- endif -%}
|
|
</td>
|
|
<td>
|
|
<a href="{{ url_for('results.result_detail', domain_name=domain.name, combo_id=r.combination.id) }}"
|
|
class="btn btn-sm">View</a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endif %}
|
|
</div>
|
|
{% elif not domain %}
|
|
<p class="empty">Select a domain above to view results.</p>
|
|
{% endif %}
|
|
{% endblock %}
|