Skip to content

Commit

Permalink
fix: 解决部分应用参数数据库显示错误的问题 (1Panel-dev#6136)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengkunwang223 authored Aug 15, 2024
1 parent 266d589 commit 3fcb6ec
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions backend/app/service/app_install.go
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,22 @@ func (a *AppInstallService) GetParams(id uint) (*response.AppConfig, error) {
}
}
appParam.Values = form.Values
} else if form.Type == "apps" {
if m, ok := form.Child.(map[string]interface{}); ok {
result := make(map[string]string)
for key, value := range m {
if strVal, ok := value.(string); ok {
result[key] = strVal
}
}
if envKey, ok := result["envKey"]; ok {
serviceName := envs[envKey]
if serviceName != nil {
appInstall, _ := appInstallRepo.GetFirst(appInstallRepo.WithServiceName(serviceName.(string)))
appParam.ShowValue = appInstall.Name
}
}
}
}
params = append(params, appParam)
} else {
Expand Down

0 comments on commit 3fcb6ec

Please sign in to comment.