Authored by skinny.wu

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

@@ -113,4 +113,5 @@ public class HttpUriContants { @@ -113,4 +113,5 @@ public class HttpUriContants {
113 * dns monitor 113 * dns monitor
114 */ 114 */
115 public static final String DNS_MONITOR_CURRENT = "/other/dns_monitor/current"; 115 public static final String DNS_MONITOR_CURRENT = "/other/dns_monitor/current";
  116 + public static final String DNS_MONITOR_HISTORY = "/other/dns_monitor/history";
116 } 117 }
@@ -24,10 +24,27 @@ public class DNSMonitorCtrl { @@ -24,10 +24,27 @@ public class DNSMonitorCtrl {
24 return new ModelAndView("dnsmonitor/current"); 24 return new ModelAndView("dnsmonitor/current");
25 } 25 }
26 26
  27 + /**
  28 + * 查询当前的dns monitor数据
  29 + * @return
  30 + */
27 @RequestMapping("/current") 31 @RequestMapping("/current")
28 @ResponseBody 32 @ResponseBody
29 public String getCurrentInfo() { 33 public String getCurrentInfo() {
30 return httpRestClient.defaultGet( 34 return httpRestClient.defaultGet(
31 HttpUriContants.DNS_MONITOR_CURRENT, String.class, null); 35 HttpUriContants.DNS_MONITOR_CURRENT, String.class, null);
32 } 36 }
  37 +
  38 + /**
  39 + * 查询历史的dns monitor数据
  40 + * @return
  41 + */
  42 + @RequestMapping("/history")
  43 + @ResponseBody
  44 + public String getHistoryInfo(String host, String uid, String status, int page) {
  45 + return httpRestClient.defaultGet(
  46 + HttpUriContants.DNS_MONITOR_HISTORY + "?host=" + host + "&uid=" + uid
  47 + + "&status=" + status + "&page=" + page,
  48 + String.class, null);
  49 + }
33 } 50 }