Files
tianxuan/templates/analysis/dashboard.html
T

55 lines
1.9 KiB
HTML

{% extends 'base.html' %}
{% block title %}首页 - 天璇{% endblock %}
{% block content %}
<div class="card">
<h2>TLS Flow Analysis Dashboard</h2>
<p style="color:#666;margin-bottom:1rem;">Upload CSV flow data, detect entities, cluster behavior profiles, and visualize results.</p>
</div>
{% if runs %}
<div class="card">
<h2>Recent Analysis Runs</h2>
<table>
<thead>
<tr>
<th>ID</th>
<th>Started</th>
<th>Status</th>
<th>Entity Column</th>
<th>Entities</th>
<th>Clusters</th>
<th></th>
</tr>
</thead>
<tbody>
{% for run in runs %}
<tr>
<td>#{{ run.id }}</td>
<td>{{ run.created_at|date:"Y-m-d H:i" }}</td>
<td>
{% if run.status == 'completed' %}
<span class="badge badge-success">Completed</span>
{% elif run.status == 'failed' %}
<span class="badge badge-danger">Failed</span>
{% else %}
<span class="badge badge-info">{{ run.get_status_display }}</span>
{% endif %}
</td>
<td>{{ run.entity_column|default:"-" }}</td>
<td>{{ run.entity_count|default:"-" }}</td>
<td>{{ run.cluster_count|default:"-" }}</td>
<td><a href="{% url 'analysis:run_detail' run.id %}" class="btn btn-primary">View</a></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% else %}
<div class="card empty-state">
<div style="font-size:3rem;">📊</div>
<p>No analysis runs yet. Use MCP tools to load data and start analysis.</p>
<p style="font-size:0.9rem;color:#bbb;margin-top:0.5rem;">Call <code>load_data()</code> via MCP to begin.</p>
</div>
{% endif %}
{% endblock %}