diff --git a/.gitignore b/.gitignore index e4589c5..6a9be13 100644 --- a/.gitignore +++ b/.gitignore @@ -26,10 +26,6 @@ bin/apibox .vscode/tasks.json -bin/apibox - -run -*/run.go /bin/apibox log/ src/github.com/ diff --git a/bin/compile b/bin/compile new file mode 100755 index 0000000..33fd6ed --- /dev/null +++ b/bin/compile @@ -0,0 +1,5 @@ +#!/bin/bash + +GOPATH=/home/cczdev/workspaces/webconsole + +(cd $GOPATH/src/apibox.club/apibox; GOPATH=$GOPATH go build; mv apibox $GOPATH/bin) diff --git a/src/apibox.club/website/console.go b/src/apibox.club/website/console.go index a4eba4a..d691f5d 100644 --- a/src/apibox.club/website/console.go +++ b/src/apibox.club/website/console.go @@ -366,12 +366,11 @@ func (c *Console) ConsoleMainPage(w http.ResponseWriter, r *http.Request) { user_name := strings.TrimSpace(de_vm_info_arr[0]) user_pwd := strings.TrimSpace(de_vm_info_arr[1]) vm_addr := strings.TrimSpace(de_vm_info_arr[2]) - vm_time := strings.TrimSpace(de_vm_info_arr[3]) + vm_time := strings.TrimSpace(de_vm_info_arr[3]) now := time.Now() - start, _ := time.Parse("2006-01-02 15:04:05", vm_time) - du, _ := time.ParseDuration("-8h") - start = start.Add(du) //("2006-01-02 15:04:05") + start, _ := time.Parse(Time.RFC3339, vm_time) + url_timeout, err := time.ParseDuration(Conf.Web.UrlTimeout) if nil != err { url_timeout, _ = time.ParseDuration("60s") @@ -403,10 +402,10 @@ func (c *Console) ConsoleLogin(w http.ResponseWriter, r *http.Request) { user_name := ctx.GetFormValue("user_name") user_pwd := ctx.GetFormValue("user_pwd") vm_addr := ctx.GetFormValue("vm_addr") - vm_cid := ctx.GetFormValue("vm_cid") - vm_time := time.Now().Format("2006-01-02 15:04:05") + vm_cid := ctx.GetFormValue("vm_cid") + vm_time := time.Now().Format(Time.RFC3339) - apibox.Log_Debug(user_name,user_pwd,vm_addr,vm_cid,vm_time) + apibox.Log_Debug(user_name,user_pwd,vm_addr,vm_cid,vm_time) if vm_cid == "" { vm_cid = "none" @@ -443,7 +442,7 @@ func (c *Console) ConsoleLogin(w http.ResponseWriter, r *http.Request) { ssh_info = append(ssh_info, user_name) ssh_info = append(ssh_info, user_pwd) ssh_info = append(ssh_info, vm_addr) - ssh_info = append(ssh_info, vm_time) + ssh_info = append(ssh_info, vm_time) ssh_info = append(ssh_info, vm_cid) b64_ssh_info, err := apibox.AESEncode(strings.Join(ssh_info, "\n"), aesKey) if nil != err { diff --git a/static/images/favicon.ico b/static/images/favicon.ico index 3a5dfb1..26583dd 100644 Binary files a/static/images/favicon.ico and b/static/images/favicon.ico differ diff --git a/static/images/favicon.ico.bak b/static/images/favicon.ico.bak new file mode 100644 index 0000000..3a5dfb1 Binary files /dev/null and b/static/images/favicon.ico.bak differ diff --git a/template/default/login.html b/template/default/login.html index c129c02..75bc924 100644 --- a/template/default/login.html +++ b/template/default/login.html @@ -138,4 +138,4 @@