Class: ChronoForge::Dashboard::DefinitionOverlay
- Inherits:
-
Object
- Object
- ChronoForge::Dashboard::DefinitionOverlay
- Defined in:
- app/presenters/chrono_forge/dashboard/definition_overlay.rb
Overview
Overlays a workflow run's execution_logs onto a static Definition, producing per-node hashes with a runtime :status (and fan-out/repeat aggregates). Read-only. The Definition is the static map; logs are the source of truth for a specific run.
Constant Summary collapse
- LOG_STATUS =
ExecutionLog's state enum is only pending/completed/failed. "pending" means reached-but-unfinished (in progress), so it maps to :active; the fetch default below catches any state added later.
{"completed" => :done, "failed" => :failed, "pending" => :active}.freeze
Instance Method Summary collapse
-
#initialize(definition, workflow) ⇒ DefinitionOverlay
constructor
A new instance of DefinitionOverlay.
- #nodes ⇒ Object
- #warnings ⇒ Object
Constructor Details
#initialize(definition, workflow) ⇒ DefinitionOverlay
Returns a new instance of DefinitionOverlay.
13 14 15 16 |
# File 'app/presenters/chrono_forge/dashboard/definition_overlay.rb', line 13 def initialize(definition, workflow) @definition = definition @workflow = workflow end |
Instance Method Details
#nodes ⇒ Object
18 19 20 21 |
# File 'app/presenters/chrono_forge/dashboard/definition_overlay.rb', line 18 def nodes mapped = @definition.nodes.map { |n| (n) } mapped + unmapped_nodes(mapped) end |
#warnings ⇒ Object
23 |
# File 'app/presenters/chrono_forge/dashboard/definition_overlay.rb', line 23 def warnings = @definition.warnings |