diff --git a/backend/app/service/clam.go b/backend/app/service/clam.go index 885156d01..cb1b82a15 100644 --- a/backend/app/service/clam.go +++ b/backend/app/service/clam.go @@ -634,8 +634,7 @@ func handleAlert(stdout, clamName string, clamId uint) { lines := strings.Split(stdout, "\n") for _, line := range lines { if strings.HasPrefix(line, "Infected files: ") { - var infectedFiles = 0 - infectedFiles, _ = strconv.Atoi(strings.TrimPrefix(line, "Infected files: ")) + infectedFiles, _ := strconv.Atoi(strings.TrimPrefix(line, "Infected files: ")) if infectedFiles > 0 { pushAlert := dto.PushAlert{ TaskName: clamName, diff --git a/backend/app/service/image.go b/backend/app/service/image.go index 7c6e90570..f860df59e 100644 --- a/backend/app/service/image.go +++ b/backend/app/service/image.go @@ -432,7 +432,7 @@ func (u *ImageService) ImageRemove(req dto.BatchDelete) error { } defer client.Close() for _, id := range req.Names { - if _, err := client.ImageRemove(context.TODO(), id, types.ImageRemoveOptions{Force: req.Force, PruneChildren: true}); err != nil { + if _, err := client.ImageRemove(context.TODO(), id, image.RemoveOptions{Force: req.Force, PruneChildren: true}); err != nil { if strings.Contains(err.Error(), "image is being used") || strings.Contains(err.Error(), "is using") { if strings.Contains(id, "sha256:") { return buserr.New(constant.ErrObjectInUsed) diff --git a/backend/app/service/snapshot.go b/backend/app/service/snapshot.go index 082033085..75e24be0b 100644 --- a/backend/app/service/snapshot.go +++ b/backend/app/service/snapshot.go @@ -441,16 +441,7 @@ func rebuildAllAppInstall() error { go func(app model.AppInstall) { defer wg.Done() dockerComposePath := app.GetComposePath() - out, err := compose.Down(dockerComposePath) - if err != nil { - _ = handleErr(app, err, out) - return - } - out, err = compose.Up(dockerComposePath) - if err != nil { - _ = handleErr(app, err, out) - return - } + _, _ = compose.Up(dockerComposePath) app.Status = constant.Running _ = appInstallRepo.Save(context.Background(), &app) }(appInstalls[i]) diff --git a/frontend/src/components/upload/index.vue b/frontend/src/components/upload/index.vue index bac858635..4052ff72f 100644 --- a/frontend/src/components/upload/index.vue +++ b/frontend/src/components/upload/index.vue @@ -186,11 +186,11 @@ const acceptParams = async (params: DialogProps): Promise => { break; case 'website': title.value = name.value; - baseDir.value = `${pathRes.data}/uploads/database/${type.value}/${detailName.value}/`; + baseDir.value = `${pathRes.data}/uploads/website/${type.value}/${detailName.value}/`; break; case 'app': title.value = name.value; - baseDir.value = `${pathRes.data}/uploads/database/${type.value}/${name.value}/`; + baseDir.value = `${pathRes.data}/uploads/app/${type.value}/${name.value}/`; } upVisible.value = true; search(); diff --git a/frontend/src/layout/components/AppFooter.vue b/frontend/src/layout/components/AppFooter.vue index 83ed63f08..76ba5bcd1 100644 --- a/frontend/src/layout/components/AppFooter.vue +++ b/frontend/src/layout/components/AppFooter.vue @@ -2,7 +2,7 @@