Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
a226f60
feat(overview): add the device_map card type to the layout settings
Developer-Simon Dec 3, 2026
99e8dbd
refactor(energy): move the plant renderer into a shared devicemap-liv…
Developer-Simon Dec 3, 2026
62c9456
feat(overview): add viewport gestures and fit spring for map cards
Developer-Simon Dec 3, 2026
124761f
fix(energy): show role edges with the data layer on the live core
Developer-Simon Dec 3, 2026
7d40301
fix(overview): make viewport attach idempotent
Developer-Simon Dec 3, 2026
a99435a
feat(overview): add the device map card component
Developer-Simon Dec 3, 2026
0d553bd
feat(overview): render the device map card with glass label, fit pill…
Developer-Simon Dec 3, 2026
d6ab607
fix(overview): clear the refresh timer when a live map is destroyed
Developer-Simon Dec 3, 2026
e6275a0
feat(overview): load the device map card lazily and keep it out of th…
Developer-Simon Dec 3, 2026
6eecf34
feat(layout-editor): offer the device map card with its options
Developer-Simon Dec 3, 2026
fa9b369
chore(dashboard): bump asset versions and document the device map card
Developer-Simon Dec 3, 2026
46c942a
docs(overview): clarify how the device map card zooms
Developer-Simon Dec 3, 2026
371fcb9
fix(overview): cancel the fit spring on re-render and refresh energy …
Developer-Simon Dec 3, 2026
9926343
style(overview): give the device map card the same title header as th…
Developer-Simon Dec 4, 2026
979149d
style(overview): drop the glass label from the device map card comment
Developer-Simon Dec 4, 2026
4aa43a0
chore(release): bump component versions
Dec 4, 2026
3d0dea7
docs(changelog): update changelogs
Dec 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions changelog/highlights/318.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"de": {
"*": "Die Device-Map als Karte auf der Übersicht, mit Live-Werten, Energiefluss und Zoom"
},
"en": {
"*": "Add a device map card to the overview"
},
"tour": {
"*": {
"steps": [
{
"device": "any",
"need": "edit_layout",
"panel": "overview-panel",
"target": "device-map-card",
"text": {
"de": "Die Anordnung aus der Device-Map gibt es jetzt als Karte mit Live-Werten und Energiefluss. Du fügst sie im Layout-Editor hinzu und wählst dort die Ebenen. Zoomen geht mit Strg und Mausrad oder mit zwei Fingern, „Einpassen“ holt die ganze Anlage zurück.",
"en": "The device map layout is now available as a card with live values and energy flow. Add it in the layout editor and choose its layers there. Zoom with Ctrl and the mouse wheel or with two fingers, Fit brings the whole plant back."
},
"title": {
"de": "Device-Map auf der Übersicht",
"en": "Device map on the overview"
}
}
]
}
}
}
20 changes: 19 additions & 1 deletion dashboard/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
# Changelog

## v0.12.1-pre.1 (2026-12-03)
## v0.12.1-pre.2 (2026-12-04)

### Features

