server.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. <!DOCTYPE html>
  2. <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
  3. <head>
  4. <th:block th:include="include :: header('服务器监控')" />
  5. </head>
  6. <body class="gray-bg">
  7. <div class="wrapper wrapper-content">
  8. <div class="col-sm-12">
  9. <div class="row">
  10. <div class="col-sm-6">
  11. <div class="ibox float-e-margins">
  12. <div class="ibox-title">
  13. <h5>CPU</h5>
  14. <div class="ibox-tools">
  15. <a class="collapse-link"><i class="fa fa-chevron-up"></i>
  16. </a>
  17. <a class="close-link"><i class="fa fa-times"></i></a>
  18. </div>
  19. </div>
  20. <div class="ibox-content">
  21. <table class="table table-hover no-margins">
  22. <thead>
  23. <tr>
  24. <th>属性</th>
  25. <th>值</th>
  26. </tr>
  27. </thead>
  28. <tbody>
  29. <tr>
  30. <td>核心数</td>
  31. <td th:text="${server.cpu.cpuNum}">0个</td>
  32. </tr>
  33. <tr>
  34. <td>用户使用率</td>
  35. <td th:text="${server.cpu.used + '%'}">0%</td>
  36. </tr>
  37. <tr>
  38. <td>系统使用率</td>
  39. <td th:text="${server.cpu.sys + '%'}">0%</td>
  40. </tr>
  41. <tr>
  42. <td>当前空闲率</td>
  43. <td th:text="${server.cpu.free + '%'}">0%</td>
  44. </tr>
  45. </tbody>
  46. </table>
  47. </div>
  48. </div>
  49. </div>
  50. <div class="col-sm-6">
  51. <div class="ibox float-e-margins">
  52. <div class="ibox-title">
  53. <h5>内存</h5>
  54. <div class="ibox-tools">
  55. <a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
  56. <a class="close-link"><i class="fa fa-times"></i></a>
  57. </div>
  58. </div>
  59. <div class="ibox-content">
  60. <table class="table table-hover no-margins">
  61. <thead>
  62. <tr>
  63. <th>属性</th>
  64. <th>内存</th>
  65. <th>JVM</th>
  66. </tr>
  67. </thead>
  68. <tbody>
  69. <tr>
  70. <td>总内存</td>
  71. <td th:text="${server.mem.total + 'G'}">0GB</td>
  72. <td th:text="${server.jvm.total + 'M'}">0MB</td>
  73. </tr>
  74. <tr>
  75. <td>已用内存</td>
  76. <td th:text="${server.mem.used + 'G'}">0GB</td>
  77. <td th:text="${server.jvm.used + 'M'}">0MB</td>
  78. </tr>
  79. <tr>
  80. <td>剩余内存</td>
  81. <td th:text="${server.mem.free + 'G'}">0GB</td>
  82. <td th:text="${server.jvm.free + 'M'}">0MB</td>
  83. </tr>
  84. <tr>
  85. <td>使用率</td>
  86. <td th:class="${server.mem.usage gt 80} ? 'text-danger'">[[${server.mem.usage}]]%</td>
  87. <td th:class="${server.jvm.usage gt 80} ? 'text-danger'">[[${server.jvm.usage}]]%</td>
  88. </tr>
  89. </tbody>
  90. </table>
  91. </div>
  92. </div>
  93. </div>
  94. </div>
  95. <div class="row">
  96. <div class="col-sm-12">
  97. <div class="ibox float-e-margins">
  98. <div class="ibox-title">
  99. <h5>服务器信息</h5>
  100. <div class="ibox-tools">
  101. <a class="collapse-link">
  102. <i class="fa fa-chevron-up"></i>
  103. </a>
  104. <a class="close-link">
  105. <i class="fa fa-times"></i>
  106. </a>
  107. </div>
  108. </div>
  109. <div class="ibox-content">
  110. <div class="row">
  111. <div class="col-sm-12">
  112. <table class="table table-hover margin bottom">
  113. <tbody>
  114. <tr>
  115. <td>服务器名称</td>
  116. <td th:text="${server.sys.computerName}">RuoYi</td>
  117. <td>操作系统</td>
  118. <td th:text="${server.sys.osName}">Linux</td>
  119. </tr>
  120. <tr>
  121. <td>服务器IP</td>
  122. <td th:text="${server.sys.computerIp}">127.0.0.1</td>
  123. <td>系统架构</td>
  124. <td th:text="${server.sys.osArch}">amd64</td>
  125. </tr>
  126. </tbody>
  127. </table>
  128. </div>
  129. </div>
  130. </div>
  131. </div>
  132. </div>
  133. </div>
  134. <div class="row">
  135. <div class="col-sm-12">
  136. <div class="ibox float-e-margins">
  137. <div class="ibox-title">
  138. <h5>Java虚拟机信息</h5>
  139. <div class="ibox-tools">
  140. <a class="collapse-link">
  141. <i class="fa fa-chevron-up"></i>
  142. </a>
  143. <a class="close-link">
  144. <i class="fa fa-times"></i>
  145. </a>
  146. </div>
  147. </div>
  148. <div class="ibox-content">
  149. <div class="row">
  150. <div class="col-sm-12">
  151. <table class="table table-hover margin bottom">
  152. <tbody>
  153. <tr>
  154. <td>Java名称</td>
  155. <td th:text="${server.jvm.name}">Java</td>
  156. <td>Java版本</td>
  157. <td th:text="${server.jvm.version}">1.8.0</td>
  158. </tr>
  159. <tr>
  160. <td>启动时间</td>
  161. <td th:text="${server.jvm.startTime}">2018-12-31 00:00:00</td>
  162. <td>运行时长</td>
  163. <td th:text="${server.jvm.runTime}">0天0时0分0秒</td>
  164. </tr>
  165. <tr>
  166. <td colspan="1">安装路径</td>
  167. <td colspan="3" th:text="${server.jvm.home}"></td>
  168. </tr>
  169. <tr>
  170. <td colspan="1">项目路径</td>
  171. <td colspan="3" th:text="${server.sys.userDir}"></td>
  172. </tr>
  173. </tbody>
  174. </table>
  175. </div>
  176. </div>
  177. </div>
  178. </div>
  179. </div>
  180. </div>
  181. <div class="row">
  182. <div class="col-sm-12">
  183. <div class="ibox float-e-margins">
  184. <div class="ibox-title">
  185. <h5>磁盘状态</h5>
  186. <div class="ibox-tools">
  187. <a class="collapse-link">
  188. <i class="fa fa-chevron-up"></i>
  189. </a>
  190. <a class="close-link">
  191. <i class="fa fa-times"></i>
  192. </a>
  193. </div>
  194. </div>
  195. <div class="ibox-content">
  196. <div class="row">
  197. <div class="col-sm-12">
  198. <table class="table table-hover margin bottom">
  199. <thead>
  200. <tr>
  201. <th>盘符路径</th>
  202. <th>文件系统</th>
  203. <th>盘符类型</th>
  204. <th>总大小</th>
  205. <th>可用大小</th>
  206. <th>已用大小</th>
  207. <th>已用百分比</th>
  208. </tr>
  209. </thead>
  210. <tbody>
  211. <tr th:each="sysFile : ${server.sysFiles}">
  212. <td th:text="${sysFile.dirName}">C:\</td>
  213. <td th:text="${sysFile.sysTypeName}">NTFS</td>
  214. <td th:text="${sysFile.typeName}">local</td>
  215. <td th:text="${sysFile.total}">0GB</td>
  216. <td th:text="${sysFile.free}">0GB</td>
  217. <td th:text="${sysFile.used}">0GB</td>
  218. <td th:class="${sysFile.usage gt 80} ? 'text-danger'">[[${sysFile.usage}]]%</td>
  219. </tr>
  220. </tbody>
  221. </table>
  222. </div>
  223. </div>
  224. </div>
  225. </div>
  226. </div>
  227. </div>
  228. </div>
  229. </div>
  230. </body>
  231. <th:block th:include="include :: footer" />
  232. <script>
  233. $(".modal").appendTo("body"), $("[data-toggle=popover]").popover(), $(".collapse-link").click(function() {
  234. var div_ibox = $(this).closest("div.ibox"),
  235. e = $(this).find("i"),
  236. i = div_ibox.find("div.ibox-content");
  237. i.slideToggle(200),
  238. e.toggleClass("fa-chevron-up").toggleClass("fa-chevron-down"),
  239. div_ibox.toggleClass("").toggleClass("border-bottom"),
  240. setTimeout(function() {
  241. div_ibox.resize();
  242. }, 50);
  243. }), $(".close-link").click(function () {
  244. var div_ibox = $(this).closest("div.ibox");
  245. div_ibox.remove()
  246. });
  247. </script>
  248. </html>