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.

58 lines
1.2 KiB

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