From 0ca96621d4daa3076b970ffd7438dbc91021ce78 Mon Sep 17 00:00:00 2001 From: CityFun <31820853+zhengkunwang223@users.noreply.github.com> Date: Tue, 4 Nov 2025 15:36:34 +0800 Subject: [PATCH] feat: Edit the application Compose content to add a comparison. (#10855) --- agent/app/dto/response/app.go | 3 ++- agent/app/service/app_install.go | 3 +++ frontend/src/api/interface/app.ts | 1 + .../app-store/installed/detail/index.vue | 27 ++++++++++++++----- .../app-store/installed/upgrade/index.vue | 10 +++---- 5 files changed, 31 insertions(+), 13 deletions(-) diff --git a/agent/app/dto/response/app.go b/agent/app/dto/response/app.go index d23922813..2102019f4 100644 --- a/agent/app/dto/response/app.go +++ b/agent/app/dto/response/app.go @@ -178,6 +178,7 @@ type AppParam struct { } type AppConfig struct { - Params []AppParam `json:"params"` + Params []AppParam `json:"params"` + RawCompose string `json:"rawCompose"` request.AppContainerConfig } diff --git a/agent/app/service/app_install.go b/agent/app/service/app_install.go index 031b8f311..2a724a6dc 100644 --- a/agent/app/service/app_install.go +++ b/agent/app/service/app_install.go @@ -796,6 +796,9 @@ func (a *AppInstallService) GetParams(id uint) (*response.AppConfig, error) { res.RestartPolicy = getRestartPolicy(install.DockerCompose) res.WebUI = install.WebUI res.Type = install.App.Type + if rawCompose, err := getUpgradeCompose(install, detail); err == nil { + res.RawCompose = rawCompose + } return &res, nil } diff --git a/frontend/src/api/interface/app.ts b/frontend/src/api/interface/app.ts index 2857a9fb9..b8826b968 100644 --- a/frontend/src/api/interface/app.ts +++ b/frontend/src/api/interface/app.ts @@ -270,6 +270,7 @@ export namespace App { export interface AppConfig { params: InstallParams[]; + rawCompose?: string; cpuQuota: number; memoryLimit: number; memoryUnit: string; diff --git a/frontend/src/views/app-store/installed/detail/index.vue b/frontend/src/views/app-store/installed/detail/index.vue index d455ad9e1..cdc8eb8fa 100644 --- a/frontend/src/views/app-store/installed/detail/index.vue +++ b/frontend/src/views/app-store/installed/detail/index.vue @@ -126,22 +126,26 @@ {{ $t('app.editComposeHelper') }}
+ + {{ $t('app.showDiff') }} +
+