2024-10-10 08:59:53 +00:00
|
|
|
{{$container := .Container}}
|
2024-09-26 14:32:27 +00:00
|
|
|
{{ $prefix := trimPrefix .Prefix }}
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8"/>
|
2024-10-10 08:59:53 +00:00
|
|
|
<title>Index of {{.Protocol}}://{{$container}}
|
|
|
|
/{{if $prefix}}/{{$prefix}}/{{end}}</title>
|
2024-09-26 14:32:27 +00:00
|
|
|
<style>
|
2024-10-10 08:59:53 +00:00
|
|
|
.alert {
|
|
|
|
width: 80%;
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 20px;
|
|
|
|
background-color: #f44336;
|
|
|
|
color: white;
|
|
|
|
margin-bottom: 15px;
|
|
|
|
}
|
2024-09-26 14:32:27 +00:00
|
|
|
table {
|
|
|
|
width: 80%;
|
|
|
|
border-collapse: collapse;
|
|
|
|
}
|
|
|
|
body {
|
|
|
|
background: #f2f2f2;
|
|
|
|
}
|
|
|
|
table, th, td {
|
|
|
|
border: 0 solid transparent;
|
|
|
|
}
|
|
|
|
th, td {
|
|
|
|
padding: 10px;
|
|
|
|
text-align: left;
|
|
|
|
}
|
|
|
|
th {
|
|
|
|
background-color: #c3bcbc;
|
|
|
|
}
|
2024-10-10 08:59:53 +00:00
|
|
|
|
|
|
|
h1 {
|
|
|
|
font-size: 1.5em;
|
|
|
|
}
|
2024-09-26 14:32:27 +00:00
|
|
|
tr:nth-child(even) {background-color: #ebe7e7;}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
2024-10-10 08:59:53 +00:00
|
|
|
<h1>Index of {{.Protocol}}://{{$container}}/{{if $prefix}}{{$prefix}}/{{end}}</h1>
|
|
|
|
{{ if .HasErrors }}
|
|
|
|
<div class="alert">
|
|
|
|
Errors occurred while processing the request. Perhaps some objects are missing
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
2024-09-26 14:32:27 +00:00
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Filename</th>
|
2024-10-10 08:59:53 +00:00
|
|
|
<th>OID</th>
|
2024-09-26 14:32:27 +00:00
|
|
|
<th>Size</th>
|
|
|
|
<th>Created</th>
|
|
|
|
<th>Download</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{{ $trimmedPrefix := trimPrefix $prefix }}
|
|
|
|
{{if $trimmedPrefix }}
|
|
|
|
<tr>
|
|
|
|
<td>
|
2024-10-10 08:59:53 +00:00
|
|
|
⮐<a href="/get/{{$container}}{{ urlencode $trimmedPrefix }}/">..</a>
|
2024-09-26 14:32:27 +00:00
|
|
|
</td>
|
|
|
|
<td></td>
|
|
|
|
<td></td>
|
|
|
|
<td></td>
|
2024-10-10 08:59:53 +00:00
|
|
|
<td></td>
|
2024-09-26 14:32:27 +00:00
|
|
|
</tr>
|
|
|
|
{{else}}
|
|
|
|
<tr>
|
|
|
|
<td>
|
2024-10-10 08:59:53 +00:00
|
|
|
⮐<a href="/get/{{$container}}/">..</a>
|
2024-09-26 14:32:27 +00:00
|
|
|
</td>
|
|
|
|
<td></td>
|
|
|
|
<td></td>
|
|
|
|
<td></td>
|
2024-10-10 08:59:53 +00:00
|
|
|
<td></td>
|
2024-09-26 14:32:27 +00:00
|
|
|
</tr>
|
|
|
|
{{end}}
|
|
|
|
{{range .Objects}}
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
{{if .IsDir}}
|
|
|
|
🗀
|
2024-10-10 08:59:53 +00:00
|
|
|
<a href="{{.GetURL}}/">
|
2024-09-26 14:32:27 +00:00
|
|
|
{{.FileName}}/
|
|
|
|
</a>
|
|
|
|
{{else}}
|
|
|
|
🗎
|
2024-10-10 08:59:53 +00:00
|
|
|
<a href="{{ .GetURL }}">
|
2024-09-26 14:32:27 +00:00
|
|
|
{{.FileName}}
|
|
|
|
</a>
|
|
|
|
{{end}}
|
|
|
|
</td>
|
2024-10-10 08:59:53 +00:00
|
|
|
<td>{{.OID}}</td>
|
2024-09-26 14:32:27 +00:00
|
|
|
<td>{{if not .IsDir}}{{ formatSize .Size }}{{end}}</td>
|
2024-10-10 08:59:53 +00:00
|
|
|
<td>{{ .Created }}</td>
|
2024-09-26 14:32:27 +00:00
|
|
|
<td>
|
2024-10-10 08:59:53 +00:00
|
|
|
{{ if .OID }}
|
|
|
|
<a href="{{ .GetURL }}?download=true">
|
2024-09-26 14:32:27 +00:00
|
|
|
Link
|
|
|
|
</a>
|
|
|
|
{{ end }}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{end}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</body>
|
|
|
|
</html>
|