private void showJobsNotAdmitted(
      PrintWriter out, Set<String> userFilterSet, Set<String> poolFilterSet) {
    out.print("<h2>Not Admitted Jobs</h2>\n");
    out.print("<b>Filter</b> " +
        "<input type=\"text\" onkeyup=\"filterTables(this.value)\" " +
        "id=\"NotAdmittedJobsTableFilter\">" +
        "<input type=\"checkbox\" id=\"SubmittedTimeFilterToggle\" " +
        "onChange=\"filterTables(inputRJF.value)\" checked>Submitted Time " +
        "<input type=\"checkbox\" id=\"JobIDFilterToggle\" " +
        "onChange=\"filterTables(inputRJF.value)\" checked>JobID " +
        "<input type=\"checkbox\" id=\"UserFilterToggle\" " +
        "onChange=\"filterTables(inputRJF.value)\" checked>User " +
        "<input type=\"checkbox\" id=\"PoolFilterToggle\" " +
        "onChange=\"filterTables(inputRJF.value)\" checked>Pool " +
        "<input type=\"checkbox\" id=\"PrioFilterToggle\" " +
        "onChange=\"filterTables(inputRJF.value)\" checked>Priority" +
        "<br><br>\n");
    out.print("<script type=\"text/javascript\">var inputRJF = " +
        "document.getElementById('NotAdmittedJobsTableFilter');</script>");
    out.print("<table border=\"2\" cellpadding=\"5\" cellspacing=\"2\" " +
        "id=\"NotAdmittedJobsTable\" class=\"tablesorter\">\n");
    out.printf("<thead><tr>" +
        "<th>Submitted Time</th>" +
        "<th>JobID</th>" +
        "<th>User</th>" +
        "<th>Pool</th>" +
        "<th>Priority</th>" +
        "<th>Reason</th>" +
        "<th>Job Position</th>" +
        "<th>ETA to Admission (secs)</th>");
    out.print("</tr></thead><tbody>\n");
    Collection<NotAdmittedJobInfo> notAdmittedJobInfos =
        scheduler.getNotAdmittedJobs();
    for (NotAdmittedJobInfo jobInfo : notAdmittedJobInfos) {
      if ((userFilterSet != null) &&
          !userFilterSet.contains(jobInfo.getUser())) {
          continue;
      }
      if ((poolFilterSet != null) &&
          !poolFilterSet.contains(jobInfo.getPool())) {
        continue;
      }

      out.printf("<tr id=\"%s\">\n", jobInfo.getJobName());
      out.printf("<td>%s</td>\n", DATE_FORMAT.format(jobInfo.getStartDate()));
      out.printf("<td><a href=\"jobdetails.jsp?jobid=%s\">%s</a></td>",
          jobInfo.getJobName(), jobInfo.getJobName());
      out.printf("<td>%s</td>\n", jobInfo.getUser());
      out.printf("<td>%s</td>\n", jobInfo.getPool());
      out.printf("<td>%s</td>\n", jobInfo.getPriority());
      out.printf("<td>%s</td>\n", jobInfo.getReason());
      out.printf("<td>%d</td>\n", jobInfo.getHardAdmissionPosition());
      out.printf("<td>%d</td>\n",
          jobInfo.getEstimatedHardAdmissionEntranceSecs());
      out.print("</tr>\n");
    }
    out.print("</tbody></table>\n");
  }
private void showJobsNotAdmitted ( PrintWriter out , Set < String > userFilterSet , Set < String > poolFilterSet ) { out . print ( "<h2>Not Admitted Jobs</h2>\n" ) ; out . print ( "<b>Filter</b> " + "<input type=\"text\" onkeyup=\"filterTables(this.value)\" " + "id=\"NotAdmittedJobsTableFilter\">" + "<input type=\"checkbox\" id=\"SubmittedTimeFilterToggle\" " + "onChange=\"filterTables(inputRJF.value)\" checked>Submitted Time " + "<input type=\"checkbox\" id=\"JobIDFilterToggle\" " + "onChange=\"filterTables(inputRJF.value)\" checked>JobID " + "<input type=\"checkbox\" id=\"UserFilterToggle\" " + "onChange=\"filterTables(inputRJF.value)\" checked>User " + "<input type=\"checkbox\" id=\"PoolFilterToggle\" " + "onChange=\"filterTables(inputRJF.value)\" checked>Pool " + "<input type=\"checkbox\" id=\"PrioFilterToggle\" " + "onChange=\"filterTables(inputRJF.value)\" checked>Priority" + "<br><br>\n" ) ; out . print ( "<script type=\"text/javascript\">var inputRJF = " + "document.getElementById('NotAdmittedJobsTableFilter');</script>" ) ; out . print ( "<table border=\"2\" cellpadding=\"5\" cellspacing=\"2\" " + "id=\"NotAdmittedJobsTable\" class=\"tablesorter\">\n" ) ; out . printf ( "<thead><tr>" + "<th>Submitted Time</th>" + "<th>JobID</th>" + "<th>User</th>" + "<th>Pool</th>" + "<th>Priority</th>" + "<th>Reason</th>" + "<th>Job Position</th>" + "<th>ETA to Admission (secs)</th>" ) ; out . print ( "</tr></thead><tbody>\n" ) ; Collection < NotAdmittedJobInfo > notAdmittedJobInfos = scheduler . getNotAdmittedJobs ( ) ; for ( NotAdmittedJobInfo jobInfo : notAdmittedJobInfos ) { if ( ( userFilterSet != null ) && ! userFilterSet . contains ( jobInfo . getUser ( ) ) ) { continue ; } if ( ( poolFilterSet != null ) && ! poolFilterSet . contains ( jobInfo . getPool ( ) ) ) { continue ; } out . printf ( "<tr id=\"%s\">\n" , jobInfo . getJobName ( ) ) ; out . printf ( "<td>%s</td>\n" , DATE_FORMAT . format ( jobInfo . getStartDate ( ) ) ) ; out . printf ( "<td><a href=\"jobdetails.jsp?jobid=%s\">%s</a></td>" , jobInfo . getJobName ( ) , jobInfo . getJobName ( ) ) ; out . printf ( "<td>%s</td>\n" , jobInfo . getUser ( ) ) ; out . printf ( "<td>%s</td>\n" , jobInfo . getPool ( ) ) ; out . printf ( "<td>%s</td>\n" , jobInfo . getPriority ( ) ) ; out . printf ( "<td>%s</td>\n" , jobInfo . getReason ( ) ) ; out . printf ( "<td>%d</td>\n" , jobInfo . getHardAdmissionPosition ( ) ) ; out . printf ( "<td>%d</td>\n" , jobInfo . getEstimatedHardAdmissionEntranceSecs ( ) ) ; out . print ( "</tr>\n" ) ; } out . print ( "</tbody></table>\n" ) ; }
Print a view of not admitted jobs to the given output writer.
@param out Where to dump the oiutput
@param userFilterSet Only show jobs from these users if not null
@param poolFilterSet Only show jobs from these pools if not null