[add] load dashboard

This commit is contained in:
Max 2022-12-19 16:31:19 +08:00
parent 98a6da979f
commit c65bc6cd17

View file

@ -8,6 +8,7 @@ import (
"github.com/yaoapp/yao/widgets/app"
"github.com/yaoapp/yao/widgets/chart"
"github.com/yaoapp/yao/widgets/component"
"github.com/yaoapp/yao/widgets/dashboard"
"github.com/yaoapp/yao/widgets/expression"
"github.com/yaoapp/yao/widgets/field"
"github.com/yaoapp/yao/widgets/form"
@ -75,6 +76,12 @@ func Load(cfg config.Config) error {
messages = append(messages, err.Error())
}
// dashboard widget
err = dashboard.LoadAndExport(cfg)
if err != nil {
messages = append(messages, err.Error())
}
if len(messages) > 0 {
err = fmt.Errorf(strings.Join(messages, ";\n"))
return err