A VDomModel for the execution status indicator.

Hierarchy (view full)

Constructors

Properties

_currentNotebook: Notebook

Current activated notebook.

_displayOption: DisplayOption

The option to show the indicator on status bar or toolbar.

_notebookExecutionProgress: WeakMap<Notebook, IExecutionState> = ...

A weak map to hold execution status of multiple notebooks.

_renderFlag: boolean

A flag to show or hide the indicator.

stateChanged: Signal<ExecutionIndicator.Model, void>

A signal emitted when any model state changes.

Accessors

  • get isDisposed(): boolean
  • Test whether the model is disposed.

    Returns boolean

Methods

  • The function is called on kernel's idle status message. It is used to keep track of number of executed cells or Comm custom messages and the status of kernel.

    Parameters

    • nb: Notebook

      The notebook which contains the executed code cell.

    • msg_id: string

      The id of message.

    Returns void

  • The function is called on kernel's execute_request message or Comm message, it is used to keep track number of scheduled cell or Comm execution message and the status of kernel.

    Parameters

    • nb: Notebook

      The notebook which contains the scheduled code. cell

    • msg_id: string

      The id of message.

    Returns void

  • The function is called on kernel's restarting status message. It is used to clear the state tracking the number of executed cells.

    Parameters

    • nb: Notebook

      The notebook which contains the executed code cell.

    Returns void

  • Schedule switch to idle status and clearing of the timer.

    Note

    To keep track of cells executed under 1 second, the execution state is marked as needReset 1 second after executing these cells. This Timeout will be cleared if there is any cell scheduled after that.

    Parameters

    Returns void

  • Attach a notebook with session context to model in order to keep track of multiple notebooks. If a session context is already attached, only set current activated notebook to input.

    Parameters

    • data: null | {
          content?: Notebook;
          context?: ISessionContext;
      }

      The notebook and session context to be attached to model

    Returns void

  • Dispose the model.

    Returns void