Package com.dianping.cat.report.page.web.graph

Examples of com.dianping.cat.report.page.web.graph.WebReportConvertor


      MetricReport report = getReportFromCache(product, time);
      String city = properties.get("city");
      String channel = properties.get("channel");
      String type = properties.get("type");

      WebReportConvertor convert = new WebReportConvertor(type, city, channel);

      convert.visitMetricReport(report);
      return convert.getReport();
    }
  }
View Full Code Here


  public MetricReport hackForTest(MetricReport report, Map<String, String> properties) {
    String city = properties.get("city");
    String channel = properties.get("channel");
    String type = properties.get("type");
    WebReportConvertor convert = new WebReportConvertor(type, city, channel);

    convert.visitMetricReport(report);
    return convert.getReport();
  }
View Full Code Here

        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();
View Full Code Here

TOP

Related Classes of com.dianping.cat.report.page.web.graph.WebReportConvertor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.