private String buildHtml() { HtmlCanvas html = new HtmlCanvas(); try { HtmlCanvas tmp = html .head() .title() .content("StreamPipes Connector Master Container") ._head() .body() .h1().write("Connector Master Container")._h1() .h2().write("All Running Adapters")._h2() .ol(); tmp = getAllRunningAdapters(tmp); html = tmp._ol() ._body(); } catch (IOException e) { logger.error("Error in SP Connect Master Container: ", e); } return html.toHtml(); }
private HtmlCanvas generateSampleProfileDocumentation(HtmlCanvas html) throws IOException { HtmlCanvas sampleProfile = new HtmlCanvas(); sampleProfile = generateSampleProfile(sampleProfile); html. div(class_("section")). h3(id("Sample_Profile")).write("Sample Profile")._h3(). p().em().write("Based on above properties, here is a sample profile to include in ").a(href("https://maven.apache.org/settings.html")).write("Maven settings.xml file")._a().write(":")._em()._p(). write(sampleProfile.toHtml(), false). write(sampleProfileCommandLineGenerator, false) ._div(); addPropertyInSessionRequest("sampleProfile", sampleProfile.toHtml()); return html; }
public String buildHtml() { HtmlCanvas html = new HtmlCanvas(); try { html .head() .meta(name("viewport").content("width=device-width, initial-scale=1")) .macros().javascript("https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js") .macros().stylesheet("https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css") .macros().javascript("https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js") .style().write("body {padding-top: 70px;}")._style() ._head() .body() .nav(class_("navbar navbar-inverse navbar-fixed-top").style("background:#0A3F54")) .div(class_("container")) .div(class_("navbar-header")) .a(class_("navbar-brand").style("color:white;")) .content("StreamPipes Pipeline Element Container") ._div() ._div() ._nav() .div(class_("container")); html.h4().write("This is a developer-oriented view. Navigate to 'Install Pipeline Elements' in the StreamPipes " + "UI to import the elements shown " + "here.")._h4(); html.h3(); html.write(description.getName()); html._h3(); html.h4().write("URI: ").a(href(description.getUri().toString())).content(description.getUri().toString())._h4();
public void generateReport(List<XmlSuite> xmlSuites, List<ISuite> suites, String outputDirectory) { try { for (ISuite suite : suites) { html = new HtmlCanvas(); html.html().head(); html.title().content(LdpTestSuite.NAME + " Report")._head() .body(); html.h1().content(LdpTestSuite.NAME + " Summary"); html.h2().content("Overall Coverage Bar Charts"); html.span(class_("chartStart")); html.label(class_("label")).b().write("Test Results by Specification Requirement")._b()._label(); html.div(class_("barChart").id("overallChart1"))._div(); // svg chart writePassFailLegend(); html._span(); html.span(class_("chartStart")); html.label(class_("label")).b().write("Test Results by Test Class")._b()._label(); html.div(class_("barChart").id("resourcesChart"))._div(); writeTestClassLegend(); html._span(); html.br(); generateOverallSummaryReport(suites, "summary"); displayGroupsInfo(suites); html.script().content(
html.h2().content("Summary of Test Methods"); html.table(class_("summary")); html.tr().th().content("Totals"); html.th().content("Coverage"); html.th().content("Not Implemented"); html._tr(); html.tr(); html.td(rowspan("2")).b().write("" + totalTests)._b().write(" Total Tests"); html.ul(); html.li(); writeColorBlock(statusColor, "approved"); html.b().write(approved + " ")._b().write("Approved"); html._li(); html.li(); writeColorBlock(statusColor, "pending"); html.b().write(pending + " ")._b().write("Pending"); html._li(); html.li(); writeColorBlock(statusColor, "extends"); html.b().write(extended + " ")._b().write("Extension"); html._li(); html.li(); writeColorBlock(statusColor, "deprecated"); html.b().write(deprecated + " ")._b().write("No longer valid");
private HtmlCanvas generateGlobalParametersSection(HtmlCanvas html) throws IOException { html. div(class_("section")). h3(id("Global_Parameters")).write("Global Parameters")._h3(). p().em().write("By default, only parameters which cannot be guessed are displayed. ")._em(). a(href("#").id("toggleGuessed")).write("Show other parameters")._a().write(" to customize default values.")._p(); if (changingCategory) { if (category != null) { html._tbody()._table()._div(); html.div(class_(clazz));//.p().write("TEST")._p()._div(); html.h4().write(globalParameter.category)._h4(); html.p().write(c.description)._p(); html.div(class_(clazz)); // todo : manage uncategorized with hasAtLeastOneNotGuessedProperty html.h4().write("Uncategorized")._h4(); html.table(border("0").class_("bodyTable table table-striped table-hover")). thead(). tr(class_("a")). th().write("Property")._th(). th().write("Type")._th(). th().write("Since")._th(). th().write("Description")._th(). _tr(). _thead(). tbody();
@Override public void renderOn(HtmlCanvas html) throws IOException { html .render(DocType.HTML5) .html(lang("en")) .render(new BootstrapHeaderView()) .body() .div(class_("container")) .div(class_("row")) .div(class_("col-lg-12")) .h3() .write("Script ") .small().content(String.format("%s -> %s", fSrc.getName(), fDst.getName())) ._h3() .pre().content(ActionsIoUtils.toText(src, this.script, mappings).toString()) ._div() ._div() ._div() .render(new BootstrapFooterView()) .macros().javascript("/dist/script.js") ._body() ._html(); }
@Override public void renderOn(HtmlCanvas html) throws IOException { html .render(DocType.HTML5) .html(lang("en")) .head() .meta(charset("utf8")) .meta(name("viewport").content("width=device-width, initial-scale=1.0")) .title().content("GumTree") .macros().javascript("/dist/jquery.min.js") .macros().javascript("/dist/codemirror.min.js") .macros().stylesheet("/dist/codemirror.css") .macros().javascript("/dist/mergely.min.js") .macros().javascript("/dist/mergely_shortcuts.js") .macros().stylesheet("/dist/mergely.css") .macros().stylesheet("/dist/mergely_custom.css") ._head() .body() .div(id("compare")) ._div() .macros().script("lhs_url = \"/left/" + id + "\";") .macros().script("rhs_url = \"/right/" + id + "\";") .macros().javascript("/dist/mergely_ajax.js") ._body() ._html(); } }
@Override public void renderOn(HtmlCanvas html) throws IOException { html .render(DocType.HTML5) .html(lang("en")) .render(new BootstrapHeaderView()) .body() .div(class_("container")) .div(class_("row")) .div(class_("col-lg-12")) .div(class_("panel panel-default")) .div(class_("panel-heading")) .h4(class_("panel-title")) .write("Modified files ") .span(class_("badge")).content(comparator.getModifiedFiles().size()) ._h4() ._div() .div(class_("panel-body")) .render_if(new ModifiedFiles(comparator.getModifiedFiles()), comparator.getModifiedFiles().size() > 0) ._div() ._div() ._div() ._div() .div(class_("row")) .div(class_("col-lg-6")) .div(class_("panel panel-default")) .div(class_("panel-heading")) .h4(class_("panel-title")) .write("Deleted files ") .span(class_("badge")).content(comparator.getDeletedFiles().size())
@SuppressWarnings("unchecked") protected void generateHTMLReport() throws IOException, SecurityException { html = new HtmlCanvas(); html.html().head(); writeCss(); html.title().content(title + ": Test Cases Coverage Report")._head().body(); html.h1().content("W3C Linked Data Platform (" + title + ") Test Suite: Test Cases Coverage Report"); html.p().a(href("http://www.w3.org/2012/ldp/")).content("See also W3C Linked Data Platform WG")._p(); html.p().a(href(specUri)).content("Specification Requirements Page")._p(); final String commit = BuildProperties.getRevision(); if (commit != null) { html.div() .write("Test Suite Revision: ") .a(href("https://github.com/w3c/ldp-testsuite/commit/" + commit)).content(commit)._div(); } DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.ENGLISH); html.div().content("Updated: " + dateFormat.format(new Date())); // Generate the summary diagrams and information createSummaryReport(); toTop(); // Go through all the classes and generate details of each test case for (@SuppressWarnings("rawtypes") Class testcaseClass: testClasses) { writeTestCasesForClass(testcaseClass); } }
private void displayResultsOnCanvas(StateSpaceExplorer.StateSpaceExplorerResults results) throws IOException, StateSpaceLoaderException { HtmlCanvas html = new HtmlCanvas(); html.html().head(); html.style(type("text/css").media("screen")).content(HTML_STYLE); html._head(); html.body(); if (results.numberOfStates < MAX_DISPLAY_STATES) { StateSpaceLoader.Results stateSpace = stateSpaceLoader.loadStateSpace(); solveSteadyState(stateSpace.records, stateSpace.stateMappings, html); } else { html.write("State space is too large to show tabular results"); html.br(); html.write("Number of states: " + results.numberOfStates); html.br(); html.write("Number of transitions: " + results.processedTransitions); } html._body()._html(); resultsPane.setText(html.toHtml()); }
@Override public void renderOn(HtmlCanvas html) throws IOException { html. div(class_("section")). h3(id("Lifecycle_"+this.getPackagingName())).a(href("packaging-"+this.getPackagingName()+".html")).write(this.getPackagingName())._a()._h3(). table(border("0").class_("bodyTable table table-striped table-hover")). thead(). tr(class_("a")). th().write("Phase")._th(). th().write("Goal")._th(). _tr() ._thead(). tbody(); for (t3.LifecyclesUtils.Phase phase : this.getPhases()) { ((Phase) phase).renderOn(html); } html ._tbody() ._table() ._div(); }
private String buildHtml() { HtmlCanvas html = new HtmlCanvas(); try { html .head() .title() .content("StreamPipes Connector Worker Container") ._head() .body() .h1().write("Worker Connector Container with ID: " + this.id)._h1() ._body(); } catch (IOException e) { e.printStackTrace(); } return html.toHtml(); } }
@Override public void renderOn(HtmlCanvas html) throws IOException { html .render(DocType.HTML5) .html(lang("en")) .render(new BootstrapHeaderView()) .body() .div(class_("container-fluid")) .div(class_("row")) .render(new MenuBar()) ._div() .div(class_("row")) .div(class_("col-lg-6 max-height")) .h5().content(fSrc.getName()) .pre(class_("pre max-height")).content(diffs.getSrcDiff(), false) ._div() .div(class_("col-lg-6 max-height")) .h5().content(fDst.getName()) .pre(class_("pre max-height")).content(diffs.getDstDiff(), false) ._div() ._div() ._div() .render(new BootstrapFooterView()) .macros().javascript("/dist/diff.js") ._body() ._html(); }
html.li(id(method.getName())); html.b(); html.a(href(ReportUtils.getJavadocLink(method))) .content(method.getName()); html._b(); html.div(class_("pad-left")); html.p().write("")._p(); html.b().write("Used by Class: ")._b(); boolean seen=false; for (@SuppressWarnings("rawtypes") Class c: testClasses) { html.span(id(normalizedName)).write(labelName)._span(); html.br().b().write("Description: ")._b().write(test.description()); html.br().b().write("Specification Section: ")._b() .a(href(testLdp.specRefUri())) .write(testLdp.specRefUri())._a(); html.br().b().write("Groups: ")._b() .write(Arrays.toString(test.groups())); html.br().b().write("Status: ")._b() .write(testLdp.approval().toString()); html.br().b().write("Test Case Implementation: ")._b() .write("" + testLdp.testMethod()); html.br().b().write("Enabled: ")._b() .write("" + test.enabled()); if(testLdp.steps().length != 0) writeSteps(testLdp.steps(), method.getName()); if(!testLdp.comment().equals(""))
div(class_("row")). div(class_("span12")). div(class_("body-content")). div(class_("section")). div(class_("page-header")). h2().write("Changelog")._h2() ._div(); html = html.h3().write("Next release")._h3(); String lastCommitId = tags.get(tags.size()-1).getCommit().getId(); if (lastCommitId != null) { html.a(href(gitlabRepository + "/compare/" + lastCommitId + "..." + lastCommit.getId())).write("Full changelog")._a(); if (!hasMergeRequest) { hasMergeRequest = true; html = html.h4().write("Merge requests")._h4(); html = html.ul(); html = html._ul(); if (!hasIssues) { hasIssues = true; html = html.h4().write("Closed issues")._h4(); html = html.ul(); html = html._ul(); html.render(tagsWithMergeRequestsAndIssues);