Skip to content
John Lee edited this page May 30, 2013 · 2 revisions

This component is responsible for the script and creates an object called Script.


Properties

All Script properties are stored in an object called Script.options

  • Script.options.script
    • Type: String
    • The Pig script
  • Script.options.myCodeMirror
    • Type: Object
    • CodeMirror object
  • Script.options.codeMirrorSel
    • Type: String
    • Selector for CodeMirror
  • Script.options.lineNumbers
    • Type: Array
    • Contains line numbers that are highlighted

Methods

  • Script.startListeners()
    • Start listening to custom events.
  • Script.initialize(script)
    • Initialize the Script object.
    • @param {String} script The Pig script being run
  • Script.getBreakpointCode(id)
    • Get relevant Pig code to the specified node’s id.
    • @param {Number} id The node’s id to get Pig code
  • Script.highlightLine(lineNumber)
    • Highlight the line number in the script.
    • @param {Number} lineNumber The line number to highlight
  • Script.removeHighlight()
    • Remove all line highlighting in the script.

Custom Events

Triggers

  • highlightCodeLine.tossboss-graph-script
  • loadBreakpointCode.tossboss-graph-script

Listens

  • clickLogicalOperator.tossboss-graph-view
  • clickMRJob.tossboss-graph-view
  • clickOutsideGraph.tossboss-graph-view
  • loadGraphModel.tossboss-graph-model
Clone this wiki locally