package com.wgcloud.controller;
|
|
import com.wgcloud.config.CommonConfig;
|
import com.wgcloud.util.RestUtil;
|
import com.wgcloud.util.msg.WarnPools;
|
import org.slf4j.Logger;
|
import org.slf4j.LoggerFactory;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Controller;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
/**
|
* @version v3.3
|
* @ClassName:WarnInfoController.java
|
* @author: http://www.wgstart.com
|
* @date: 2022年7月30日
|
* @Description: 页面提示告警声音处理
|
* @Copyright: 2019-2022 wgcloud. All rights reserved.
|
*/
|
@Controller
|
@RequestMapping("/warnInfo")
|
public class WarnInfoController {
|
|
|
private static final Logger logger = LoggerFactory.getLogger(WarnInfoController.class);
|
|
@Autowired
|
private RestUtil restUtil;
|
@Autowired
|
private CommonConfig commonConfig;
|
|
|
/**
|
* 查询告警计数器是否有数据,并清空计数器
|
*
|
* @param model
|
* @param request
|
* @return
|
*/
|
@ResponseBody
|
@RequestMapping(value = "warnCountAjax")
|
public String warnCountAjax() {
|
int count = WarnPools.WARN_COUNT_LIST.size();
|
WarnPools.WARN_COUNT_LIST.clear();
|
return count + "";
|
}
|
|
|
}
|