String type = payload.getType();
if (Constants.METRIC_USER_MONITOR.equals(metricType)) {
String city = payload.getCity();
String channel = payload.getChannel();
WebReportConvertor convert = new WebReportConvertor(type, city, channel);
MetricReport metricReport = (MetricReport) response.getModel();
convert.visitMetricReport(metricReport);
((ModelResponse<MetricReport>) response).setModel(convert.getReport());
} else if (Constants.METRIC_SYSTEM_MONITOR.equals(metricType)) {
String ipAddrsStr = payload.getIpAddress();
Set<String> ipAddrs = null;
if (!Constants.ALL.equalsIgnoreCase(ipAddrsStr)) {
String[] ipAddrsArray = ipAddrsStr.split("_");
ipAddrs = new HashSet<String>(Arrays.asList(ipAddrsArray));
}
SystemReportConvertor convert = new SystemReportConvertor(type, ipAddrs);
MetricReport metricReport = (MetricReport) response.getModel();
convert.visitMetricReport(metricReport);
((ModelResponse<MetricReport>) response).setModel(convert.getReport());
} else if (Constants.METRIC_CDN.equals(metricType)) {
String cdn = payload.getCdn();
String province = payload.getProvince();
String city = payload.getCity();
MetricReport metricReport = (MetricReport) response.getModel();