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.

57 lines
1.2 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 $entry_index, $entry := .Entries }}
  27. <li>
  28. {{if $entry.IsDirectory}}
  29. <img src="https://www.w3.org/TR/WWWicn/folder.gif" width="20" height="23">
  30. <a href={{ print $path "/" $entry.Name "/"}} >
  31. {{ $entry.Name }}
  32. </a>
  33. {{else}}
  34. <a href={{ print $path "/" $entry.Name }} >
  35. {{ $entry.Name }}
  36. </a>
  37. {{end}}
  38. </li>
  39. {{ end }}
  40. </ul>
  41. </div>
  42. {{if .ShouldDisplayLoadMore}}
  43. <div class="row">
  44. <a href={{ print .Path "?limit=" .Limit "&lastFileName=" .LastFileName}} >
  45. Load more
  46. </a>
  47. </div>
  48. {{end}}
  49. </div>
  50. </body>
  51. </html>
  52. `))