Welcome | Get started | Dive into Lino | Contribute | Topics | Reference | More

lino.core.dashboard

Defines the DashboardItem class.

Classes

ActorItem(actor, **kwargs)

A dashboard item which simply renders a given actor.

DashboardItem(name[, header_level, min_count])

Base class for all dashboard items.

RequestItem(sar, **kwargs)

Experimentally used in lino_book.projects.events.

class lino.core.dashboard.DashboardItem(name, header_level=2, min_count=1)

Bases: Permittable

Base class for all dashboard items.

name

The name used to reference this item in Widget.item_name.

width

The width in percent of total available width.

min_count

Hide this item if there are less than min_count rows.

render(ar, **kwargs)

Yield a list of html chunks.

render_request(ar, sar, **kwargs)

Render the given table action request. ar is the incoming request (the one which displays the dashboard), sar is the table we want to show (a child of ar).

This is a helper function for shared use by ActorItem and RequestItem.

class lino.core.dashboard.ActorItem(actor, **kwargs)

Bases: DashboardItem

A dashboard item which simply renders a given actor. The actor should be a table, other usage is untested.

Usage examples: - lino_xl.lib.blogs - lino_book.projects.events

header_level

The header level.

render(ar, **kwargs)

Render this table to the dashboard.

class lino.core.dashboard.RequestItem(sar, **kwargs)

Bases: DashboardItem

Experimentally used in lino_book.projects.events.