Dashboard

class orion_notebook.widgets.dashboard.Dashboard(**kwargs)

Bases: ipywidgets.widgets.widget_box.VBox

Class that contains widgets and allows to create links between their inputs and outputs

Builds a bidirectional link between specified attributes from a source and a target widget

Parameters
  • source – source widget

  • target – target widget

  • match – List with tuples of attributes to be linked together [(source_attr1, target_attr1)..]

Builds a directional link between specified attributes from a source and a target widget

Parameters
  • source (BaseWidget) – Source widget(s) that will feed information to the target widget

  • target – Target widget

  • match (Optional[List[Tuple[str, str]]) – List containing tuples of attributes to be linked together [(source_attr1, target_attr1)..]

add_widget(widget: orion_notebook.widgets.widget_base.BaseWidget)None

Adds widget to the dashboard

Parameters

widget (BaseWidget) – Widget to add to the dashboard

add_widget_to_layout(dashboard_layout: ipywidgets.widgets.widget_box.Box, widget: orion_notebook.widgets.widget_base.BaseWidget)None

Dynamically adds a widget to the existing layout without redrawing the dashboard

Parameters
  • dashboard_layout (Box) – Layout to add the widget to

  • widget (BaseWidget) – Widget to add to the layout

add_widgets(widgets: List[orion_notebook.widgets.widget_base.BaseWidget])

Add several widgets to the dashboard

Parameters

widgets (Union[List[BaseWidget]]) – Widgets to add to the dashboard

count_widgets()int

Gets the number of widgets in the dashboard

Returns

Number of items in the dashboard

Return type

int

create_widget(cls, **kwargs: Dict[str, Any])orion_notebook.widgets.widget_base.BaseWidget

Updates the dashboard parameters with the parameters needed during the initialisation of the widget

Parameters
  • cls – Class of the widget to create

  • kwargs – parameters needed by the widget on instantiation

Return type

BaseWidget

delete_widget_from_layout(dashboard_layout: ipywidgets.widgets.widget_box.Box, widget: orion_notebook.widgets.widget_base.BaseWidget)None

Dynamically removes a widget from the existing layout without redrawing the dashboard

Parameters
  • dashboard_layout (Box) – The layout on which a widget is deleted

  • widget (BaseWidget) – Widget to remove from the layout

static disable_cell_auto_scrolling()None

Disables auto-scrolling in a specific Jupyter Notebook cell.

run()None

Renders the widgets according to the specified layout. If no layout is specified, the widgets will be rendered in a vertical layout. By disabling autoscrolling, the widgets are all viewable on the same cell.

set_layout(layout: object)None

Sets the layout that defines the position in which the widgets will be rendered within the dashboard

Parameters

layout (object) – layout defining the position in which the notebooks will be rendered