Merge pull request #297 from trheyi/main

[add] load dashboard
This commit is contained in:
Max 2022-12-19 16:32:14 +08:00 committed by GitHub
commit a988904ee5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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