Authored by skinny.wu

dns monitor模块 添加历史信息的查询

... ... @@ -113,4 +113,5 @@ public class HttpUriContants {
* dns monitor
*/
public static final String DNS_MONITOR_CURRENT = "/other/dns_monitor/current";
public static final String DNS_MONITOR_HISTORY = "/other/dns_monitor/history";
}
... ...
... ... @@ -24,10 +24,27 @@ public class DNSMonitorCtrl {
return new ModelAndView("dnsmonitor/current");
}
/**
* 查询当前的dns monitor数据
* @return
*/
@RequestMapping("/current")
@ResponseBody
public String getCurrentInfo() {
return httpRestClient.defaultGet(
HttpUriContants.DNS_MONITOR_CURRENT, String.class, null);
}
/**
* 查询历史的dns monitor数据
* @return
*/
@RequestMapping("/history")
@ResponseBody
public String getHistoryInfo(String host, String uid, String status, int page) {
return httpRestClient.defaultGet(
HttpUriContants.DNS_MONITOR_HISTORY + "?host=" + host + "&uid=" + uid
+ "&status=" + status + "&page=" + page,
String.class, null);
}
}
... ...