volume.html 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  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. </tr>
  115. </thead>
  116. <tbody>
  117. {{ range .Volumes }}
  118. <tr>
  119. <td><code>{{ .Id }}</code></td>
  120. <td>{{ .Collection }}</td>
  121. <td>{{ .DiskType }}</td>
  122. <td>{{ bytesToHumanReadable .Size }}</td>
  123. <td>{{ .FileCount }}</td>
  124. <td>{{ .DeleteCount }} / {{bytesToHumanReadable .DeletedByteCount}}</td>
  125. <td>{{ .Ttl }}</td>
  126. <td>{{ .ReadOnly }}</td>
  127. </tr>
  128. {{ end }}
  129. </tbody>
  130. </table>
  131. </div>
  132. {{ if isNotEmpty .RemoteVolumes }}
  133. <div class="row">
  134. <h2>Remote Volumes</h2>
  135. <table class="table table-striped">
  136. <thead>
  137. <tr>
  138. <th>Id</th>
  139. <th>Collection</th>
  140. <th>Size</th>
  141. <th>Files</th>
  142. <th>Trash</th>
  143. <th>Remote</th>
  144. <th>Key</th>
  145. </tr>
  146. </thead>
  147. <tbody>
  148. {{ range .RemoteVolumes }}
  149. <tr>
  150. <td><code>{{ .Id }}</code></td>
  151. <td>{{ .Collection }}</td>
  152. <td>{{ bytesToHumanReadable .Size }}</td>
  153. <td>{{ .FileCount }}</td>
  154. <td>{{ .DeleteCount }} / {{bytesToHumanReadable .DeletedByteCount}}</td>
  155. <td>{{ .RemoteStorageName }}</td>
  156. <td>{{ .RemoteStorageKey }}</td>
  157. </tr>
  158. {{ end }}
  159. </tbody>
  160. </table>
  161. </div>
  162. {{ end }}
  163. {{ if isNotEmpty .EcVolumes }}
  164. <div class="row">
  165. <h2>Erasure Coding Shards</h2>
  166. <table class="table table-striped">
  167. <thead>
  168. <tr>
  169. <th>Id</th>
  170. <th>Collection</th>
  171. <th>Shard Size</th>
  172. <th>Shards</th>
  173. <th>CreatedAt</th>
  174. </tr>
  175. </thead>
  176. <tbody>
  177. {{ range .EcVolumes }}
  178. <tr>
  179. <td><code>{{ .VolumeId }}</code></td>
  180. <td>{{ .Collection }}</td>
  181. <td>{{ bytesToHumanReadable .ShardSize }}</td>
  182. <td>{{ .ShardIdList }}</td>
  183. <td>{{ .CreatedAt.Format "02 Jan 06 15:04 -0700" }}</td>
  184. </tr>
  185. {{ end }}
  186. </tbody>
  187. </table>
  188. </div>
  189. {{ end }}
  190. </div>
  191. </body>
  192. </html>