parent
cdfa3419cc
commit
31a3e46a53
5 changed files with 237 additions and 6 deletions
@ -0,0 +1,72 @@ |
|||||||
|
% layout 'standard', title => 'Admin Panel', sb_active => 'admin'; |
||||||
|
|
||||||
|
%= include 'admin/_nav', page => 'domains' |
||||||
|
|
||||||
|
% if ( my $confirmation = flash 'confirmation' ) { |
||||||
|
<div style="margin-top: 2em" class="alert alert-success" role="alert"> |
||||||
|
<%== $confirmation %> |
||||||
|
</div> |
||||||
|
% } |
||||||
|
|
||||||
|
% if ( my $confirmation = flash 'error_message' ) { |
||||||
|
<div style="margin-top: 2em" class="alert alert-danger" role="alert"> |
||||||
|
<%== $confirmation %> |
||||||
|
</div> |
||||||
|
% } |
||||||
|
|
||||||
|
% if ( $c->stash->{success} ) { |
||||||
|
<div style="margin-top: 2em" class="alert alert-success" role="alert"> |
||||||
|
<%= $c->stash->{success_message} %> |
||||||
|
</div> |
||||||
|
% } |
||||||
|
|
||||||
|
% if ( $c->stash->{errors} ) { |
||||||
|
<div style="margin-top: 2em" class="alert alert-danger" role="alert"> |
||||||
|
There were errors with your request that could not be resolved: |
||||||
|
<ul> |
||||||
|
% for my $error ( @{$c->stash->{errors}} ) { |
||||||
|
<li><%= $error %></li> |
||||||
|
% } |
||||||
|
</ul> |
||||||
|
</div> |
||||||
|
% } |
||||||
|
|
||||||
|
<form class="row mt-3 gy-2 gx-3 align-items-center" method="POST" enctype="multipart/form-data" action="<%= $c->url_for( 'do_admin_domain' ) %>"> |
||||||
|
<div class="col-auto"> |
||||||
|
<label for="upload" class="col-form-label">Domain FQDN</label> |
||||||
|
</div> |
||||||
|
<div class="col-auto"> |
||||||
|
<input type="text" class="form-control" id="domain_fqdn" name="domain_fqdn" /> |
||||||
|
</div> |
||||||
|
<div class="col-auto"> |
||||||
|
<button type="submit" class="btn btn-sm btn-primary">Add Hosted Domain</button> |
||||||
|
</div> |
||||||
|
</form> |
||||||
|
|
||||||
|
<hr /> |
||||||
|
|
||||||
|
<table style="border: 1px solid #ccc" class="table"> |
||||||
|
<tbody> |
||||||
|
<tr> |
||||||
|
<th class="text-nowrap">ID</th> |
||||||
|
<th class="text-nowrap">FQDN</th> |
||||||
|
<th class="text-nowrap">SSL Challenge</th> |
||||||
|
<th class="text-nowrap">Delete</th> |
||||||
|
</tr> |
||||||
|
</thead> |
||||||
|
<tbody> |
||||||
|
% for my $domain ( @{$domains} ) { |
||||||
|
<tr> |
||||||
|
<td><%= $domain->id %></td> |
||||||
|
<td><%= $domain->name %></td> |
||||||
|
<td><%= $domain->letsencrypt_challenge %></td> |
||||||
|
<td> |
||||||
|
<form style="margin-top: 1.5em; display: inline;" method="POST" action="<%= $c->url_for( 'do_admin_domain_remove' ) %>"> |
||||||
|
<input type="hidden" name="did" value="<%= $domain->id %>"> |
||||||
|
<button type="submit" class="btn btn-sm btn-outline-danger">Delete Domain</button> |
||||||
|
</form> |
||||||
|
</td> |
||||||
|
</tr> |
||||||
|
% } |
||||||
|
</tbody> |
||||||
|
</table> |
||||||
@ -0,0 +1,70 @@ |
|||||||
|
% layout 'standard', title => 'Admin Panel', sb_active => 'admin'; |
||||||
|
|
||||||
|
%= include 'admin/_nav', page => 'servers' |
||||||
|
|
||||||
|
% if ( my $confirmation = flash 'confirmation' ) { |
||||||
|
<div style="margin-top: 2em" class="alert alert-success" role="alert"> |
||||||
|
<%== $confirmation %> |
||||||
|
</div> |
||||||
|
% } |
||||||
|
|
||||||
|
% if ( my $confirmation = flash 'error_message' ) { |
||||||
|
<div style="margin-top: 2em" class="alert alert-danger" role="alert"> |
||||||
|
<%== $confirmation %> |
||||||
|
</div> |
||||||
|
% } |
||||||
|
|
||||||
|
% if ( $c->stash->{success} ) { |
||||||
|
<div style="margin-top: 2em" class="alert alert-success" role="alert"> |
||||||
|
<%= $c->stash->{success_message} %> |
||||||
|
</div> |
||||||
|
% } |
||||||
|
|
||||||
|
% if ( $c->stash->{errors} ) { |
||||||
|
<div style="margin-top: 2em" class="alert alert-danger" role="alert"> |
||||||
|
There were errors with your request that could not be resolved: |
||||||
|
<ul> |
||||||
|
% for my $error ( @{$c->stash->{errors}} ) { |
||||||
|
<li><%= $error %></li> |
||||||
|
% } |
||||||
|
</ul> |
||||||
|
</div> |
||||||
|
% } |
||||||
|
|
||||||
|
<form class="row mt-3 gy-2 gx-3 align-items-center" method="POST" enctype="multipart/form-data" action="<%= $c->url_for( 'do_admin_server' ) %>"> |
||||||
|
<div class="col-auto"> |
||||||
|
<label for="upload" class="col-form-label">Server FQDN</label> |
||||||
|
</div> |
||||||
|
<div class="col-auto"> |
||||||
|
<input type="text" class="form-control" id="server_fqdn" name="server_fqdn" /> |
||||||
|
</div> |
||||||
|
<div class="col-auto"> |
||||||
|
<button type="submit" class="btn btn-sm btn-primary">Add Server</button> |
||||||
|
</div> |
||||||
|
</form> |
||||||
|
|
||||||
|
<hr /> |
||||||
|
|
||||||
|
<table style="border: 1px solid #ccc" class="table"> |
||||||
|
<tbody> |
||||||
|
<tr> |
||||||
|
<th class="text-nowrap">ID</th> |
||||||
|
<th class="text-nowrap">FQDN</th> |
||||||
|
<th class="text-nowrap">Delete</th> |
||||||
|
</tr> |
||||||
|
</thead> |
||||||
|
<tbody> |
||||||
|
% for my $server ( @{$servers} ) { |
||||||
|
<tr> |
||||||
|
<td><%= $server->id %></td> |
||||||
|
<td><%= $server->hostname %></td> |
||||||
|
<td> |
||||||
|
<form style="margin-top: 1.5em; display: inline;" method="POST" action="<%= $c->url_for( 'do_admin_server_remove' ) %>"> |
||||||
|
<input type="hidden" name="sid" value="<%= $server->id %>"> |
||||||
|
<button type="submit" class="btn btn-sm btn-outline-danger">Delete Server</button> |
||||||
|
</form> |
||||||
|
</td> |
||||||
|
</tr> |
||||||
|
% } |
||||||
|
</tbody> |
||||||
|
</table> |
||||||
Loading…
Reference in new issue