From 9293cdef3e6b361565a0f983fca62d87e5eaafb1 Mon Sep 17 00:00:00 2001 From: Maschga <88616799+Maschga@users.noreply.github.com> Date: Tue, 17 Feb 2026 10:47:43 +0100 Subject: [PATCH] chore: use yamlsource (#27466) Co-authored-by: Michael Geers --- api/globalconfig/types.go | 14 ++++++++--- assets/js/components/Config/EebusModal.vue | 9 +++++-- assets/js/components/Config/HemsModal.vue | 5 +++- assets/js/components/Config/SponsorModal.vue | 2 +- .../js/components/Savings/Sponsor.stories.ts | 4 --- assets/js/components/Savings/Sponsor.vue | 1 - .../Savings/SponsorTokenExpires.vue | 6 ++--- .../js/components/Top/Navigation.stories.ts | 2 +- assets/js/types/evcc.ts | 25 ++++++++----------- assets/js/views/Config.vue | 4 +-- cmd/root.go | 16 ++++++------ cmd/setup.go | 15 +++++------ server/http_config_site_other_handler.go | 8 +++--- 13 files changed, 60 insertions(+), 51 deletions(-) diff --git a/api/globalconfig/types.go b/api/globalconfig/types.go index 4925bae63..036670214 100644 --- a/api/globalconfig/types.go +++ b/api/globalconfig/types.go @@ -20,11 +20,19 @@ import ( // ConfigStatus for publishing config, status and source to UI and external systems type ConfigStatus struct { - Config any `json:"config,omitempty"` - Status any `json:"status,omitempty"` - FromYaml bool `json:"fromYaml,omitempty"` + Config any `json:"config,omitempty"` + Status any `json:"status,omitempty"` + YamlSource YamlSource `json:"yamlSource,omitempty"` } +type YamlSource string + +const ( + YamlSourceFile YamlSource = "file" + YamlSourceDb YamlSource = "db" + YamlSourceNone YamlSource = "" +) + type All struct { Network Network Ocpp ocpp.Config diff --git a/assets/js/components/Config/EebusModal.vue b/assets/js/components/Config/EebusModal.vue index b1ca92561..924fae33e 100644 --- a/assets/js/components/Config/EebusModal.vue +++ b/assets/js/components/Config/EebusModal.vue @@ -119,7 +119,7 @@