Class DashboardHtmlWriter
java.lang.Object
com.arc_e_tect.gradle.trackerlens.dashboard.DashboardHtmlWriter
Renders
DashboardView to dashboard.html plus one CSS file per discovered lens, via
a Mustache template - this plugin's own bundled default, or a user-supplied override.
Every element governed by ContractRule is emitted exactly as that contract requires by
the bundled default template; everything else - headings, captions, disclaimer wording - is free
text and may be reworded at will, including by simply editing a copy of it (see template
in the extension DSL). Whichever template rendered it, this writer's output is always run back
through com.arc_e_tect.gradle.trackerlens.contract.LensContractValidator by
GenerateTrackerLensTask as the unconditional last step of generation - a user template
that has drifted from the contract is caught exactly the same way the bundled one would be.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionwrite(File outputDir, DashboardView view, File customTemplate) Writesdashboard.htmland one CSS file per lens inview.lenses()tooutputDir, renderingdashboard.htmlfromcustomTemplatewhen given, otherwise from this plugin's own bundled default template.write(File outputDir, DashboardView view, String templateName, String templateContent) Writesdashboard.htmland one CSS file per lens inview.lenses()tooutputDir, renderingdashboard.htmlfromtemplateContent- a lens-pack template resolved by id viatrackerLens.templateId, rather than a project file or this plugin's own bundled default.
-
Constructor Details
-
DashboardHtmlWriter
public DashboardHtmlWriter()Creates a newDashboardHtmlWriter.
-
-
Method Details
-
write
Writesdashboard.htmland one CSS file per lens inview.lenses()tooutputDir, renderingdashboard.htmlfromcustomTemplatewhen given, otherwise from this plugin's own bundled default template.- Parameters:
outputDir- the directory to write into; created if missingview- the data to rendercustomTemplate- a user-supplied Mustache template file, ornullto use the bundled default- Returns:
- the written
dashboard.htmlfile
-
write
Writesdashboard.htmland one CSS file per lens inview.lenses()tooutputDir, renderingdashboard.htmlfromtemplateContent- a lens-pack template resolved by id viatrackerLens.templateId, rather than a project file or this plugin's own bundled default.- Parameters:
outputDir- the directory to write into; created if missingview- the data to rendertemplateName- the template's id, used only for error messages and as the Mustache compiler's internal template nametemplateContent- the lens-pack template's own Mustache source- Returns:
- the written
dashboard.htmlfile
-