80 lines
No EOL
2.9 KiB
HTML
80 lines
No EOL
2.9 KiB
HTML
{{define "title"}}
|
|
GoWatch Backups
|
|
{{end}}
|
|
|
|
{{define "head"}}
|
|
<script src="{{.urlPrefix}}static/backup.js"></script>
|
|
{{ end }}
|
|
|
|
{{define "content"}}
|
|
|
|
<div class="container row">
|
|
{{ if .Error }}
|
|
<div class="row h3 justify-content-center text-danger">
|
|
{{ .Error }}
|
|
</div>
|
|
{{ end }}
|
|
<table class="table table-striped table-hover caption-top">
|
|
<caption class="h3 text-center">Backups</caption>
|
|
<thead>
|
|
<tr class="table-dark">
|
|
<th>File</th>
|
|
<th>Test</th>
|
|
<th>Restore</th>
|
|
<th>Delete</th>
|
|
<th>Download</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<form id="uploadForm" action="{{.urlPrefix}}backup/restore" enctype="multipart/form-data" method="POST">
|
|
<input type="hidden" value="-1" name="id">
|
|
<input class="form-control" type="file" id="upload" name="upload">
|
|
</form>
|
|
</td>
|
|
<td>
|
|
<input id="testSubmit" type="submit" class="btn btn-success" value="Test">
|
|
</td>
|
|
<td>
|
|
<input id="restoreSubmit" type="submit" class="btn btn-warning" value="Restore">
|
|
</td>
|
|
<td><button class="btn btn-danger" disabled>Delete</button></td>
|
|
<td><button class="btn btn-secondary" disabled>Download</button></td>
|
|
</tr>
|
|
{{ range $i, $backup := .Backups }}
|
|
<tr>
|
|
<td class="h5">{{ $backup }}</td>
|
|
<td>
|
|
<form action="{{$.urlPrefix}}backup/test" enctype="multipart/form-data" method="POST">
|
|
<input type="hidden" value="{{ $i }}" name="id">
|
|
<button class="btn btn-success">Test</button>
|
|
</form>
|
|
</td>
|
|
<td>
|
|
<form action="{{$.urlPrefix}}backup/restore" enctype="multipart/form-data" method="POST">
|
|
<input type="hidden" value="{{ $i }}" name="id">
|
|
<button class="btn btn-warning">Restore</button>
|
|
</form>
|
|
</td>
|
|
<td>
|
|
<form action="{{$.urlPrefix}}backup/delete" enctype="multipart/form-data" method="POST">
|
|
<input type="hidden" value="{{ $i }}" name="id">
|
|
<button class="btn btn-danger">Delete</button>
|
|
</form>
|
|
</td>
|
|
<td>
|
|
<a href="{{$.urlPrefix}}backup/download/{{ $i }}" class="btn btn-secondary">
|
|
Download
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
{{ end }}
|
|
</tbody>
|
|
</table>
|
|
<a href="{{.urlPrefix}}backup/create" class="btn btn-warning btn-lg">
|
|
Backup Now
|
|
</a>
|
|
</div>
|
|
|
|
{{end}} |