Initial commit
This commit is contained in:
commit
77d35ff965
51 changed files with 5591 additions and 0 deletions
62
Pages/Caddy/Hosts.cshtml
Normal file
62
Pages/Caddy/Hosts.cshtml
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
@page
|
||||
@model PlanTempusAdmin.Pages.Caddy.HostsModel
|
||||
@{
|
||||
ViewData["Title"] = "Caddy Hosts";
|
||||
}
|
||||
|
||||
<div class="page-header">
|
||||
<h1 class="page-title">Registrerede Hosts</h1>
|
||||
<p class="page-subtitle">Alle hostnames konfigureret i Caddy</p>
|
||||
</div>
|
||||
|
||||
@if (!Model.IsRunning)
|
||||
{
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<p class="text-danger">Caddy server er ikke tilgængelig</p>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else if (Model.Hosts.Count == 0)
|
||||
{
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<p class="text-muted">Ingen hosts fundet</p>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="card">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Hostname</th>
|
||||
<th>TLS</th>
|
||||
<th>Upstream</th>
|
||||
<th>Listen</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var host in Model.Hosts)
|
||||
{
|
||||
<tr>
|
||||
<td><code>@host.Hostname</code></td>
|
||||
<td>
|
||||
@if (host.Tls)
|
||||
{
|
||||
<span class="badge badge-success">HTTPS</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="badge badge-warning">HTTP</span>
|
||||
}
|
||||
</td>
|
||||
<td><code>@(host.Upstream ?? "-")</code></td>
|
||||
<td><code>@string.Join(", ", host.Addresses)</code></td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue