mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-03-01 03:24:14 +08:00
fix: 解决 SSH 会话在多个连接下显示错误的问题 (#1525)
This commit is contained in:
parent
72dcdbad1e
commit
e507611cad
@ -789,6 +789,9 @@ func handleInstalled(appInstallList []model.AppInstall, updated bool) ([]respons
|
|||||||
versions = append(versions, detail.Version)
|
versions = append(versions, detail.Version)
|
||||||
}
|
}
|
||||||
versions = common.GetSortedVersions(versions)
|
versions = common.GetSortedVersions(versions)
|
||||||
|
if len(versions) == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
lastVersion := versions[0]
|
lastVersion := versions[0]
|
||||||
if common.IsCrossVersion(installed.Version, lastVersion) {
|
if common.IsCrossVersion(installed.Version, lastVersion) {
|
||||||
installDTO.CanUpdate = app.CrossVersionUpdate
|
installDTO.CanUpdate = app.CrossVersionUpdate
|
||||||
|
@ -275,6 +275,8 @@ func getSSHSessions(config SSHSessionConfig) (res []byte, err error) {
|
|||||||
if config.LoginIP != "" && !strings.Contains(user.Host, config.LoginIP) {
|
if config.LoginIP != "" && !strings.Contains(user.Host, config.LoginIP) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if terminal, err := proc.Cmdline(); err == nil {
|
||||||
|
if strings.Contains(terminal, user.Terminal) {
|
||||||
session := sshSession{
|
session := sshSession{
|
||||||
Username: user.User,
|
Username: user.User,
|
||||||
Host: user.Host,
|
Host: user.Host,
|
||||||
@ -288,6 +290,8 @@ func getSSHSessions(config SSHSessionConfig) (res []byte, err error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
res, err = json.Marshal(result)
|
res, err = json.Marshal(result)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user