fix(webconsole): fix #17822 (#17837)

This commit is contained in:
屈轩
2023-08-23 19:39:44 +08:00
committed by GitHub
parent 40177de2dc
commit 07b9e87f74
2 changed files with 2 additions and 3 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ type WebConsoleOptions struct {
IpmitoolPath string `help:"ipmitool binary path used to connect baremetal sol" default:"/usr/bin/ipmitool"`
EnableAutoLogin bool `help:"allow webconsole to log in directly with the cloudroot public key" default:"false"`
ApsaraConsoleAddr string `help:"Apsara console addr" default:"https://xxxx.com.cn/module/ecs/vnc/index.html"`
AliyunVncVersion string `help:"Aliyun vnc version" default:"0.0.8"`
AliyunConsoleAddr string `help:"Aliyun vnc addr" default:"https://ecs.console.aliyun.com/vnc/index.htm"`
SshSessionTimeoutMinutes int `help:"ssh timeout session" default:"-1"`
}
+1 -2
View File
@@ -161,14 +161,13 @@ func (info *RemoteConsoleInfo) getAliyunURL() (string, error) {
if info.OsName == "Windows" {
isWindows = "true"
}
base := fmt.Sprintf("https://g.alicdn.com/aliyun/ecs-console-vnc2/%s/index.html", options.Options.AliyunVncVersion)
params := url.Values{
"vncUrl": {info.Url},
"instanceId": {info.InstanceId},
"isWindows": {isWindows},
"password": {info.Password},
}
return info.getConnParamsURL(base, params), nil
return info.getConnParamsURL(options.Options.AliyunConsoleAddr, params), nil
}
func (info *RemoteConsoleInfo) getCloudpodsURL() (string, error) {