|
@@ -239,6 +239,78 @@ public class BizModelController extends BaseController {
|
|
return AjaxResult.success(list);
|
|
return AjaxResult.success(list);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @ApiOperation("一健巡检--查看报告")
|
|
|
|
+ @GetMapping("/check/history/")
|
|
|
|
+ public AjaxResult checkHistory() {
|
|
|
|
+ List<Map<String, Object>> list = new ArrayList<>();
|
|
|
|
+ for (int i = 0; i < 10; i++) {
|
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
|
+ String time = "2024-09-08 " + (21 - i) + ":00:00";
|
|
|
|
+ map.put("id", (i + 1));
|
|
|
|
+ map.put("time", time);
|
|
|
|
+ list.add(map);
|
|
|
|
+ }
|
|
|
|
+ return AjaxResult.success(list);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation("一健巡检--查看报告模型明细")
|
|
|
|
+ @GetMapping("/check/model/{id}")
|
|
|
|
+ public AjaxResult checkDetail(@PathVariable("id") Long id) {
|
|
|
|
+ List<Map<String, Object>> list = new ArrayList<>();
|
|
|
|
+ String[] names = {"市场服务", "市场出清", "信息发布", "市场合规", "市场结算"};
|
|
|
|
+ int[] times = {25, 35, 45, 38, 25};
|
|
|
|
+ for (int i = 0; i < names.length; i++) {
|
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
|
+ map.put("id", (i + 1));
|
|
|
|
+ map.put("modelName", names[i]);
|
|
|
|
+ map.put("total", times[i]);
|
|
|
|
+ map.put("num", new Random().nextInt(times[i]));
|
|
|
|
+ list.add(map);
|
|
|
|
+ }
|
|
|
|
+ return AjaxResult.success(list);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation("一健巡检--查看报告分类明细")
|
|
|
|
+ @GetMapping("/check/proj/{id}")
|
|
|
|
+ public AjaxResult checkProj(@PathVariable("id") Long id) {
|
|
|
|
+ List<Map<String, Object>> list = new ArrayList<>();
|
|
|
|
+ String[] names = {"JAVA应用", "数据库", "运行环境", "基础支撑", "中间件"};
|
|
|
|
+ String[] options = {"服务网关、系统服务、权限服务、业务服务、定时器服务", "mysql主服务器、mysql从服务器", "ECS-1、ECS-cluster-2、ECS-node-3", "容器服务1、容器服务2、node-1、node-2", "ES搜索服务、文件服务、其他"};
|
|
|
|
+ int[] times = {25, 35, 45, 38, 25};
|
|
|
|
+ for (int i = 0; i < names.length; i++) {
|
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
|
+ map.put("id", (i + 1));
|
|
|
|
+ map.put("class", names[i]);
|
|
|
|
+ map.put("option", options[i]);
|
|
|
|
+ map.put("total", times[i]);
|
|
|
|
+ map.put("num", new Random().nextInt(times[i]));
|
|
|
|
+ list.add(map);
|
|
|
|
+ }
|
|
|
|
+ return AjaxResult.success(list);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation("一健巡检--查看报告指标明细")
|
|
|
|
+ @GetMapping("/check/metrics/{id}")
|
|
|
|
+ public AjaxResult checkMetrics(@PathVariable("id") Long id) {
|
|
|
|
+ List<Map<String, Object>> list = new ArrayList<>();
|
|
|
|
+ String[] names = {"CPU使用率", "内存使用率", "磁盘使用率", "mysql连接数", "mysql慢查询数量"};
|
|
|
|
+ String[] remarks = {"超过80%,且持续1小时", "超过60,且持续1小时", "超过90%", "超过200,且持续1小时", "当前值超过5"};
|
|
|
|
+ int[] times = {25, 35, 45, 38, 25};
|
|
|
|
+ for (int i = 0; i < names.length; i++) {
|
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
|
+ map.put("name", names[i]);
|
|
|
|
+ map.put("remark", remarks[i]);
|
|
|
|
+ map.put("value", times[i]);
|
|
|
|
+ if (i % 2 == 0) {
|
|
|
|
+ map.put("status", "正常");
|
|
|
|
+ } else {
|
|
|
|
+ map.put("status", "异常");
|
|
|
|
+ }
|
|
|
|
+ list.add(map);
|
|
|
|
+ }
|
|
|
|
+ return AjaxResult.success(list);
|
|
|
|
+ }
|
|
|
|
+
|
|
@ApiOperation("一健巡检--按模型ID巡检")
|
|
@ApiOperation("一健巡检--按模型ID巡检")
|
|
@GetMapping("/check/{modelId}")
|
|
@GetMapping("/check/{modelId}")
|
|
public AjaxResult checkModel(@PathVariable("modelId") Long modelId) {
|
|
public AjaxResult checkModel(@PathVariable("modelId") Long modelId) {
|