Make a dashboard its widgets: drop the pages and sections nobody drew
This commit is contained in:
@@ -8,8 +8,6 @@ control or another flow, it pulses a node that did nothing at all.
|
||||
from fluksio.flow.dashboards import (
|
||||
DashboardDef,
|
||||
DashboardStore,
|
||||
PageDef,
|
||||
SectionDef,
|
||||
WidgetDef,
|
||||
)
|
||||
from fluksio.flow.events import EventBus
|
||||
@@ -104,35 +102,25 @@ def test_the_widgets_wired_into_a_flow_are_reported(tmp_path):
|
||||
DashboardDef(
|
||||
name="panel",
|
||||
title="Panel",
|
||||
pages=[
|
||||
PageDef(
|
||||
id="main",
|
||||
sections=[
|
||||
SectionDef(
|
||||
id="main",
|
||||
widgets=[
|
||||
WidgetDef(
|
||||
id="setpoint",
|
||||
type="slider",
|
||||
title="Setpoint",
|
||||
config={"target": "house.setpoint"},
|
||||
),
|
||||
WidgetDef(
|
||||
id="reading",
|
||||
type="stat",
|
||||
title="Reading",
|
||||
config={"message": "house.temp"},
|
||||
),
|
||||
# Another flow's message: not this flow's business.
|
||||
WidgetDef(
|
||||
id="elsewhere",
|
||||
type="stat",
|
||||
config={"message": "garage.temp"},
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
)
|
||||
widgets=[
|
||||
WidgetDef(
|
||||
id="setpoint",
|
||||
type="slider",
|
||||
title="Setpoint",
|
||||
config={"target": "house.setpoint"},
|
||||
),
|
||||
WidgetDef(
|
||||
id="reading",
|
||||
type="stat",
|
||||
title="Reading",
|
||||
config={"message": "house.temp"},
|
||||
),
|
||||
# Another flow's message: not this flow's business.
|
||||
WidgetDef(
|
||||
id="elsewhere",
|
||||
type="stat",
|
||||
config={"message": "garage.temp"},
|
||||
),
|
||||
],
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user