fix: NEZ-2142 修改接口响应格式,保持与接口文档一致
This commit is contained in:
@@ -7,6 +7,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.net.UnknownHostException;
|
import java.net.UnknownHostException;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -25,6 +26,8 @@ public class OSHIController extends BaseController{
|
|||||||
public R getProcessInfo(HttpServletRequest request) throws InterruptedException {
|
public R getProcessInfo(HttpServletRequest request) throws InterruptedException {
|
||||||
|
|
||||||
List<Map> result = OSHIUtils.getProcessInfo();
|
List<Map> result = OSHIUtils.getProcessInfo();
|
||||||
|
HashMap<Object, Object> data = Tool.MapUtil.newHashMap();
|
||||||
|
data.put("list" ,result);
|
||||||
|
|
||||||
return R.ok(result);
|
return R.ok(result);
|
||||||
}
|
}
|
||||||
@@ -32,6 +35,8 @@ public class OSHIController extends BaseController{
|
|||||||
@GetMapping("/oshi/netstat")
|
@GetMapping("/oshi/netstat")
|
||||||
public R getNetstatInfo(HttpServletRequest request) throws UnknownHostException {
|
public R getNetstatInfo(HttpServletRequest request) throws UnknownHostException {
|
||||||
List<Map> result = OSHIUtils.getNetInfo();
|
List<Map> result = OSHIUtils.getNetInfo();
|
||||||
|
HashMap<Object, Object> data = Tool.MapUtil.newHashMap();
|
||||||
|
data.put("list" ,result);
|
||||||
|
|
||||||
return R.ok(result);
|
return R.ok(result);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user