diff --git a/backend/app/service/app.go b/backend/app/service/app.go index d10ecb7e5..a6af9e5d3 100644 --- a/backend/app/service/app.go +++ b/backend/app/service/app.go @@ -271,7 +271,7 @@ func (a AppService) Install(ctx context.Context, req request.AppInstallCreate) ( app model.App ) for key := range req.Params { - if !strings.Contains(key, "PORT") { + if !strings.Contains(key, "PANEL_APP_PORT") { continue } var port int diff --git a/backend/app/service/app_utils.go b/backend/app/service/app_utils.go index 59ca59e6d..4ed92c969 100644 --- a/backend/app/service/app_utils.go +++ b/backend/app/service/app_utils.go @@ -48,7 +48,20 @@ var ( func checkPort(key string, params map[string]interface{}) (int, error) { port, ok := params[key] if ok { - portN := int(math.Ceil(port.(float64))) + portN := 0 + var err error + switch p := port.(type) { + case string: + portN, err = strconv.Atoi(p) + if err != nil { + return portN, nil + } + case float64: + portN = int(math.Ceil(p)) + case int: + portN = p + } + oldInstalled, _ := appInstallRepo.ListBy(appInstallRepo.WithPort(portN)) if len(oldInstalled) > 0 { var apps []string diff --git a/frontend/src/views/host/process/network/index.vue b/frontend/src/views/host/process/network/index.vue index 655ab6ec5..425bdaf35 100644 --- a/frontend/src/views/host/process/network/index.vue +++ b/frontend/src/views/host/process/network/index.vue @@ -166,7 +166,6 @@ const onMessage = (message: any) => { }; const filterByStatus = () => { - console.log(sortConfig.filters); if (sortConfig.filters.length > 0) { const newData = oldData.value.filter((re: any) => { return (sortConfig.filters as string[]).indexOf(re.status) > -1;