Dashboard#
Dashboard #
Dashboard(
*,
slug: str,
app_slug: str,
workspace_slug: str,
content: Union[List[Page], DashboardContent],
name: Optional[str] = None,
description: Optional[str] = None,
last_available_data: Optional[
Union[datetime, List[str]]
] = None,
status: Optional[DashboardStatus] = None,
version: Optional[str] = None,
skip_data: bool = False,
storage_type: StorageType = StorageType.FILE_SHARE,
publish_mode: PublishMode = PublishMode.DEFAULT
)
Central component for managing layouts, widgets, cards.
The Dashboard class is the central component for creating and managing dashboards. It serves as the container for various layout elements, widgets, and cards.
Constructor for Dashboard.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
slug |
str
|
unique identifier for dashboard. |
required |
app_slug |
str
|
App slug where the dashboard will be published. |
required |
workspace_slug |
str
|
Workspace slug where the dashboard will be published. |
required |
content |
Union[List[Page], DashboardContent]
|
Dashboard content. |
required |
name |
Optional[str]
|
Dashboard name to be displayed. Defaults to slug title case. |
None
|
description |
Optional[str]
|
Dashboard description. Markdown compliant string. |
None
|
last_available_data |
Optional[Union[datetime, List[str]]]
|
Last available data for dashboard. |
None
|
status |
Optional[DashboardStatus]
|
Dashboard status. |
None
|
version |
Optional[str]
|
Dashboard version. By default, is None, can also be set using environment variable DASHBOARD_VERSION. |
None
|
skip_data |
bool
|
skip data processing. If True the publish process will only update the dashboard layout, if False the publish process will update the data and the layout. |
False
|
publish_mode |
PublishMode
|
dashboard publish mode. |
DEFAULT
|
storage_type |
StorageType
|
flag to set the storage type for the dashboard. |
FILE_SHARE
|
PublishMode #
Dashboard Publish Mode.
Attributes:
Name | Type | Description |
---|---|---|
DEFAULT |
Default publish mode. The dashboard does not create new runs and automatically activates the published version. |
|
DEV |
Development publish mode. The dashboard creates new runs and automatically activates the published version/run. |
|
DRAFT |
Draft publish mode. The dashboard creates new runs but does not activate the published version/run. |
|
LIVE |
Live publish mode. The dashboard creates new runs and automatically activates only the published run. |
Version: Set using the Dashboard version argument.
Run: Automatically set based on the published date.