| | |
| | | @ServletComponentScan("com.wgcloud.filter") |
| | | @ComponentScan(basePackages = "com.wgcloud") |
| | | @EnableCaching |
| | | @EnableScheduling |
| | | //@EnableScheduling |
| | | public class WgcloudServiceApplication { |
| | | public static void main(String[] args) { |
| | | SpringApplication.run(WgcloudServiceApplication.class, args); |
| | |
| | | import com.wgcloud.util.R; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("date",sdf.format(ospfInfo.getCreateTime())); |
| | | map.put("name",ospfInfo.getInfoContent()); |
| | | map.put("id",ospfInfo.getId()); |
| | | map.put("ipaddress",ospfInfo.getHostname()); |
| | | map.put("status",ospfInfo.getState()); |
| | | list.add(map); |
| | |
| | | return R.ok(list); |
| | | } |
| | | |
| | | @GetMapping("/handle") |
| | | public R handle(String id) throws Exception { |
| | | OspfErrorLog ospfErrorLog = ospfErrorLogService.selectById(id); |
| | | if(ospfErrorLog.getState().equals("1")){ |
| | | ospfErrorLog.setState("0"); |
| | | ospfErrorLogService.updateById(ospfErrorLog); |
| | | return R.ok(); |
| | | }else { |
| | | return R.ok(); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | "/systemInfoOpen/", "/systemInfo/agentList", "/agentLogGo/minTask", "/agentGo/minTask", "/agentDiskGo/minTask", "/dceInfo/agentList", |
| | | "/login/toLogin", "/login/login", "/appInfo/agentList", "/dockerInfo/agentList", "/portInfo/agentList", "/license/", |
| | | "/static/", "/resources/", "/log/agentList", "/customInfo/agentList", "/agentCustomGo/minTask", "/dbInfo/agentList", "/agentDbTableGo/minTask", |
| | | "/agentHeathMonitorGo/minTask", "/agentDceInfoGo/minTask", "/agentSnmpInfoGo/minTask", "/snmpInfo/agentList","/api/","/dp/getTop","/dp/getWb","/dp/getError","/dp/getCount","/dp/getInfo"}; |
| | | "/agentHeathMonitorGo/minTask", "/agentDceInfoGo/minTask", "/agentSnmpInfoGo/minTask", "/snmpInfo/agentList","/api/","/dp/getTop","/dp/getWb","/dp/getError","/dp/getCount","/dp/getInfo","/dp/handle"}; |
| | | |
| | | |
| | | //公众看板URL |
| | |
| | | name: wgcloud-server |
| | | datasource: |
| | | driver-class-name: com.mysql.jdbc.Driver |
| | | url: jdbc:mysql://120.1.33.103:10001/wgcloud?characterEncoding=utf-8&characterSetResults=utf8&autoReconnect=true&useSSL=false&allowMultiQueries=true&allowPublicKeyRetrieval=true |
| | | url: jdbc:mysql://127.0.0.1:3306/wgcloud?characterEncoding=utf-8&characterSetResults=utf8&autoReconnect=true&useSSL=false&allowMultiQueries=true&allowPublicKeyRetrieval=true |
| | | username: root |
| | | password: rootroot |
| | | # hikari连接池的参数 相关设置 |