-
Notifications
You must be signed in to change notification settings - Fork 1
Health Check Output Template
Templates allow you to customize the report's look and feel. Currently the following template is available:
-
full.html: Enables all features (outline navigation, syntax highlighting, charts). Requires internet access for CDN resources.
Each module has its own template, specified in config.json under <module>.template:
-
healthcheck:healthcheck/full.html -
log:log/full.html -
gmd:gmd/full.html -
ftdc:ftdc/full.html
When you create your own template, place {{ content }} where the rendered report should appear. The placeholder is replaced with the generated HTML at runtime.
CSS and JS are stored in separate files and injected into the template at report-generation time via two additional placeholders:
| Placeholder | Replaced with |
|---|---|
{{ style }} |
A <style> block containing all applicable CSS. |
{{ script }} |
A <script> block containing all applicable JS. |
The injected assets are composed of shared files (common to all modules) plus module-specific files:
| File | Description |
|---|---|
css/shared.css |
Base styles — layout, outline sidebar, table rules, print/PDF media queries, <th> background. |
js/common.js |
Utility functions (formatSize) and clipboard polyfill for file:// contexts. |
js/outline.js |
Outline sidebar navigation — scroll spy, collapse/expand, highlight current heading. Used by healthcheck, ftdc, and log (gmd has its own). |
Each module folder may contain a style.css and/or script.js:
| Module | CSS | JS |
|---|---|---|
healthcheck/ |
— |
script.js — highlight.js init. |
ftdc/ |
style.css — table-copy wrapper/toolbar styles, print overrides. |
script.js — table copy-to-clipboard logic, highlight.js setup for metadata code blocks. |
log/ |
style.css — tooltip styles. |
script.js — Chart.js zoom config, color helpers, highlight.js init. |
gmd/ |
— |
script.js — outline navigation (own implementation via window.onload), highlight.js init. |
Source files use the .raw.css / .raw.js suffix. Minified output (.css / .js) is generated by:
make minify # or: cd src/x_ray/templates && ./minify.sh healthcheck log gmd ftdc css jsCSS is minified with clean-css-cli; JS with terser. The injection step reads the minified .css / .js files.
css/shared.css-
<module>/style.css(if present) js/common.js-
js/outline.js(except gmd) -
<module>/script.js(if present)