{% extends "base.html" %}
{% block title %}Tunnels — goutd{% endblock %}
{% block content %}
<h1>Active Tunnels</h1>
{% if tunnels.is_empty() %}
<div class="empty">
<p>No active tunnels</p>
<p style="margin-top:8px">Use <code>gout login</code> then <code>gout tcp <port></code> to create one.</p>
</div>
{% else %}
<table>
<thead>
<tr>
<th>Token</th>
<th>Type</th>
<th>Public Port</th>
<th>Key</th>
<th>Status</th>
</tr>
</thead>
<tbody>
{% for t in tunnels %}
<tr>
<td class="mono">{{ t.token }}</td>
<td><span class="tag tag-{{ t.tunnel_type }}">{{ t.tunnel_type }}</span></td>
<td class="mono">{{ t.public_port }}</td>
<td>{{ t.key_name }}</td>
<td>
{% if t.connected %}
<span class="tag tag-active">active</span>
{% if t.pending_count > 0 %}
<span style="font-size:12px;color:#656d76;margin-left:4px">({{ t.pending_count }} pending)</span>
{% endif %}
{% else %}
<span class="tag tag-waiting">waiting</span>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% endblock %}