Examples of HtmlPrinter


Examples of hudson.plugins.analysis.util.HtmlPrinter

     * @param modules
     *            number of modules
     * @return the summary message
     */
    protected static String createDefaultSummary(final String url, final int warnings, final int modules) {
        HtmlPrinter summary = new HtmlPrinter();

        String message = createWarningsMessage(warnings);
        if (warnings > 0) {
            summary.append(summary.link(url, message));
        }
        else {
            summary.append(message);
        }
        if (modules > 0) {
            summary.append(" ");
            summary.append(createAnalysesMessage(modules));
        }
        else {
            summary.append(".");
        }
        return summary.toString();
    }
View Full Code Here

Examples of hudson.plugins.analysis.util.HtmlPrinter

     * @param fixedWarnings
     *            number of fixed warnings
     * @return the summary message
     */
    protected static String createDefaultDeltaMessage(final String url, final int newWarnings, final int fixedWarnings) {
        HtmlPrinter summary = new HtmlPrinter();
        if (newWarnings > 0) {
            summary.append(summary.item(
                    summary.link(url + "/new", createNewWarningsLinkName(newWarnings))));
        }
        if (fixedWarnings > 0) {
            summary.append(summary.item(
                    summary.link(url + "/fixed", createFixedWarningsLinkName(fixedWarnings))));
        }

        return summary.toString();
    }
View Full Code Here

Examples of hudson.plugins.analysis.util.HtmlPrinter

     * Returns the detail messages for the summary.jelly file.
     *
     * @return the summary message
     */
    public String getDetails() {
        HtmlPrinter printer = new HtmlPrinter();
        printer.append(createDeltaMessage());

        if (getNumberOfAnnotations() == 0 && getDelta() == 0) {
            printer.append(printer.item(Messages.ResultAction_NoWarningsSince(getZeroWarningsSinceBuild())));
            printer.append(printer.item(createHighScoreMessage()));
        }
        else if (isSuccessfulTouched()) {
            printer.append(printer.item(createPluginResultMessage()));
            if (isSuccessful()) {
                printer.append(printer.item(createSuccessfulHighScoreMessage()));
            }
        }
        return printer.toString();
    }
View Full Code Here

Examples of hudson.plugins.analysis.util.HtmlPrinter

    private String createPluginResultMessage() {
        return Messages.ResultAction_Status() + getResultIcon() + " - " + getReason() + getReferenceBuildUrl();
    }

    private String getReferenceBuildUrl() {
        HtmlPrinter printer = new HtmlPrinter();
        if (hasReferenceBuild()) {
            AbstractBuild<?, ?> build = getReferenceBuild();

            printer.append("&nbsp;");
            printer.append("(");
            printer.append(Messages.ReferenceBuild());
            printer.append(": ");
            printer.append(printer.link(Hudson.getInstance().getRootUrl() + "/" + build.getUrl(),
                    build.getDisplayName()));
            printer.append(")");
        }
        return printer.toString();
    }
View Full Code Here

Examples of hudson.plugins.analysis.util.HtmlPrinter

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

Examples of org.cipango.console.printer.generic.HtmlPrinter

        if (index != -1)
          property.setName(name.substring(0, index));
      }
      add(new PropertiesPrinter(propertyList));
     
      add(new HtmlPrinter()
      {
       
        public void print(Writer out) throws Exception
        {
          Boolean on = (Boolean) _mbsc.getAttribute(objectName, "statsOn");
View Full Code Here

Examples of org.cipango.console.printer.generic.HtmlPrinter

      if (MenuPrinter.STATISTICS_DIAMETER.isEnabled(connection))
        addPrinter(new DiameterStatisticsPrinter(connection), "Diameter statistics");
     
      addPrinter(new HttpStatisticsPrinter(connection), "HTTP statistics");
     
      add(new HtmlPrinter()
      {
        public void print(Writer out) throws Exception
        {
          appendTitle(out, "Server");
          out.append((String) connection.invoke(ConsoleFilter.SERVER, "dump", null, new String[0]));
        }
      });
     
      add(new HtmlPrinter()
      {
        @SuppressWarnings("unchecked")
        public void print(Writer out) throws Exception
        {
          appendTitle(out, "System properties");
View Full Code Here

Examples of org.cipango.console.printer.generic.HtmlPrinter

    }
  }
 
  public HtmlPrinter getSubMenu()
  {
    return new HtmlPrinter()
    {
     
      public void print(Writer out) throws Exception
      {
        out.write("<div id=\"submenu\">\n<ul>");
View Full Code Here

Examples of org.cipango.console.printer.generic.HtmlPrinter

    }
    catch (Throwable e)
    {
      _logger.warn("Unable to process request: {}", request.getRequestURL().toString(), e);
      _logger.debug("Unable to process request: " +  request.getRequestURL().toString(), e);
      HtmlPrinter printer = new ErrorPrinter(e.toString());
      response.setStatus(HttpServletResponse.SC_SERVICE_UNAVAILABLE);
      request.setAttribute(Attributes.CONTENT, printer);
    }
    finally
    {
View Full Code Here

Examples of org.jfree.layouting.modules.output.html.HtmlPrinter

      final ContentLocation data = RepositoryUtilities.createLocation
          (zipRepository, RepositoryUtilities.split(dataDirectory, "/"));
      final StreamingReportProcessor sp = new StreamingReportProcessor();

      final HtmlOutputProcessor outputProcessor = createOutputProcessor();
      final HtmlPrinter printer = outputProcessor.getPrinter();

      printer.setContentWriter(root, new DefaultNameGenerator(root, filename));
      printer.setDataWriter(data, new DefaultNameGenerator(data, "content"));
      printer.setEncoding(encoding);

      sp.setOutputProcessor(outputProcessor);
      sp.processReport(job);
    }
    catch(Exception e)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.