WIP: support different interface types: server, client and custom. Show different UI for each type.

This commit is contained in:
Christoph Haas
2021-04-03 19:11:05 +02:00
parent 116a86c5e7
commit aa17303cec
8 changed files with 396 additions and 124 deletions

View File

@@ -84,11 +84,18 @@
</div>
<div class="mt-4 row">
<div class="col-sm-10 col-12">
{{with or (eq $.Device.Type "server") (eq $.Device.Type "custom")}}
<h2 class="mt-2">Current VPN Peers</h2>
{{end}}
{{with eq $.Device.Type "client"}}
<h2 class="mt-2">Current VPN Endpoints</h2>
{{end}}
</div>
<div class="col-sm-2 col-12 text-right">
{{with eq $.Device.Type "server"}}
<a href="/admin/peer/createldap" title="Add multiple peers" class="btn btn-primary"><i class="fa fa-fw fa-user-plus"></i></a>
<a href="/admin/peer/create" title="Manually add a peer" class="btn btn-primary"><i class="fa fa-fw fa-plus"></i>M</a>
{{end}}
<a href="/admin/peer/create" title="Add a peer" class="btn btn-primary"><i class="fa fa-fw fa-plus"></i>M</a>
</div>
</div>
<div class="mt-2 table-responsive">