Class: JobWorkflow::Monitoring::DagLayout
- Inherits:
-
Object
- Object
- JobWorkflow::Monitoring::DagLayout
- Defined in:
- lib/job_workflow/monitoring/dag_layout.rb
Constant Summary collapse
- NODE_WIDTH =
224- NODE_HEIGHT =
84- COLUMN_GAP =
56- ROW_GAP =
24- PADDING =
16- LABEL_LIMIT =
24
Instance Method Summary collapse
-
#initialize(tasks:) ⇒ DagLayout
constructor
: (tasks: Array[Hash[Symbol, untyped]]) -> void.
-
#to_h ⇒ Object
: () -> Hash[Symbol, untyped].
Constructor Details
#initialize(tasks:) ⇒ DagLayout
: (tasks: Array[Hash[Symbol, untyped]]) -> void
14 15 16 17 |
# File 'lib/job_workflow/monitoring/dag_layout.rb', line 14 def initialize(tasks:) validate_tasks!(tasks) @tasks = tasks end |
Instance Method Details
#to_h ⇒ Object
: () -> Hash[Symbol, untyped]
20 21 22 23 24 25 26 27 |
# File 'lib/job_workflow/monitoring/dag_layout.rb', line 20 def to_h { width: canvas_width, height: canvas_height, nodes:, edges: } end |