volume.html 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>SeaweedFS {{ .Version }}</title>
  5. <link rel="stylesheet" href="/seaweedfsstatic/bootstrap/3.3.1/css/bootstrap.min.css">
  6. <script type="text/javascript" src="/seaweedfsstatic/javascript/jquery-3.6.0.min.js"></script>
  7. <script type="text/javascript"
  8. src="/seaweedfsstatic/javascript/jquery-sparklines/2.1.2/jquery.sparkline.min.js"></script>
  9. <script type="text/javascript">
  10. $(function () {
  11. var periods = ['second', 'minute', 'hour', 'day'];
  12. for (i = 0; i < periods.length; i++) {
  13. var period = periods[i];
  14. $('.inlinesparkline-' + period).sparkline('html', {
  15. type: 'line',
  16. barColor: 'red',
  17. tooltipSuffix: ' request per ' + period,
  18. });
  19. }
  20. });
  21. </script>
  22. <style>
  23. #jqstooltip {
  24. height: 28px !important;
  25. width: 150px !important;
  26. }
  27. </style>
  28. </head>
  29. <body>
  30. <div class="container">
  31. <div class="page-header">
  32. <h1>
  33. <a href="https://github.com/seaweedfs/seaweedfs"><img src="/seaweedfsstatic/seaweed50x50.png"></img></a>
  34. SeaweedFS <small>{{ .Version }}</small>
  35. </h1>
  36. </div>
  37. <div class="row">
  38. <div class="col-sm-6">
  39. <h2>Disk Stats</h2>
  40. <table class="table table-striped">
  41. <thead>
  42. <tr>
  43. <th>Path</th>
  44. <th>Disk</th>
  45. <th>Total</th>
  46. <th>Free</th>
  47. <th>Usage</th>
  48. </tr>
  49. </thead>
  50. <tbody>
  51. {{ range .DiskStatuses }}
  52. <tr>
  53. <td>{{ .Dir }}</td>
  54. <td>{{ .DiskType }}</td>
  55. <td>{{ bytesToHumanReadable .All }}</td>
  56. <td>{{ bytesToHumanReadable .Free }}</td>
  57. <td>{{ percentFrom .All .Used}}%</td>
  58. </tr>
  59. {{ end }}
  60. </tbody>
  61. </table>
  62. </div>
  63. <div class="col-sm-6">
  64. <h2>System Stats</h2>
  65. <table class="table table-condensed table-striped">
  66. <tr>
  67. <th>Masters</th>
  68. <td>{{.Masters}}</td>
  69. </tr>
  70. <tr>
  71. <th>Weekly # ReadRequests</th>
  72. <td><span class="inlinesparkline-day">{{ .Counters.ReadRequests.WeekCounter.ToList | join }}</span>
  73. </td>
  74. </tr>
  75. <tr>
  76. <th>Daily # ReadRequests</th>
  77. <td><span class="inlinesparkline-hour">{{ .Counters.ReadRequests.DayCounter.ToList | join }}</span>
  78. </td>
  79. </tr>
  80. <tr>
  81. <th>Hourly # ReadRequests</th>
  82. <td><span
  83. class="inlinesparkline-minute">{{ .Counters.ReadRequests.HourCounter.ToList | join }}</span>
  84. </td>
  85. </tr>
  86. <tr>
  87. <th>Last Minute # ReadRequests</th>
  88. <td><span
  89. class="inlinesparkline-second">{{ .Counters.ReadRequests.MinuteCounter.ToList | join }}</span>
  90. </td>
  91. </tr>
  92. {{ range $key, $val := .Stats }}
  93. <tr>
  94. <th>{{ $key }}</th>
  95. <td>{{ $val }}</td>
  96. </tr>
  97. {{ end }}
  98. </table>
  99. </div>
  100. </div>
  101. <div class="row">
  102. <h2>Volumes</h2>
  103. <table class="table table-striped">
  104. <thead>
  105. <tr>
  106. <th>Id</th>
  107. <th>Collection</th>
  108. <th>Disk</th>
  109. <th>Data Size</th>
  110. <th>Files</th>
  111. <th>Trash</th>
  112. <th>TTL</th>
  113. <th>ReadOnly</th>
  114. <th>Version</th>
  115. </tr>
  116. </thead>
  117. <tbody>
  118. {{ range .Volumes }}
  119. <tr>
  120. <td><code>{{ .Id }}</code></td>
  121. <td>{{ .Collection }}</td>
  122. <td>{{ .DiskType }}</td>
  123. <td>{{ bytesToHumanReadable .Size }}</td>
  124. <td>{{ .FileCount }}</td>
  125. <td>{{ .DeleteCount }} / {{bytesToHumanReadable .DeletedByteCount}}</td>
  126. <td>{{ .Ttl }}</td>
  127. <td>{{ .ReadOnly }}</td>
  128. <td>{{ .Version }}</td>
  129. </tr>
  130. {{ end }}
  131. </tbody>
  132. </table>
  133. </div>
  134. {{ if isNotEmpty .RemoteVolumes }}
  135. <div class="row">
  136. <h2>Remote Volumes</h2>
  137. <table class="table table-striped">
  138. <thead>
  139. <tr>
  140. <th>Id</th>
  141. <th>Collection</th>
  142. <th>Size</th>
  143. <th>Files</th>
  144. <th>Trash</th>
  145. <th>Remote</th>
  146. <th>Key</th>
  147. </tr>
  148. </thead>
  149. <tbody>
  150. {{ range .RemoteVolumes }}
  151. <tr>
  152. <td><code>{{ .Id }}</code></td>
  153. <td>{{ .Collection }}</td>
  154. <td>{{ bytesToHumanReadable .Size }}</td>
  155. <td>{{ .FileCount }}</td>
  156. <td>{{ .DeleteCount }} / {{bytesToHumanReadable .DeletedByteCount}}</td>
  157. <td>{{ .RemoteStorageName }}</td>
  158. <td>{{ .RemoteStorageKey }}</td>
  159. </tr>
  160. {{ end }}
  161. </tbody>
  162. </table>
  163. </div>
  164. {{ end }}
  165. {{ if isNotEmpty .EcVolumes }}
  166. <div class="row">
  167. <h2>Erasure Coding Shards</h2>
  168. <table class="table table-striped">
  169. <thead>
  170. <tr>
  171. <th>Id</th>
  172. <th>Collection</th>
  173. <th>Total Size</th>
  174. <th>Shard Details</th>
  175. <th>CreatedAt</th>
  176. </tr>
  177. </thead>
  178. <tbody>
  179. {{ range .EcVolumes }}
  180. <tr>
  181. <td><code>{{ .VolumeId }}</code></td>
  182. <td>{{ .Collection }}</td>
  183. <td>{{ bytesToHumanReadable .Size }}</td>
  184. <td>
  185. {{ range .ShardDetails }}
  186. <span class="label label-info" style="margin-right: 5px;">
  187. {{ .ShardId }}: {{ bytesToHumanReadable .Size }}
  188. </span>
  189. {{ end }}
  190. </td>
  191. <td>{{ .CreatedAt.Format "2006-01-02 15:04" }}</td>
  192. </tr>
  193. {{ end }}
  194. </tbody>
  195. </table>
  196. </div>
  197. {{ end }}
  198. </div>
  199. </body>
  200. </html>