org.models.dashboard

Classes

Dashboard

Boardlet

Base class used by all boardlets.

BoardletFact

A single boardlet fact.

Module Contents

class org.models.dashboard.Dashboard(request: onegov.org.request.OrgRequest)[source]
request[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
name[source]
order[source]
request[source]
property title: str[source]
Abstractmethod:

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

property facts: Iterator[BoardletFact][source]
Abstractmethod:

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 = None[source]
css_class: str | None = None[source]