Add isolated read-only official widget integration and searchable catalog
This commit is contained in:
@@ -390,3 +390,21 @@ class ImageURLConfig(StrictModel):
|
||||
raise ValueError("Use hostnames only, without URLs or wildcards")
|
||||
self.allowed_hosts = sorted(set(h.lower() for h in self.allowed_hosts))
|
||||
return self
|
||||
|
||||
|
||||
class Widget(StrictModel):
|
||||
id: int
|
||||
name: str
|
||||
tags: list[str] = Field(default_factory=list)
|
||||
arg_keys: list[str] = Field(default_factory=list)
|
||||
|
||||
|
||||
class WidgetState(StrictModel):
|
||||
source: Literal["live", "snapshot", "mock"]
|
||||
configured: bool
|
||||
status: str = "OK"
|
||||
observed_at: str | None = None
|
||||
catalog: list[Widget]
|
||||
current: Widget | None = None
|
||||
current_verified: bool = False
|
||||
writable: Literal[False] = False
|
||||
|
||||
Reference in New Issue
Block a user