CompareIpsCtrl.java
1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package com.ui.ctrl;
import com.ui.http.HttpRestClient;
import com.ui.model.BaseResponse;
import com.ui.model.req.CompareReq;
import com.ui.model.req.NginxSyncTask;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
/**
* Created by yoho on 2016/8/23.
*/
@RestController
@RequestMapping(value = "/compareIps")
public class CompareIpsCtrl {
@Autowired
HttpRestClient httpRestClient;
@RequestMapping("/toCompareIps")
public ModelAndView toCompareIpsView() {
return new ModelAndView("compare/compareIps");
}
/**
* 在线ip配置对比--新(一次性对比所有的)
* @return
*/
@RequestMapping("/toCompareIpsNew")
public ModelAndView toCompareIpsNewView() {
return new ModelAndView("compare/compareIpsNew");
}
@RequestMapping("/compare")
public BaseResponse pushTask(CompareReq req)
{
BaseResponse response = httpRestClient.defaultPost("/compareIps/compare", req, BaseResponse.class);
return response;
}
/**
* 在线ip对比--一键比对所有的服务
* @param cloud
* @return
*/
@RequestMapping("/compareAll")
public BaseResponse compareAll( String cloud)
{
BaseResponse response = httpRestClient.defaultPost("/compareIps/compareAll", cloud, BaseResponse.class);
return response;
}
}