mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-05 22:30:28 +08:00
36 lines
678 B
Go
36 lines
678 B
Go
|
|
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()
|
||
|
|
}
|