Skip to main content
Version: 13 - TBD

ContainerDashboard

class flow_api.container_dashboard.ContainerDashboard(select=None, cls=None, init=None, by='id', allow_normal=True, allow_deleted=False, commit=False, dashboard_id=<class 'flow_api.system.NotSet'>, is_default=<class 'flow_api.system.NotSet'>, record_id=<class 'flow_api.system.NotSet'>, debug=False)

Base class: Row

Associates a DASHBOARD with a container record (WORKSPACE / PROJECT / BUNDLE).

A container always keeps its built-in default dashboards; a container_dashboard row additionally associates a specific dashboard with a specific container so the Console can offer it (e.g. as a tab) when viewing that container. The relation is a dedicated link table (rather than a flat setting) so it is FK-constrained and discoverable in both directions: from a container -> which dashboards to show, and from a dashboard -> which containers use it.

record_id is the container (Stefan's "container_id"): it targets the polymorphic record supertable because WORKSPACE / PROJECT / BUNDLE share no more specific common table, and is constrained to those three types at write time (see :func:_validate_container_type). is_default marks the container's default dashboard (the one opened by default when viewing the container); at most one association per container should carry it -- that single-default invariant is enforced at the application/UI layer for now, not by a DB constraint.

Parameters

NameTypeDescription
allow_deletedbool
allow_normalbool
bystr
clsOptional
commitbool
dashboard_idUnionReference to the dashboard associated with the container.
debugboolif set, the content of the data being written will be logged.
initOptional
is_defaultUnionWhether this is the container's default dashboard (the one opened by default when viewing the container). At most one association per container should be default; the single-default invariant is enforced at the application/UI layer.
record_idUnionReference to the container record (WORKSPACE / PROJECT / BUNDLE) this dashboard is associated with. Constrained to a container record_type at write time.
selectOptional

Constants

RESOURCE = container_dashboard

Methods

clone

dashboard

delete

duplicate

exists

export

get

get_dict

record

restore

save