提交 | 用户 | 时间
|
71e81e
|
1 |
<!DOCTYPE html> |
懒 |
2 |
<html> |
|
3 |
<head> |
|
4 |
<meta charset="utf-8"/> |
|
5 |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
|
6 |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
|
7 |
<title>${constants.getSystemName()}</title> |
|
8 |
<link rel="stylesheet" href="${ctxPath}/assets/common/libs/layui/css/layui.css?v=${constants.getReleaseVersion()}"/> |
|
9 |
<link rel="stylesheet" href="${ctxPath}/assets/common/module/admin.css?v=${constants.getReleaseVersion()}"/> |
|
10 |
<link rel="stylesheet" href="${ctxPath}/assets/expand/css/style.css?v=${constants.getReleaseVersion()}" media="all"/> |
|
11 |
</head> |
|
12 |
|
|
13 |
<body> |
|
14 |
|
|
15 |
<!-- 加载动画,移除位置在common.js中 --> |
|
16 |
<div class="page-loading"> |
|
17 |
<div class="ball-loader"> |
|
18 |
<span></span><span></span><span></span><span></span> |
|
19 |
</div> |
|
20 |
</div> |
|
21 |
|
|
22 |
<!-- 正文开始 --> |
|
23 |
<div class="layui-fluid"> |
|
24 |
<div class="layui-row layui-col-space15"> |
|
25 |
|
|
26 |
<div class="layui-col-lg6"> |
|
27 |
<div class="layui-card"> |
|
28 |
<div class="layui-card-header">CPU信息</div> |
|
29 |
<div class="layui-card-body"> |
|
30 |
<table class="layui-table layui-text"> |
|
31 |
<thead> |
|
32 |
<tr> |
|
33 |
<th>属性</th> |
|
34 |
<td>值</td> |
|
35 |
</tr> |
|
36 |
</thead> |
|
37 |
<tbody> |
|
38 |
<tr> |
|
39 |
<td>核心数</td> |
|
40 |
<td>${server.cpu.cpuNum!'0'}</td> |
|
41 |
</tr> |
|
42 |
<tr> |
|
43 |
<td>用户使用率</td> |
|
44 |
<td>${server.cpu.used!'0'}%</td> |
|
45 |
</tr> |
|
46 |
<tr> |
|
47 |
<td>系统使用率</td> |
|
48 |
<td id="sysUsage">${server.cpu.sys!'0'}%</td> |
|
49 |
</tr> |
|
50 |
<tr> |
|
51 |
<td>当前空闲率</td> |
|
52 |
<td>${server.cpu.free!'0'}%</td> |
|
53 |
</tr> |
|
54 |
</tbody> |
|
55 |
</table> |
|
56 |
</div> |
|
57 |
</div> |
|
58 |
</div> |
|
59 |
|
|
60 |
<div class="layui-col-lg6"> |
|
61 |
<div class="layui-card"> |
|
62 |
<div class="layui-card-header">内存信息</div> |
|
63 |
<div class="layui-card-body"> |
|
64 |
<table class="layui-table layui-text"> |
|
65 |
<thead> |
|
66 |
<tr> |
|
67 |
<th>属性</th> |
|
68 |
<th>内存</th> |
|
69 |
<th>JVM</th> |
|
70 |
</tr> |
|
71 |
</thead> |
|
72 |
<tbody> |
|
73 |
<tr> |
|
74 |
<td>总内存</td> |
|
75 |
<td>${server.mem.total!'0'}GB</td> |
|
76 |
<td>${server.jvm.total!'0'}MB</td> |
|
77 |
</tr> |
|
78 |
<tr> |
|
79 |
<td>已用内存</td> |
|
80 |
<td>${server.mem.used!'0'}GB</td> |
|
81 |
<td>${server.jvm.used!'0'}MB</td> |
|
82 |
</tr> |
|
83 |
<tr> |
|
84 |
<td>剩余内存</td> |
|
85 |
<td>${server.mem.free!'0'}GB</td> |
|
86 |
<td>${server.jvm.free!'0'}MB</td> |
|
87 |
</tr> |
|
88 |
<tr> |
|
89 |
<td>使用率</td> |
|
90 |
<td id="memUsage">${server.mem.usage!'0'}%</td> |
|
91 |
<td id="jvmUsage">${server.jvm.usage!'0'}%</td> |
|
92 |
</tr> |
|
93 |
</tbody> |
|
94 |
</table> |
|
95 |
</div> |
|
96 |
</div> |
|
97 |
</div> |
|
98 |
|
|
99 |
<div class="layui-col-lg12"> |
|
100 |
<div class="layui-card"> |
|
101 |
<div class="layui-card-header">JAVA虚拟机信息</div> |
|
102 |
<div class="layui-card-body"> |
|
103 |
<table class="layui-table layui-text"> |
|
104 |
<tbody> |
|
105 |
<tr> |
|
106 |
<td class="layui-table-header">Jvm名称</td> |
|
107 |
<td>${server.jvm.name!}</td> |
|
108 |
<td class="layui-table-header">Java版本</td> |
|
109 |
<td>${server.jvm.version!}</td> |
|
110 |
</tr> |
|
111 |
<tr> |
|
112 |
<td class="layui-table-header">启动时间</td> |
|
113 |
<td>${server.jvm.startTime}</td> |
|
114 |
<td class="layui-table-header">运行时长</td> |
|
115 |
<td>${server.jvm.runTime}</td> |
|
116 |
</tr> |
|
117 |
<tr> |
|
118 |
<td colspan="1" class="layui-table-header">安装路径</td> |
|
119 |
<td colspan="3">${server.jvm.home}</td> |
|
120 |
</tr> |
|
121 |
<tr> |
|
122 |
<td colspan="1" class="layui-table-header">项目路径</td> |
|
123 |
<td colspan="3">${server.sys.userDir}</td> |
|
124 |
</tr> |
|
125 |
</tbody> |
|
126 |
</table> |
|
127 |
</div> |
|
128 |
</div> |
|
129 |
</div> |
|
130 |
|
|
131 |
<div class="layui-col-lg12"> |
|
132 |
<div class="layui-card"> |
|
133 |
<div class="layui-card-header">服务器信息</div> |
|
134 |
<div class="layui-card-body"> |
|
135 |
<table class="layui-table layui-text"> |
|
136 |
<tbody> |
|
137 |
<tr> |
|
138 |
<td class="layui-table-header">服务器名称</td> |
|
139 |
<td>${server.sys.computerName}</td> |
|
140 |
<td class="layui-table-header">操作系统</td> |
|
141 |
<td>${server.sys.osName}</td> |
|
142 |
</tr> |
|
143 |
<tr> |
|
144 |
<td class="layui-table-header">服务器IP</td> |
|
145 |
<td>${server.sys.computerIp}</td> |
|
146 |
<td class="layui-table-header">系统架构</td> |
|
147 |
<td>${server.sys.osArch}</td> |
|
148 |
</tr> |
|
149 |
</tbody> |
|
150 |
</table> |
|
151 |
</div> |
|
152 |
</div> |
|
153 |
</div> |
|
154 |
|
|
155 |
<div class="layui-col-lg12"> |
|
156 |
<div class="layui-card"> |
|
157 |
<div class="layui-card-header">磁盘信息</div> |
|
158 |
<div class="layui-card-body"> |
|
159 |
<table class="layui-table layui-text"> |
|
160 |
<thead> |
|
161 |
<tr> |
|
162 |
<th>盘符路径</th> |
|
163 |
<th>文件系统</th> |
|
164 |
<th>盘符类型</th> |
|
165 |
<th>总大小</th> |
|
166 |
<th>可用大小</th> |
|
167 |
<th>已用大小</th> |
|
168 |
<th>已用百分比</th> |
|
169 |
</tr> |
|
170 |
</thead> |
|
171 |
<tbody> |
|
172 |
@for(sysFile in server.sysFiles){ |
|
173 |
<tr> |
|
174 |
<td>${sysFile.dirName!}</td> |
|
175 |
<td>${sysFile.sysTypeName!}</td> |
|
176 |
<td>${sysFile.typeName!}</td> |
|
177 |
<td>${sysFile.total!'0'}GB</td> |
|
178 |
<td>${sysFile.free!'0'}GB</td> |
|
179 |
<td>${sysFile.used!'0'}GB</td> |
|
180 |
<td>${sysFile.usage}%</td> |
|
181 |
</tr> |
|
182 |
@} |
|
183 |
</tbody> |
|
184 |
</table> |
|
185 |
</div> |
|
186 |
</div> |
|
187 |
</div> |
|
188 |
|
|
189 |
</div> |
|
190 |
</div> |
|
191 |
|
|
192 |
<!-- js部分 --> |
|
193 |
@/* 加入contextPath属性和session超时的配置 */ |
|
194 |
<script type="text/javascript"> |
|
195 |
var Feng = { |
|
196 |
ctxPath: "${ctxPath}", |
|
197 |
version: '${constants.getReleaseVersion()}' |
|
198 |
}; |
|
199 |
</script> |
|
200 |
|
|
201 |
<script type="text/javascript" src="${ctxPath}/assets/common/libs/layui/layui.js?v=${constants.getReleaseVersion()}"></script> |
|
202 |
<script type="text/javascript" src="${ctxPath}/assets/common/js/common.js?v=${constants.getReleaseVersion()}"></script> |
|
203 |
|
|
204 |
<script> |
|
205 |
layui.use(['layer'], function () { |
|
206 |
var $ = layui.jquery; |
|
207 |
var layer = layui.layer; |
|
208 |
|
|
209 |
var cpuUsage = ${server.cpu.sys!'0'}; |
|
210 |
var memUsage = ${server.mem.usage!'0'}; |
|
211 |
var jvmUsage = ${server.jvm.usage!'0'}; |
|
212 |
|
|
213 |
var msg = ""; |
|
214 |
|
|
215 |
if (cpuUsage >= 80) { |
|
216 |
$("#sysUsage").addClass("text-danger"); |
|
217 |
msg += "提示:CPU使用率过高!</br>"; |
|
218 |
} |
|
219 |
|
|
220 |
if (memUsage >= 80) { |
|
221 |
$("#memUsage").addClass("text-danger"); |
|
222 |
msg += "提示:内存使用率过高!</br>"; |
|
223 |
} |
|
224 |
|
|
225 |
if (jvmUsage >= 80) { |
|
226 |
$("#jvmUsage").addClass("text-danger"); |
|
227 |
msg += "提示:jvm使用率过高!"; |
|
228 |
} |
|
229 |
|
|
230 |
if (msg !== "") { |
|
231 |
layer.msg(msg) |
|
232 |
} |
|
233 |
|
|
234 |
}); |
|
235 |
</script> |
|
236 |
</body> |
|
237 |
|
|
238 |
</html> |