/**
   * html page for tracking one queue or job use d3.js
   *
   * @param request http request
   * @param response http response
   * @throws java.io.IOException
   */
  private void printPageTrack(
      HttpServletRequest request, HttpServletResponse response, int timeunit, String timeunitLabel)
      throws IOException {
    response.setContentType("text/html");
    response.setStatus(HttpServletResponse.SC_OK);

    // tracked queues {0}
    StringBuilder trackedQueueInfo = new StringBuilder();
    Set<String> trackedQueues = wrapper.getQueueSet();
    for (String queue : trackedQueues) {
      trackedQueueInfo
          .append("<option value='Queue ")
          .append(queue)
          .append("'>")
          .append(queue)
          .append("</option>");
    }

    // tracked apps {1}
    StringBuilder trackedAppInfo = new StringBuilder();
    Set<String> trackedApps = wrapper.getTrackedAppSet();
    for (String job : trackedApps) {
      trackedAppInfo
          .append("<option value='Job ")
          .append(job)
          .append("'>")
          .append(job)
          .append("</option>");
    }

    // timeunit label {2}
    // time unit {3}
    // ajax update time {4}
    // final html
    String trackInfo =
        MessageFormat.format(
            trackTemplate,
            trackedQueueInfo.toString(),
            trackedAppInfo.toString(),
            timeunitLabel,
            "" + timeunit,
            "" + ajaxUpdateTimeMS);
    response.getWriter().println(trackInfo);

    ((Request) request).setHandled(true);
  }