orangeqs.juice.dashboard.widgets.control_pc_table#

Widgets and data sources for the resource usage of the Control PC.

Module Contents#

Classes#

Usage

Used and total amount of a resource, in bytes.

ControlPCUsage

Resource usage of the control PC. None means missing data.

ControlPCUsageSource

Queries the latest control PC resource usage from InfluxDB.

ControlPCOverviewTable

Overview of the control PC usage.

Data#

API#

orangeqs.juice.dashboard.widgets.control_pc_table.units#

‘UnitRegistry(…)’

class orangeqs.juice.dashboard.widgets.control_pc_table.Usage#

Used and total amount of a resource, in bytes.

used: float#

None

total: float#

None

property percent: float#

Fraction of the resource in use, as a percentage.

format_absolute() → str#

Return the usage as e.g. 13.5 GB / 64.3 GB.

class orangeqs.juice.dashboard.widgets.control_pc_table.ControlPCUsage#

Resource usage of the control PC. None means missing data.

cpu_percent: float | None#

None

memory: orangeqs.juice.dashboard.widgets.control_pc_table.Usage | None#

None

swap: orangeqs.juice.dashboard.widgets.control_pc_table.Usage | None#

None

disks: dict[str, orangeqs.juice.dashboard.widgets.control_pc_table.Usage | None]#

‘field(…)’

property is_empty: bool#

Whether no metric at all was reported.

class orangeqs.juice.dashboard.widgets.control_pc_table.ControlPCUsageSource(disk_mount_points: collections.abc.Iterable[str], query_api: influxdb_client.client.query_api_async.QueryApiAsync | None = None)#

Queries the latest control PC resource usage from InfluxDB.

async fetch() → orangeqs.juice.dashboard.widgets.control_pc_table.ControlPCUsage#

Query the latest resource usage of the control PC.

limit=1 counts per series key, so each query returns the most recent reading of every series: one per CPU, one per mount point.

Raises#

  • (RuntimeError): If the InfluxDB query could not be executed.

class orangeqs.juice.dashboard.widgets.control_pc_table.ControlPCOverviewTable(*, data_table_opts: dict[str, Any] | None = None)#

Bases: orangeqs.juice.dashboard.widgets.common.datatable_widget.DataTableWidget

Overview of the control PC usage.

This widget outputs CPU, memory, swap and disk usage for configured disks in a form of a two-column table. Bokeh table is exposed as ControlPCOverviewtable.root, and update is triggered using ControlPCOverviewtable.update() coroutine.