diff --git a/cmd/ui/config/config.go b/cmd/ui/config/config.go index 1a3a5fd..4d8e8da 100644 --- a/cmd/ui/config/config.go +++ b/cmd/ui/config/config.go @@ -10,8 +10,12 @@ import ( ) type Config struct { - Endpoint string `yaml:"endpoint"` - WidgetRows []map[string]*widget.Widget `yaml:"widgets"` + Endpoint string `yaml:"endpoint"` + Widgets map[string]*widget.Widget `yaml:"widgets"` + + Dashboard struct { + Columns int `yaml:"columns"` + } `yaml:"dashboard"` } func Load(path string) (*Config, error) { @@ -32,13 +36,5 @@ func Load(path string) (*Config, error) { return nil, fmt.Errorf("parse yaml: %w", err) } - for _, row := range cfg.WidgetRows { - for _, w := range row { - if valid, err := w.IsValid(); !valid { - return nil, fmt.Errorf("widget '%s': %w", w.Title, err) - } - } - } - return &cfg, nil } diff --git a/cmd/ui/front/src/components/Dashboard.vue b/cmd/ui/front/src/components/Dashboard.vue index 6a9a64e..e3bc6dd 100644 --- a/cmd/ui/front/src/components/Dashboard.vue +++ b/cmd/ui/front/src/components/Dashboard.vue @@ -1,8 +1,12 @@ + + \ No newline at end of file diff --git a/cmd/ui/front/src/components/Widget.vue b/cmd/ui/front/src/components/Widget.vue index b8e8167..805feab 100644 --- a/cmd/ui/front/src/components/Widget.vue +++ b/cmd/ui/front/src/components/Widget.vue @@ -1,7 +1,8 @@