阶段性提交

This commit is contained in:
刘祥超
2020-08-21 12:32:16 +08:00
parent d15ff6b246
commit 145f0580fb
181 changed files with 4897 additions and 218 deletions

View File

@@ -0,0 +1,35 @@
package servers
import (
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/iwind/TeaGo/actions"
"github.com/iwind/TeaGo/maps"
)
type AddServerNamePopupAction struct {
actionutils.ParentAction
}
func (this *AddServerNamePopupAction) Init() {
this.Nav("", "", "")
}
func (this *AddServerNamePopupAction) RunGet(params struct{}) {
this.Show()
}
func (this *AddServerNamePopupAction) RunPost(params struct {
ServerName string
Must *actions.Must
}) {
params.Must.
Field("serverName", params.ServerName).
Require("请输入域名")
this.Data["serverName"] = maps.Map{
"name": params.ServerName,
"type": "full",
}
this.Success()
}