org.models.dashboard

Module Contents

Classes

Dashboard

Boardlet

Base class used by all boardlets. Use as follows:

BoardletFact

A single boardlet fact.

class org.models.dashboard.Dashboard(request: onegov.org.request.OrgRequest)[source]
property is_available: bool[source]

Returns true if there are boardlets to show.

boardlets() list[tuple[Boardlet, Ellipsis]][source]

Returns the boardlets, grouped/ordered by their order tuple.

class org.models.dashboard.Boardlet(name: str, order: tuple[int, int], request: onegov.org.request.OrgRequest)[source]

Base class used by all boardlets. Use as follows:

from onegov.app import App

@App.boardlet(name=’foo’, order=(1, 1)) class MyBoardlet(Boardlet):

pass

abstract property title: str[source]

Returns the title of the boardlet, which is meant to be something meaningful, like the most important metric used in the boardlet.

abstract property facts: Iterator[BoardletFact][source]

Yields facts. (BoardletFact instances)

property state: Literal[success, warning, failure][source]

Yields one of three states:

  • ‘success’

  • ‘warning’

  • ‘failure’

class org.models.dashboard.BoardletFact[source]

A single boardlet fact.

text: str[source]
icon: str | None[source]
css_class: str | None[source]