A panel writes only what its dashboards' inputs target
It still reads every message its dashboards show. A message a tile only draws, or a setting is bound to, is no longer writable from the panel.
This commit is contained in:
@@ -197,6 +197,16 @@ def requests_of(defn: DashboardDef) -> set[str]:
|
||||
return {w.target for w in defn.widgets if w.type == "chart" and w.target}
|
||||
|
||||
|
||||
def targets_of(defn: DashboardDef) -> set[str]:
|
||||
"""The messages this dashboard's inputs publish to.
|
||||
|
||||
What a screen showing it may write, a narrower set than what it may read.
|
||||
A tile that only draws a message, and a setting bound to one, are there to
|
||||
be looked at, so a panel showing them is not entitled to set them.
|
||||
"""
|
||||
return {w.target for w in defn.widgets if w.target}
|
||||
|
||||
|
||||
def io_in(panel_id: str) -> set[str]:
|
||||
"""The messages this panel's own hardware publishes to."""
|
||||
panel = find(panel_id)
|
||||
|
||||
Reference in New Issue
Block a user