* @param project
* the job to get the warnings for
* @return the number of warnings, formatted as HTML string
*/
public String getDetails(final Job<?, ?> project) {
HtmlPrinter printer = new HtmlPrinter();
printer.append("<table>");
T action = getProjectAction(project);
if (action != null && action.hasValidResults()) {
BuildResult result = getResult(action);
if (result.isSuccessfulTouched()) {
printer.append(printer.line(Messages.ResultAction_Status() + result.getResultIcon()));
}
if (result.getNumberOfNewWarnings() > 0) {
print(printer, Messages.NewWarningsDetail_Name(), result.getNumberOfNewWarnings());
}
print(printer, Priority.HIGH, result.getNumberOfHighPriorityWarnings());
print(printer, Priority.NORMAL, result.getNumberOfNormalPriorityWarnings());
print(printer, Priority.LOW, result.getNumberOfLowPriorityWarnings());
}
else {
return Messages.Column_NoResults();
}
printer.append("</table>");
return printer.toString();
}