You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.1 KiB

  1. package master_ui
  2. import (
  3. "html/template"
  4. )
  5. var StatusTpl = template.Must(template.New("status").Parse(`<!DOCTYPE html>
  6. <html>
  7. <head>
  8. <title>SeaweedFS Filer</title>
  9. <link rel="icon" href="http://7viirv.com1.z0.glb.clouddn.com/seaweed_favicon.png" sizes="32x32" />
  10. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
  11. </head>
  12. <body>
  13. <div class="container">
  14. <div class="page-header">
  15. <h1>
  16. <img src="http://7viirv.com1.z0.glb.clouddn.com/seaweed50x50.png"></img>
  17. SeaweedFS Filer
  18. </h1>
  19. </div>
  20. <div class="row">
  21. {{.Path}}
  22. </div>
  23. <div class="row">
  24. <ul>
  25. {{$path := .Path }}
  26. {{ range $dirs_index, $dir := .Directories }}
  27. <li>
  28. <a href= {{ print $path $dir.Name "/"}} >
  29. {{ $dir.Name }}
  30. </a>
  31. </li>
  32. {{ end }}
  33. {{ range $file_index, $file := .Files }}
  34. <li>
  35. {{ $file.Name }}
  36. </li>
  37. {{ end }}
  38. </ul>
  39. </div>
  40. {{if .ShouldDisplayLoadMore}}
  41. <div class="row">
  42. <a href= {{ print .Path "?limit=" .Limit "&lastFileName=" .LastFileName}} >
  43. Load more
  44. </a>
  45. </div>
  46. {{end}}
  47. </div>
  48. </body>
  49. </html>
  50. `))