v1.2优化服务器配置

增加登录账户设置
增加密码登录验证
This commit is contained in:
郝大全
2017-08-17 13:07:23 +08:00
parent 3c87908dde
commit 441aecdb16
7 changed files with 127 additions and 20 deletions

View File

@@ -53,6 +53,7 @@ func (this *ServerController) Add() {
if this.isPost() {
server := new(models.TaskServer)
server.ServerName = strings.TrimSpace(this.GetString("server_name"))
server.ServerAccount = strings.TrimSpace(this.GetString("server_account"))
server.ServerIp = strings.TrimSpace(this.GetString("server_ip"))
server.Port,_= strconv.Atoi(this.GetString("port"))
server.Type,_ = strconv.Atoi(this.GetString("type"))
@@ -82,6 +83,7 @@ func (this *ServerController) Edit() {
if this.isPost() {
server.ServerName = strings.TrimSpace(this.GetString("server_name"))
server.ServerAccount = strings.TrimSpace(this.GetString("server_account"))
server.ServerIp = strings.TrimSpace(this.GetString("server_ip"))
server.Port,_ = strconv.Atoi(this.GetString("port"))
server.Type,_ = strconv.Atoi(this.GetString("type"))