2016-07-18 08:28:24 +00:00
|
|
|
package master_ui
|
|
|
|
|
|
|
|
import (
|
|
|
|
"html/template"
|
|
|
|
)
|
|
|
|
|
|
|
|
var StatusTpl = template.Must(template.New("status").Parse(`<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>SeaweedFS Filer</title>
|
|
|
|
<link rel="icon" href="http://7viirv.com1.z0.glb.clouddn.com/seaweed_favicon.png" sizes="32x32" />
|
|
|
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="container">
|
|
|
|
<div class="page-header">
|
|
|
|
<h1>
|
|
|
|
<img src="http://7viirv.com1.z0.glb.clouddn.com/seaweed50x50.png"></img>
|
|
|
|
SeaweedFS Filer
|
|
|
|
</h1>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
{{.Path}}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<ul>
|
|
|
|
{{$path := .Path }}
|
2018-05-14 06:56:16 +00:00
|
|
|
{{ range $entry_index, $entry := .Entries }}
|
2016-07-18 08:28:24 +00:00
|
|
|
<li>
|
2018-05-14 06:56:16 +00:00
|
|
|
{{if $entry.IsDirectory}}
|
|
|
|
<img src="https://www.w3.org/TR/WWWicn/folder.gif" width="20" height="23">
|
|
|
|
<a href={{ print $path "/" $entry.Name "/"}} >
|
|
|
|
{{ $entry.Name }}
|
|
|
|
</a>
|
|
|
|
{{else}}
|
|
|
|
<a href={{ print $path "/" $entry.Name }} >
|
|
|
|
{{ $entry.Name }}
|
|
|
|
</a>
|
|
|
|
{{end}}
|
2016-07-18 08:28:24 +00:00
|
|
|
</li>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
2018-05-05 21:41:40 +00:00
|
|
|
{{if .ShouldDisplayLoadMore}}
|
2016-07-18 08:28:24 +00:00
|
|
|
<div class="row">
|
2018-05-05 21:41:40 +00:00
|
|
|
<a href={{ print .Path "?limit=" .Limit "&lastFileName=" .LastFileName}} >
|
2016-07-20 08:46:28 +00:00
|
|
|
Load more
|
|
|
|
</a>
|
2016-07-18 08:28:24 +00:00
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
`))
|