new Timeline(cellmonitor)
Adds an event timeline to the monitoring display.
Parameters:
Name | Type | Description |
---|---|---|
cellmonitor |
CellMonitor | The parent CellMonitor to render in. |
Methods
-
registerRefresher()
-
Registers a refresher to update the timeline.
-
refreshTimeline(redraw)
-
Refreshes the timeline. Running items are updated with "end" as the current time once in every three refresh cycles. The queued data updates are flushed in every cycle.
Parameters:
Name Type Description redraw
boolean Force a refresh of running items. -
clearRefresher()
-
Remove the refresher to update the timeline
-
addLinetoTimeline(time, id, title)
-
Adds a line to the timeline
Parameters:
Name Type Description time
Date The time id
string A unique string to identify the line. (Duplicates throw errors). title
string The tooltip for the line. - To Do:
-
- title is not displayed currently. The pointer events for the line are disabled in CSS to prevent dragging, this hides tooltip also.
-
setRanges(start, end, setminmax, moveWindow, hidecurrenttime)
-
Sets the timeline range, and visible window range.
Parameters:
Name Type Description start
Date The minimum date. end
Date The maximum date. setminmax
boolean Set the maximum/minimum scrollable date also. moveWindow
boolean Move the current displayed timeline also. hidecurrenttime
boolean Hide the red line showing current time. -
create()
-
Creates and renders the timeline from the stored data.
-
hide()
-
Hide the timeline.
-
onAllCompleted()
-
Called when the cell has finished executing as well as all jobs in it have completed.
-
createTaskBar(data)
-
Creates the HTML element for a task item. The different phases are rendered in svg. When phases are hidden, all phases are made transparent.
Parameters:
Name Type Description data
Object The task data. Returns:
- The HTML string for the element.- Type
- string
-
onSparkJobStart()
-
Called when a Spark job starts.
-
onSparkJobEnd()
-
Called when a Spark job ends.
-
onSparkStageSubmitted()
-
Called when a Spark stage is submitted.
-
onSparkStageCompleted()
-
Called when a Spark stage is completed.
-
onSparkTaskStart()
-
Called when a Spark task is started.
-
onSparkTaskEnd()
-
Called when a Spark task is ended.