增加API节点安装配置界面

This commit is contained in:
刘祥超
2020-10-11 10:51:13 +08:00
parent 3f793125ab
commit 21c8794f39
34 changed files with 553 additions and 156 deletions

View File

@@ -0,0 +1,15 @@
package profile
import "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
type IndexAction struct {
actionutils.ParentAction
}
func (this *IndexAction) Init() {
this.Nav("", "", "")
}
func (this *IndexAction) RunGet(params struct{}) {
this.Show()
}

View File

@@ -0,0 +1,18 @@
package profile
import (
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/settings/settingutils"
"github.com/TeaOSLab/EdgeAdmin/internal/web/helpers"
"github.com/iwind/TeaGo"
)
func init() {
TeaGo.BeforeStart(func(server *TeaGo.Server) {
server.
Helper(helpers.NewUserMustAuth()).
Helper(settingutils.NewHelper("database")).
Prefix("/settings/database").
Get("", new(IndexAction)).
EndAll()
})
}

View File

@@ -27,12 +27,13 @@ func (this *Helper) BeforeAction(actionPtr actions.ActionWrapper) (goNext bool)
tabbar := actionutils.NewTabbar()
tabbar.Add("管理界面", "", "/settings", "", this.tab == "console")
tabbar.Add("安全设置", "", "/settings/security", "", this.tab == "security")
tabbar.Add("API节点", "", "/api", "exchange", this.tab == "api")
tabbar.Add("日志数据库节点", "", "/db", "database", this.tab == "db")
tabbar.Add("数据库", "", "/settings/database", "", this.tab == "database")
tabbar.Add("API节点", "", "/api", "", this.tab == "apiNodes")
tabbar.Add("日志数据库", "", "/db", "", this.tab == "dbNodes")
tabbar.Add("备份", "", "/settings/backup", "", this.tab == "backup")
tabbar.Add("个人资料", "", "/settings/profile", "", this.tab == "profile")
tabbar.Add("登录设置", "", "/settings/login", "", this.tab == "login")
tabbar.Add("检查版本更新", "", "/settings/upgrade", "", this.tab == "upgrade")
tabbar.Add("检查版本", "", "/settings/upgrade", "", this.tab == "upgrade")
actionutils.SetTabbar(actionPtr, tabbar)
return