增加供应商

v1.4.1
Parker 4 years ago
parent fe6da76d50
commit 886a0d9f6d

@ -91,8 +91,6 @@ public class SystemHardwareInfo implements Serializable {
setSysInfo(si.getOperatingSystem());
}
public void copyToJvmInfo() {
SystemInfo si = new SystemInfo();
HardwareAbstractionLayer hal = si.getHardware();
setJvmInfo();
}
public void copyToSysFilesInfo() {
@ -162,6 +160,8 @@ public class SystemHardwareInfo implements Serializable {
jvm.setFree(Runtime.getRuntime().freeMemory());
jvm.setVersion(props.getProperty("java.version"));
jvm.setHome(props.getProperty("java.home"));
jvm.setVendor(props.getProperty("java.vendor"));
jvm.setVendorUrl(props.getProperty("java.vendor.url"));
}
/**

@ -8,6 +8,8 @@ import cn.hutool.core.util.NumberUtil;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
/**
*
*
@ -74,5 +76,4 @@ public class CPU implements Serializable {
return NumberUtil.round(NumberUtil.mul(free / total, 100), 2).doubleValue();
}
}

@ -67,10 +67,16 @@ public class JVM implements Serializable {
*/
private String runTime;
/** Java的运行环境供应商 */
private String vendor;
/**
* JAVA
* Java URL
*/
private String name;
private String vendorUrl;
// =============================
public double getTotal() {
return NumberUtil.div(total, (1024 * 1024), 2);
@ -100,8 +106,24 @@ public class JVM implements Serializable {
return NumberUtil.mul(NumberUtil.div(total - free, total, 4), 100);
}
public String getVendor() {
return vendor;
}
public void setVendor(String vendor) {
this.vendor = vendor;
}
public String getVendorUrl() {
return vendorUrl;
}
public void setVendorUrl(String vendorUrl) {
this.vendorUrl = vendorUrl;
}
/**
* JDK
* JVM
*/
public String getName() {
return ManagementFactory.getRuntimeMXBean().getVmName();

@ -34,7 +34,7 @@ public class MonitorController {
*
* @return ResultVo
*/
@RequiresPermissions("system_monitor_select")
@RequiresPermissions("devops_sysmonitor_select")
@RequestMapping("/getSystemInfo")
@ApiOperation(value = "当前服务器信息", notes = "当前服务器信息")
public ResultVo<?> getSystemInfo() {
@ -56,7 +56,7 @@ public class MonitorController {
* CPU
* @return ResultVo
*/
@RequiresPermissions("system_monitor_select")
@RequiresPermissions("devops_sysmonitor_select")
@RequestMapping("/getCpuInfo")
@ApiOperation(value = "当前CPU信息", notes = "当前CPU信息")
public ResultVo<?> getCpuInfo() {
@ -68,7 +68,7 @@ public class MonitorController {
*
* @return ResultVo
*/
@RequiresPermissions("system_monitor_select")
@RequiresPermissions("devops_sysmonitor_select")
@RequestMapping("/getMemInfo")
@ApiOperation(value = "当前内存信息", notes = "当前内存信息")
public ResultVo<?> getMemInfo() {
@ -80,7 +80,7 @@ public class MonitorController {
* JVM
* @return ResultVo
*/
@RequiresPermissions("system_monitor_select")
@RequiresPermissions("devops_sysmonitor_select")
@RequestMapping("/getJVMInfo")
@ApiOperation(value = "当前JVM信息", notes = "当前JVM信息")
public ResultVo<?> getJVMInfo() {

Loading…
Cancel
Save