- **dashboard:** A compact header whose status chip names the cause of a problem (#316) (6f5aa61)
- **overview:** add the device_map card type to the layout settings (a226f60)
- **overview:** add viewport gestures and fit spring for map cards (62c9456)
- **overview:** add the device map card component (a99435a)
- **overview:** render the device map card with glass label, fit pill and tap modes (0d553bd)
- **overview:** load the device map card lazily and keep it out of the grid swap (e6275a0)
- **layout-editor:** offer the device map card with its options (6eecf34)
- **overview:** add a device map card to the overview (#318)
- **health:** derive a ranked issue list from the node state (c7c1a75)
- **health:** report issues and level, count only installed services (f290fb2)
- **dashboard:** one title row with a status chip that names its cause (0c99637)
Expand All @@ -15,12 +22,17 @@

### Fixes

- **energy:** show role edges with the data layer on the live core (124761f)
- **overview:** make viewport attach idempotent (7d40301)
- **overview:** clear the refresh timer when a live map is destroyed (d6ab607)
- **overview:** cancel the fit spring on re-render and refresh energy on wake (371fcb9)
- **dashboard:** format the status chip values for the locale (ce581a5)
- **health:** warn when the storage medium reports its end of life (327b355)
- **dashboard:** record the cache-bust marks for the prerelease line (7490abd)

### Refactors

- **energy:** move the plant renderer into a shared devicemap-live core (99e8dbd)
- **settings:** retire status_bar_items, the status popover shows every value (4a944fb)
- **settings:** drop the status field chooser from settings and installer (1b4cce1)

Expand All @@ -34,10 +46,16 @@

### Style

- **overview:** give the device map card the same title header as the other cards (9926343)
- **overview:** drop the glass label from the device map card comment (979149d)
- **dashboard:** style the title row and the status chip (d28e19e)
- **dashboard:** give update, guest and example notes one slim row form (10a1384)
- **dashboard:** darken the install button on hover so its label keeps contrast (8cb0b15)

### Chores

- **dashboard:** bump asset versions and document the device map card (fa9b369)

## v0.12.0 (2026-12-02)

### Features
Expand Down
2 changes: 1 addition & 1 deletion dashboard/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.12.1-pre.1
v0.12.1-pre.2
14 changes: 14 additions & 0 deletions dashboard/internal/httpapi/access_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -380,3 +380,17 @@ func TestMigratedGuestPassesEveryViewGate(t *testing.T) {
assertPassedGate(t, recorder, path)
}
}

// Die Device-Map-Karte auf der Uebersicht holt ihre Verbindungen mit einer
// Sitzung, die nur view_overview hat. Die Route haengt an /api/v1/device/map/
// (groupAnyView), darf also nicht mit 403 abgewiesen werden.
func TestDeviceMapFlowsAllowOverviewOnlyAccount(t *testing.T) {
router, manager := newRestrictedTestRouter(t, nil)
cookie, _ := loginWithRoles(t, router, manager, "olaf", []string{auth.RoleViewOverview})

response := httptest.NewRecorder()
router.ServeHTTP(response, sessionRequest(t, "/api/v1/device/map/flows", cookie, true))
if response.Code == http.StatusForbidden {
t.Fatalf("/api/v1/device/map/flows with only view_overview: status 403, body %s", response.Body)
}
}
3 changes: 3 additions & 0 deletions dashboard/internal/settings/cardcatalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ var cardCatalog = map[string]CardType{
// Ein ApexCharts-Liniendiagramm. Unter 16rem werden die Achsenbeschriftungen
// unleserlich, und es nutzt jede zusaetzliche Hoehe.
"history_view": {MinSpan: 1, MinWidth: "16rem", MinHeight: "14rem", FillsHeight: true, DefaultSpan: "2"},
// Die Map nutzt jede Hoehe, die Breite folgt der Spalte. 18rem traegt
// Kopfzeile, Pille und eine lesbare Anlage.
"device_map": {MinSpan: 1, MinWidth: "18rem", MinHeight: "18rem", FillsHeight: true, DefaultSpan: "full"},
}

// fallbackCardType haelt jeden Aufrufer beantwortbar, auch wenn ein Typ ohne
Expand Down
13 changes: 11 additions & 2 deletions dashboard/internal/settings/layout.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"required": ["id", "type", "span", "visible"],
"properties": {
"id": {"type": "string", "minLength": 1},
"type": {"type": "string", "enum": ["device", "entity_value", "entity_group", "energy_flow", "energy_summary", "diagnostics", "energy_band", "energy_ring", "energy_board", "energy_day", "energy_schema", "energy_status", "energy_stats", "battery_status", "history_view"]},
"type": {"type": "string", "enum": ["device", "entity_value", "entity_group", "energy_flow", "energy_summary", "diagnostics", "energy_band", "energy_ring", "energy_board", "energy_day", "energy_schema", "energy_status", "energy_stats", "battery_status", "history_view", "device_map"]},
"ref": {"type": "string"},
"entity_refs": {
"type": "array",
Expand Down Expand Up @@ -76,7 +76,16 @@
"stats_chart": {"type": "string", "enum": ["on", "off"]},
"history_series": {"type": "array", "items": {"type": "string", "minLength": 1}},
"history_range_hours": {"type": "string", "enum": ["1", "6", "24", "168", "720", "2160"]},
"history_aggregate": {"type": "string", "enum": ["avg", "min", "max"]}
"history_aggregate": {"type": "string", "enum": ["avg", "min", "max"]},
"map_wiring": {"type": "string", "enum": ["on", "off"]},
"map_energy": {"type": "string", "enum": ["on", "off"]},
"map_balance": {"type": "string", "enum": ["on", "off"]},
"map_data": {"type": "string", "enum": ["on", "off"]},
"map_role_edges": {"type": "string", "enum": ["on", "off"]},
"map_automation_links": {"type": "string", "enum": ["on", "off"]},
"map_edge_style": {"type": "string", "enum": ["curved", "straight"]},
"map_width": {"type": "string", "enum": ["on", "off"]},
"map_tap": {"type": "string", "enum": ["none", "highlight", "modal"]}
}
}
}
Expand Down
45 changes: 45 additions & 0 deletions dashboard/internal/settings/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,20 @@ type Item struct {
StatsKPIs []string `json:"stats_kpis,omitempty"`
StatsChart string `json:"stats_chart,omitempty"` // "on" | "off"

// device_map: die Karte zeigt die Device-Map im Uebersichtsraster. Die
// Schalter und Stile wirken nur auf diese Kachel, andere Typen tragen
// keinen dieser Werte. Leer bei MapEdgeStyle und MapWidth heisst "wie in
// der Device-Map". MapTap legt fest, was ein Klick auf ein Geraet tut.
MapWiring string `json:"map_wiring,omitempty"` // "on" | "off"
MapEnergy string `json:"map_energy,omitempty"` // "on" | "off"
MapBalance string `json:"map_balance,omitempty"` // "on" | "off"
MapData string `json:"map_data,omitempty"` // "on" | "off"
MapRoleEdges string `json:"map_role_edges,omitempty"` // "on" | "off"
MapAutomationLinks string `json:"map_automation_links,omitempty"` // "on" | "off"
MapEdgeStyle string `json:"map_edge_style,omitempty"` // "" | "curved" | "straight"
MapWidth string `json:"map_width,omitempty"` // "" | "on" | "off"
MapTap string `json:"map_tap,omitempty"` // "none" | "highlight" | "modal"

// entity_group, history_view: frei zusammengestellte Liste an Entitaeten - anders als
// Ref (ein einzelner Bezug) braucht dieser Typ mehrere. Title ist der
// einzige Item-Typ mit freiem Anzeigetext statt eines vom Ref
Expand Down Expand Up @@ -1080,6 +1094,15 @@ func cloneLayout(value Layout) Layout {
StatsPeriod: item.StatsPeriod,
StatsKPIs: append([]string(nil), item.StatsKPIs...),
StatsChart: item.StatsChart,
MapWiring: item.MapWiring,
MapEnergy: item.MapEnergy,
MapBalance: item.MapBalance,
MapData: item.MapData,
MapRoleEdges: item.MapRoleEdges,
MapAutomationLinks: item.MapAutomationLinks,
MapEdgeStyle: item.MapEdgeStyle,
MapWidth: item.MapWidth,
MapTap: item.MapTap,
EntityRefs: append([]string(nil), item.EntityRefs...),
Title: item.Title,
Display: item.Display,
Expand Down Expand Up @@ -2843,6 +2866,28 @@ func normalizeEnergyGraphicOptions(item *Item) {
item.StatsPeriod, item.StatsKPIs, item.StatsChart = "", nil, ""
}

// device_map: jeder Schalter faellt auf seine Vorgabe, Stil und Breite
// bleiben leer, wenn sie leer sind ("wie in der Device-Map"). Andere
// Typen tragen keine Map-Felder.
if item.Type == "device_map" {
defaultString(&item.MapWiring, []string{"on", "off"}, "off")
defaultString(&item.MapEnergy, []string{"on", "off"}, "on")
defaultString(&item.MapBalance, []string{"on", "off"}, "on")
defaultString(&item.MapData, []string{"on", "off"}, "off")
defaultString(&item.MapRoleEdges, []string{"on", "off"}, "off")
defaultString(&item.MapAutomationLinks, []string{"on", "off"}, "off")
if item.MapEdgeStyle != "" {
defaultString(&item.MapEdgeStyle, []string{"curved", "straight"}, "")
}
if item.MapWidth != "" {
defaultString(&item.MapWidth, []string{"on", "off"}, "")
}
defaultString(&item.MapTap, []string{"none", "highlight", "modal"}, "highlight")
} else {
item.MapWiring, item.MapEnergy, item.MapBalance, item.MapData = "", "", "", ""
item.MapRoleEdges, item.MapAutomationLinks, item.MapEdgeStyle, item.MapWidth, item.MapTap = "", "", "", "", ""
}

// history_view: gebunden (Ref gesetzt) liefert die Sicht Serien, Zeitraum,
// Kennwert und Namen - die Kachel traegt nichts davon selbst. Ohne Ref
// fuellt defaultString die beiden Enums, die Serienliste bleibt wie sie
Expand Down
54 changes: 54 additions & 0 deletions dashboard/internal/settings/settings_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3319,3 +3319,57 @@ func TestLearningMinutesPauseModeIsAccepted(t *testing.T) {
t.Fatal("learning_ha_reconcile_disabled defaults to true, want false")
}
}

// device_map: Vorgaben, unbekannte Werte und Klon der Map-Felder.
func TestNormalizeDeviceMapDefaults(t *testing.T) {
layout := normalizeLayout(Layout{Version: 3, Pages: []Page{{ID: "p", Name: "P", Groups: []Group{{
ID: "g", Name: "G", Items: []Item{{ID: "m", Type: "device_map", Span: "full", Visible: true}},
}}}}})
item := layout.Pages[0].Groups[0].Items[0]
want := [9]string{"off", "on", "on", "off", "off", "off", "", "", "highlight"}
got := [9]string{item.MapWiring, item.MapEnergy, item.MapBalance, item.MapData, item.MapRoleEdges, item.MapAutomationLinks, item.MapEdgeStyle, item.MapWidth, item.MapTap}
if got != want {
t.Fatalf("device_map defaults = %q, want %q", got, want)
}
}

func TestNormalizeDeviceMapUnknownValues(t *testing.T) {
layout := normalizeLayout(Layout{Version: 3, Pages: []Page{{ID: "p", Name: "P", Groups: []Group{{
ID: "g", Name: "G", Items: []Item{{ID: "m", Type: "device_map", Span: "full", Visible: true,
MapTap: "zoom", MapEdgeStyle: "wavy", MapWidth: "maybe", MapData: "yes"}},
}}}}})
item := layout.Pages[0].Groups[0].Items[0]
if item.MapTap != "highlight" || item.MapEdgeStyle != "" || item.MapWidth != "" || item.MapData != "off" {
t.Fatalf("unknown values = tap %q, edge %q, width %q, data %q; want highlight, \"\", \"\", off",
item.MapTap, item.MapEdgeStyle, item.MapWidth, item.MapData)
}
}

func TestNormalizeClearsMapFieldsOnOtherTypes(t *testing.T) {
layout := normalizeLayout(Layout{Version: 3, Pages: []Page{{ID: "p", Name: "P", Groups: []Group{{
ID: "g", Name: "G", Items: []Item{{ID: "s", Type: "energy_stats", Span: "1", Visible: true, MapTap: "modal", MapWiring: "on", MapEdgeStyle: "curved", MapWidth: "on"}},
}}}}})
item := layout.Pages[0].Groups[0].Items[0]
if item.MapWiring != "" || item.MapEnergy != "" || item.MapBalance != "" || item.MapData != "" || item.MapRoleEdges != "" || item.MapAutomationLinks != "" || item.MapEdgeStyle != "" || item.MapWidth != "" || item.MapTap != "" {
t.Fatalf("fremder Typ traegt Map-Felder: %+v", item)
}
}

func TestDeviceMapLayoutValidates(t *testing.T) {
layout := Layout{Version: 3, Pages: []Page{{ID: "p", Name: "P", Groups: []Group{{
ID: "g", Name: "G", Items: []Item{{ID: "m", Type: "device_map", Span: "full", Visible: true,
MapWiring: "on", MapEnergy: "off", MapBalance: "off", MapData: "on", MapRoleEdges: "on",
MapAutomationLinks: "on", MapEdgeStyle: "straight", MapWidth: "off", MapTap: "modal"}},
}}}}}
if err := validateLayout(layout); err != nil {
t.Fatalf("validateLayout: %v", err)
}
before := cloneLayout(layout)
after := cloneLayout(normalizeLayout(layout))
if !reflect.DeepEqual(before, after) {
t.Fatalf("Klon veraendert device_map: before %+v, after %+v", before, after)
}
if !reflect.DeepEqual(layout, cloneLayout(layout)) {
t.Fatal("cloneLayout verliert device_map-Felder")
}
}
8 changes: 8 additions & 0 deletions dashboard/internal/webui/cache-bust-history.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
version,date,asset,v,note
v0.12.1-pre.2,2026-12-03,css/base.css,57,
v0.12.1-pre.2,2026-12-03,css/manager.css,55,
v0.12.1-pre.2,2026-12-03,js/dashboard.js,58,
v0.12.1-pre.2,2026-12-03,js/devicemap-card.js,1,
v0.12.1-pre.2,2026-12-03,js/devicemap-live.js,1,
v0.12.1-pre.2,2026-12-03,js/devicemap-viewport.js,1,
v0.12.1-pre.2,2026-12-03,js/energy-plant.js,8,
v0.12.1-pre.2,2026-12-03,js/layout-editor.js,20,
v0.12.1-pre.1,2026-12-03,css/base.css,56,
v0.12.1-pre.1,2026-12-03,css/onboarding.css,9,
v0.12.1-pre.1,2026-12-03,css/settings-controls.css,23,
Expand Down
22 changes: 22 additions & 0 deletions dashboard/internal/webui/catalogs/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -2135,6 +2135,12 @@
"device_icon_category.mobility": "Mobilität",
"device_icon_category.storage": "Speicher",
"device_icon_category.switching": "Schalten und Steckdosen",
"device_map.aria": "Anlage, Live-Ansicht der Geräte und Energieflüsse",
"device_map.fit": "Einpassen",
"device_map.hint.two_fingers": "Zum Bewegen zwei Finger",
"device_map.hint.wheel": "Strg + Mausrad zum Zoomen",
"device_map.hint.wheel_mac": "⌘ + Mausrad zum Zoomen",
"device_map.title": "Anlage",
"device_picker.confirm.one": "{n} übernehmen",
"device_picker.confirm.other": "{n} übernehmen",
"device_picker.confirm_none": "Übernehmen",
Expand Down Expand Up @@ -3549,6 +3555,8 @@
"layout_editor.card.battery_status.description": "Vorrat und Restlaufzeit",
"layout_editor.card.battery_status.title": "Speicher: Statuskarte",
"layout_editor.card.device.description": "Gerät",
"layout_editor.card.device_map.description": "Die Anordnung der Device-Map mit Live-Werten und Energiefluss",
"layout_editor.card.device_map.title": "Device-Map",
"layout_editor.card.diagnostics.description": "Diagnosen",
"layout_editor.card.diagnostics.title": "Diagnosen",
"layout_editor.card.energy_band.description": "Bilanzband",
Expand Down Expand Up @@ -3587,6 +3595,12 @@
"layout_editor.device.display_label": "Darstellung",
"layout_editor.device.label": "Gerät: {name}",
"layout_editor.device.ref_label": "Gerät",
"layout_editor.device_map.automation_links": "Automationslinks",
"layout_editor.device_map.edge_style": "Kantenstil",
"layout_editor.device_map.layers": "Ebenen",
"layout_editor.device_map.role_edges": "Rollenkanten",
"layout_editor.device_map.tap": "Antippen eines Geräts",
"layout_editor.device_map.width": "Linienbreite nach Leistung",
"layout_editor.energy_band.animate": "Fluss animieren",
"layout_editor.energy_band.bundle_threshold": "Kleinstflüsse",
"layout_editor.energy_band.height_reference": "Höhenbezug",
Expand Down Expand Up @@ -3664,6 +3678,8 @@
"layout_editor.option.display_size.s": "S",
"layout_editor.option.display_size.xl": "XL",
"layout_editor.option.display_size.xs": "XS",
"layout_editor.option.edge_curved": "Gebogen",
"layout_editor.option.edge_straight": "Gerade",
"layout_editor.option.entity_labels.entity": "Leistung + Entität",
"layout_editor.option.entity_labels.power": "nur Leistung",
"layout_editor.option.flow_scale.speed": "Animationsgeschwindigkeit",
Expand All @@ -3679,6 +3695,9 @@
"layout_editor.option.label_mode.abs": "Absolutwerte",
"layout_editor.option.label_mode.both": "beides",
"layout_editor.option.label_mode.pct": "Prozent",
"layout_editor.option.map_follow": "Wie in der Device-Map",
"layout_editor.option.off": "Aus",
"layout_editor.option.on": "An",
"layout_editor.option.scale_mode.linear": "linear (echte Anteile)",
"layout_editor.option.scale_mode.sqrt": "Wurzel (kleine sichtbar)",
"layout_editor.option.sort.fixed": "feste Reihenfolge",
Expand All @@ -3691,6 +3710,9 @@
"layout_editor.option.stats_period.last": "zuletzt gewählter",
"layout_editor.option.stroke_mode.const": "konstant",
"layout_editor.option.stroke_mode.power": "nach Leistung",
"layout_editor.option.tap_highlight": "Hervorheben",
"layout_editor.option.tap_modal": "Geräte-Modal öffnen",
"layout_editor.option.tap_none": "Nichts",
"layout_editor.option.unit.auto": "automatisch",
"layout_editor.option.unit.kw": "immer kW",
"layout_editor.option.unit.w": "immer W",
Expand Down
Loading
Loading