|
@@ -17,7 +17,6 @@ import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
-import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
@@ -47,14 +46,16 @@ public class HomePageCtrl {
|
|
* 首页 -- 系统监控 -- 数据概览
|
|
* 首页 -- 系统监控 -- 数据概览
|
|
*/
|
|
*/
|
|
@PostMapping("/queryAllNum")
|
|
@PostMapping("/queryAllNum")
|
|
- @ResponseBody
|
|
|
|
- public ResponseBodyVO<Map<String, Integer>> queryAllNum() {
|
|
|
|
- Map<String, Integer> map = algorithmService.selectDetailsBySy(); //算法文件数量
|
|
|
|
- map.put("SySceneNum", sceneNaturalService.querySceneNumBySy());//私有场景数量
|
|
|
|
- map.put("GySceneNum", sceneNaturalService.querySceneNumByGy());//共有场景数量
|
|
|
|
- map.put("ConfigTotal", configService.getConfigTotal()); //车辆配置数量
|
|
|
|
- map.put("maxConcurrency", clusterService.getLicenseNum()); //最大并发数量
|
|
|
|
- map.put("currentConcurrency", homePageService.getRunningTask()); //当前并发数量
|
|
|
|
|
|
+ public ResponseBodyVO<Map<String, String>> queryAllNum() {
|
|
|
|
+ Map<String, String> map = algorithmService.selectDetailsBySy(); //算法文件数量
|
|
|
|
+ map.put("SySceneNum", sceneNaturalService.querySceneNumBySy() + "");//私有场景数量
|
|
|
|
+ map.put("GySceneNum", sceneNaturalService.querySceneNumByGy() + "");//共有场景数量
|
|
|
|
+ map.put("ConfigTotal", configService.getConfigTotal() + ""); //车辆配置数量
|
|
|
|
+ final int licenseNum = clusterService.getLicenseNum();
|
|
|
|
+ if (licenseNum == -1) {
|
|
|
|
+ map.put("maxConcurrency", "无限"); //最大并发数量
|
|
|
|
+ }
|
|
|
|
+ map.put("currentConcurrency", homePageService.getRunningTask() + ""); //当前并发数量
|
|
return new ResponseBodyVO<>(ResponseBodyVO.Response.SUCCESS, map);
|
|
return new ResponseBodyVO<>(ResponseBodyVO.Response.SUCCESS, map);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -62,7 +63,6 @@ public class HomePageCtrl {
|
|
* 近一周运行运行项目数量
|
|
* 近一周运行运行项目数量
|
|
*/
|
|
*/
|
|
@RequestMapping("selectRunProjectBySy")
|
|
@RequestMapping("selectRunProjectBySy")
|
|
- @ResponseBody
|
|
|
|
public ResponseBodyVO<List<LineChartVO>> selectRunProjectBySy() {
|
|
public ResponseBodyVO<List<LineChartVO>> selectRunProjectBySy() {
|
|
List<LineChartVO> list = homePageService.selectRunProjectChart();
|
|
List<LineChartVO> list = homePageService.selectRunProjectChart();
|
|
return new ResponseBodyVO<>(ResponseBodyVO.Response.SUCCESS, list);
|
|
return new ResponseBodyVO<>(ResponseBodyVO.Response.SUCCESS, list);
|
|
@@ -72,7 +72,6 @@ public class HomePageCtrl {
|
|
* 近一周运行任务数量
|
|
* 近一周运行任务数量
|
|
*/
|
|
*/
|
|
@RequestMapping("selectRunTaskBySy")
|
|
@RequestMapping("selectRunTaskBySy")
|
|
- @ResponseBody
|
|
|
|
public ResponseBodyVO<List<LineChartVO>> selectRunTaskBySy() {
|
|
public ResponseBodyVO<List<LineChartVO>> selectRunTaskBySy() {
|
|
List<LineChartVO> list = homePageService.selectRunTaskChart();
|
|
List<LineChartVO> list = homePageService.selectRunTaskChart();
|
|
return new ResponseBodyVO<>(ResponseBodyVO.Response.SUCCESS, list);
|
|
return new ResponseBodyVO<>(ResponseBodyVO.Response.SUCCESS, list);
|
|
@@ -83,7 +82,6 @@ public class HomePageCtrl {
|
|
* 项目运行状态统计-饼图
|
|
* 项目运行状态统计-饼图
|
|
*/
|
|
*/
|
|
@RequestMapping("selectRunProjectByState")
|
|
@RequestMapping("selectRunProjectByState")
|
|
- @ResponseBody
|
|
|
|
public ResponseBodyVO selectRunProjectByState() {
|
|
public ResponseBodyVO selectRunProjectByState() {
|
|
return simulationProjectService.selectRunProjectByState();
|
|
return simulationProjectService.selectRunProjectByState();
|
|
}
|
|
}
|
|
@@ -92,7 +90,6 @@ public class HomePageCtrl {
|
|
* 任务运行状态统计-饼图
|
|
* 任务运行状态统计-饼图
|
|
*/
|
|
*/
|
|
@RequestMapping("selectRunTaskByState")
|
|
@RequestMapping("selectRunTaskByState")
|
|
- @ResponseBody
|
|
|
|
public ResponseBodyVO selectRunTaskByState() {
|
|
public ResponseBodyVO selectRunTaskByState() {
|
|
return simulationProjectService.selectRunTaskByState();
|
|
return simulationProjectService.selectRunTaskByState();
|
|
}
|
|
}
|
|
@@ -102,7 +99,6 @@ public class HomePageCtrl {
|
|
* 评测等级分布-饼图
|
|
* 评测等级分布-饼图
|
|
*/
|
|
*/
|
|
@RequestMapping("selectEvaluationLevel")
|
|
@RequestMapping("selectEvaluationLevel")
|
|
- @ResponseBody
|
|
|
|
public ResponseBodyVO selectEvaluationLevel() {
|
|
public ResponseBodyVO selectEvaluationLevel() {
|
|
return simulationProjectService.selectEvaluationLevel();
|
|
return simulationProjectService.selectEvaluationLevel();
|
|
}
|
|
}
|
|
@@ -112,7 +108,6 @@ public class HomePageCtrl {
|
|
* 硬件监控
|
|
* 硬件监控
|
|
*/
|
|
*/
|
|
@RequestMapping("selectHardware")
|
|
@RequestMapping("selectHardware")
|
|
- @ResponseBody
|
|
|
|
@PreAuthorize("@AuthorityCheck.admin()")
|
|
@PreAuthorize("@AuthorityCheck.admin()")
|
|
public ResponseBodyVO<HardwareVO> selectHardware() {
|
|
public ResponseBodyVO<HardwareVO> selectHardware() {
|
|
return homePageService.selectHardware();
|
|
return homePageService.selectHardware();
|
|
@@ -122,7 +117,6 @@ public class HomePageCtrl {
|
|
* 服务监控
|
|
* 服务监控
|
|
*/
|
|
*/
|
|
@RequestMapping("selectService")
|
|
@RequestMapping("selectService")
|
|
- @ResponseBody
|
|
|
|
@PreAuthorize("@AuthorityCheck.admin()")
|
|
@PreAuthorize("@AuthorityCheck.admin()")
|
|
public ResponseBodyVO<ServiceVO> selectService() {
|
|
public ResponseBodyVO<ServiceVO> selectService() {
|
|
return homePageService.selectService();
|
|
return homePageService.selectService();
|
|
@@ -132,7 +126,6 @@ public class HomePageCtrl {
|
|
* 日访问人数
|
|
* 日访问人数
|
|
*/
|
|
*/
|
|
@RequestMapping("selectAccess")
|
|
@RequestMapping("selectAccess")
|
|
- @ResponseBody
|
|
|
|
@PreAuthorize("@AuthorityCheck.admin()")
|
|
@PreAuthorize("@AuthorityCheck.admin()")
|
|
public ResponseBodyVO<List<LineChartVO>> selectAccess() {
|
|
public ResponseBodyVO<List<LineChartVO>> selectAccess() {
|
|
List<LineChartVO> list = homePageService.selectAccess();
|
|
List<LineChartVO> list = homePageService.selectAccess();
|
|
@@ -144,7 +137,6 @@ public class HomePageCtrl {
|
|
* 服务器监控
|
|
* 服务器监控
|
|
*/
|
|
*/
|
|
@RequestMapping("selectServer")
|
|
@RequestMapping("selectServer")
|
|
- @ResponseBody
|
|
|
|
@PreAuthorize("@AuthorityCheck.admin()")
|
|
@PreAuthorize("@AuthorityCheck.admin()")
|
|
public ResponseBodyVO<PageInfo<SystemServerVO>> selectServer(PageVO pageVO) {
|
|
public ResponseBodyVO<PageInfo<SystemServerVO>> selectServer(PageVO pageVO) {
|
|
return homePageService.selectServer(pageVO);
|
|
return homePageService.selectServer(pageVO);
|