Class: ChronoForge::Dashboard::DefinitionsController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/chrono_forge/dashboard/definitions_controller.rb

Overview

Per-run view of a workflow's statically-analyzed definition graph, with the run's execution logs overlaid onto the nodes. Analysis is best-effort: an unknown/unloadable class or an unanalyzable perform yields a warning, not a 500, so the page always renders.

Instance Method Summary collapse

Instance Method Details

#showObject



8
9
10
11
12
13
14
15
16
17
18
19
# File 'app/controllers/chrono_forge/dashboard/definitions_controller.rb', line 8

def show
  # Opt out of the auto-refresh region morph: reconciling the region's HTML
  # wipes the live Cytoscape canvas (injected <script>s don't re-run),
  # leaving a blank graph. This page reloads fully instead.
  @cf_disable_polling = true
  @workflow = ChronoForge::Workflow.find(params[:id])
  definition = analyze(@workflow)
  overlay = DefinitionOverlay.new(definition, @workflow)
  @nodes = overlay.nodes
  @warnings = overlay.warnings
  @graph = CytoscapeGraph.new(@nodes, definition.edges).to_h
end