From d639e46bc740323b03d84d641abc1f9764787527 Mon Sep 17 00:00:00 2001 From: zhengkunwang <31820853+zhengkunwang223@users.noreply.github.com> Date: Tue, 6 Aug 2024 11:34:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=20PHP=20=E8=BF=90?= =?UTF-8?q?=E8=A1=8C=E7=8E=AF=E5=A2=83=E7=BD=91=E7=AB=99=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E4=B9=8B=E5=90=8E=E6=B2=A1=E6=9C=89=E5=88=A0=E9=99=A4=E5=BA=94?= =?UTF-8?q?=E7=94=A8=E7=9A=84=E9=97=AE=E9=A2=98=20(#6036)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/dto/response/website.go | 1 + backend/app/service/website.go | 8 ++++++-- frontend/src/lang/modules/en.ts | 4 ++++ frontend/src/lang/modules/tw.ts | 2 ++ frontend/src/lang/modules/zh.ts | 2 ++ frontend/src/views/app-store/detail/install/index.vue | 4 ++-- frontend/src/views/app-store/installed/upgrade/index.vue | 4 ++-- 7 files changed, 19 insertions(+), 6 deletions(-) diff --git a/backend/app/dto/response/website.go b/backend/app/dto/response/website.go index 8a31b69e8b55..17de036dab30 100644 --- a/backend/app/dto/response/website.go +++ b/backend/app/dto/response/website.go @@ -30,6 +30,7 @@ type WebsiteRes struct { RuntimeName string `json:"runtimeName"` SSLExpireDate time.Time `json:"sslExpireDate"` SSLStatus string `json:"sslStatus"` + AppInstallID uint `json:"appInstallId"` } type WebsiteOption struct { diff --git a/backend/app/service/website.go b/backend/app/service/website.go index 8e219de2c95f..cb71cb9f4e1f 100644 --- a/backend/app/service/website.go +++ b/backend/app/service/website.go @@ -139,8 +139,9 @@ func (w WebsiteService) PageWebsite(req request.WebsiteSearch) (int64, []respons } for _, web := range websites { var ( - appName string - runtimeName string + appName string + runtimeName string + appInstallID uint ) switch web.Type { case constant.Deployment: @@ -149,12 +150,14 @@ func (w WebsiteService) PageWebsite(req request.WebsiteSearch) (int64, []respons return 0, nil, err } appName = appInstall.Name + appInstallID = appInstall.ID case constant.Runtime: runtime, err := runtimeRepo.GetFirst(commonRepo.WithByID(web.RuntimeID)) if err != nil { return 0, nil, err } runtimeName = runtime.Name + appInstallID = runtime.ID } sitePath := path.Join(constant.AppInstallDir, constant.AppOpenresty, nginxInstall.Name, "www", "sites", web.Alias) @@ -173,6 +176,7 @@ func (w WebsiteService) PageWebsite(req request.WebsiteSearch) (int64, []respons SSLStatus: checkSSLStatus(web.WebsiteSSL.ExpireDate), RuntimeName: runtimeName, SitePath: sitePath, + AppInstallID: appInstallID, }) } return total, websiteDTOs, nil diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index cbc56dfd808c..3994c15d8e9b 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -1852,6 +1852,10 @@ const message = { useCustom: 'Customize docker-compose.yml', useCustomHelper: 'Using a custom docker-compose.yml file may cause the application upgrade to fail. If it is not necessary, do not check it', + diffHelper: + 'The left side is the old version, the right side is the new version. After editing, click to save the custom version', + pullImage: 'Pull Image', + pullImageHelper: 'Execute docker pull to pull the image before the application starts', }, website: { website: 'Website', diff --git a/frontend/src/lang/modules/tw.ts b/frontend/src/lang/modules/tw.ts index f4d7fc92b4ef..aae3a1526301 100644 --- a/frontend/src/lang/modules/tw.ts +++ b/frontend/src/lang/modules/tw.ts @@ -1720,6 +1720,8 @@ const message = { useCustom: '自訂 docker-compose.yml', useCustomHelper: '使用自訂 docker-compose.yml 文件,可能會導致應用程式升級失敗,如無必要,請勿勾選', diffHelper: '左側為舊版本,右側為新版,編輯之後點選使用自訂版本儲存', + pullImage: '拉取鏡像', + pullImageHelper: '在應用啟動之前執行 docker pull 來拉取鏡像', }, website: { website: '網站', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index d892ad79336c..8689b67951c9 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -1721,6 +1721,8 @@ const message = { useCustom: '自定义 docker-compose.yml', useCustomHelper: '使用自定义 docker-compose.yml 文件,可能会导致应用升级失败,如无必要,请勿勾选', diffHelper: '左侧为旧版本,右侧为新版,编辑之后点击使用自定义版本保存', + pullImage: '拉取镜像', + pullImageHelper: '在应用启动之前执行 docker pull 来拉取镜像', }, website: { website: '网站', diff --git a/frontend/src/views/app-store/detail/install/index.vue b/frontend/src/views/app-store/detail/install/index.vue index 43d475b48bd3..847b2bef2af8 100644 --- a/frontend/src/views/app-store/detail/install/index.vue +++ b/frontend/src/views/app-store/detail/install/index.vue @@ -109,8 +109,8 @@ {{ $t('app.editComposeHelper') }} - - {{ $t('container.forcePullHelper') }} + + {{ $t('app.pullImageHelper') }}
- - {{ $t('container.forcePullHelper') }} + + {{ $t('app.pullImageHelper') }}