feat(graph): pipeline graph improvements — on_failure, tooltips, bus-bar connectors, skipped colouring, HTML and Mermaid output
- when: on_failure visual distinction: red circle (#d9534f), X-mark icon, dashed chip border, and Mermaid classDef; legend entry added - Job tooltip / detail panel: each chip wrapped in <g data-job="…"><title>…</title> <desc>…</desc> so SVG viewers and the HTML sidebar show stage, when, image, needs - Multi-job connector accuracy: classic mode now uses a bus-bar pattern (vertical rail at midpoint + per-job stubs) instead of one center-to-center line per stage pair - Blocked/skipped state colouring: RenderPipeline and pipelineSVG accept *cicontext.Context; skipped jobs rendered in grey (#868686) with dimmed text - Interactive HTML output (--format html): self-contained .html with inline SVG, mouse-wheel zoom, drag-to-pan, double-click reset, and a click-to-open sidebar - Mermaid pipeline output (--format mermaid): prints existing Pipeline() flowchart to stdout; suitable for mermaid.live or Markdown embedding - imageString() helper to extract image name from string or map form - 100% statement coverage maintained; 809 tests pass Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -27,6 +27,7 @@ func Pipeline(p *model.Pipeline) string {
|
||||
w(" classDef manual fill:#fc6d26,stroke:#e56b1f,color:#fff")
|
||||
w(" classDef trigger fill:#6b4fbb,stroke:#5a3fa0,color:#fff")
|
||||
w(" classDef delayed fill:#fca326,stroke:#d98a1e,color:#333")
|
||||
w(" classDef on_failure fill:#d9534f,stroke:#c0392b,color:#fff")
|
||||
w("")
|
||||
|
||||
// Collect visible (non-template) job names; sort for stable output.
|
||||
@@ -149,6 +150,8 @@ func jobClass(job model.Job) string {
|
||||
return "manual"
|
||||
case "delayed":
|
||||
return "delayed"
|
||||
case "on_failure":
|
||||
return "on_failure"
|
||||
}
|
||||
return "regular"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user