mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-03-14 01:34:47 +08:00
fix: 解决 PHP 运行环境网站删除之后没有删除应用的问题 (#6036)
This commit is contained in:
parent
fa633bf419
commit
d639e46bc7
@ -30,6 +30,7 @@ type WebsiteRes struct {
|
|||||||
RuntimeName string `json:"runtimeName"`
|
RuntimeName string `json:"runtimeName"`
|
||||||
SSLExpireDate time.Time `json:"sslExpireDate"`
|
SSLExpireDate time.Time `json:"sslExpireDate"`
|
||||||
SSLStatus string `json:"sslStatus"`
|
SSLStatus string `json:"sslStatus"`
|
||||||
|
AppInstallID uint `json:"appInstallId"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type WebsiteOption struct {
|
type WebsiteOption struct {
|
||||||
|
@ -139,8 +139,9 @@ func (w WebsiteService) PageWebsite(req request.WebsiteSearch) (int64, []respons
|
|||||||
}
|
}
|
||||||
for _, web := range websites {
|
for _, web := range websites {
|
||||||
var (
|
var (
|
||||||
appName string
|
appName string
|
||||||
runtimeName string
|
runtimeName string
|
||||||
|
appInstallID uint
|
||||||
)
|
)
|
||||||
switch web.Type {
|
switch web.Type {
|
||||||
case constant.Deployment:
|
case constant.Deployment:
|
||||||
@ -149,12 +150,14 @@ func (w WebsiteService) PageWebsite(req request.WebsiteSearch) (int64, []respons
|
|||||||
return 0, nil, err
|
return 0, nil, err
|
||||||
}
|
}
|
||||||
appName = appInstall.Name
|
appName = appInstall.Name
|
||||||
|
appInstallID = appInstall.ID
|
||||||
case constant.Runtime:
|
case constant.Runtime:
|
||||||
runtime, err := runtimeRepo.GetFirst(commonRepo.WithByID(web.RuntimeID))
|
runtime, err := runtimeRepo.GetFirst(commonRepo.WithByID(web.RuntimeID))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, nil, err
|
return 0, nil, err
|
||||||
}
|
}
|
||||||
runtimeName = runtime.Name
|
runtimeName = runtime.Name
|
||||||
|
appInstallID = runtime.ID
|
||||||
}
|
}
|
||||||
sitePath := path.Join(constant.AppInstallDir, constant.AppOpenresty, nginxInstall.Name, "www", "sites", web.Alias)
|
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),
|
SSLStatus: checkSSLStatus(web.WebsiteSSL.ExpireDate),
|
||||||
RuntimeName: runtimeName,
|
RuntimeName: runtimeName,
|
||||||
SitePath: sitePath,
|
SitePath: sitePath,
|
||||||
|
AppInstallID: appInstallID,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return total, websiteDTOs, nil
|
return total, websiteDTOs, nil
|
||||||
|
@ -1852,6 +1852,10 @@ const message = {
|
|||||||
useCustom: 'Customize docker-compose.yml',
|
useCustom: 'Customize docker-compose.yml',
|
||||||
useCustomHelper:
|
useCustomHelper:
|
||||||
'Using a custom docker-compose.yml file may cause the application upgrade to fail. If it is not necessary, do not check it',
|
'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: 'Website',
|
website: 'Website',
|
||||||
|
@ -1720,6 +1720,8 @@ const message = {
|
|||||||
useCustom: '自訂 docker-compose.yml',
|
useCustom: '自訂 docker-compose.yml',
|
||||||
useCustomHelper: '使用自訂 docker-compose.yml 文件,可能會導致應用程式升級失敗,如無必要,請勿勾選',
|
useCustomHelper: '使用自訂 docker-compose.yml 文件,可能會導致應用程式升級失敗,如無必要,請勿勾選',
|
||||||
diffHelper: '左側為舊版本,右側為新版,編輯之後點選使用自訂版本儲存',
|
diffHelper: '左側為舊版本,右側為新版,編輯之後點選使用自訂版本儲存',
|
||||||
|
pullImage: '拉取鏡像',
|
||||||
|
pullImageHelper: '在應用啟動之前執行 docker pull 來拉取鏡像',
|
||||||
},
|
},
|
||||||
website: {
|
website: {
|
||||||
website: '網站',
|
website: '網站',
|
||||||
|
@ -1721,6 +1721,8 @@ const message = {
|
|||||||
useCustom: '自定义 docker-compose.yml',
|
useCustom: '自定义 docker-compose.yml',
|
||||||
useCustomHelper: '使用自定义 docker-compose.yml 文件,可能会导致应用升级失败,如无必要,请勿勾选',
|
useCustomHelper: '使用自定义 docker-compose.yml 文件,可能会导致应用升级失败,如无必要,请勿勾选',
|
||||||
diffHelper: '左侧为旧版本,右侧为新版,编辑之后点击使用自定义版本保存',
|
diffHelper: '左侧为旧版本,右侧为新版,编辑之后点击使用自定义版本保存',
|
||||||
|
pullImage: '拉取镜像',
|
||||||
|
pullImageHelper: '在应用启动之前执行 docker pull 来拉取镜像',
|
||||||
},
|
},
|
||||||
website: {
|
website: {
|
||||||
website: '网站',
|
website: '网站',
|
||||||
|
@ -109,8 +109,8 @@
|
|||||||
<span class="input-help">{{ $t('app.editComposeHelper') }}</span>
|
<span class="input-help">{{ $t('app.editComposeHelper') }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item pro="pullImage">
|
<el-form-item pro="pullImage">
|
||||||
<el-checkbox v-model="req.pullImage" :label="$t('container.forcePull')" size="large" />
|
<el-checkbox v-model="req.pullImage" :label="$t('app.pullImage')" size="large" />
|
||||||
<span class="input-help">{{ $t('container.forcePullHelper') }}</span>
|
<span class="input-help">{{ $t('app.pullImageHelper') }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div v-if="req.editCompose">
|
<div v-if="req.editCompose">
|
||||||
<codemirror
|
<codemirror
|
||||||
|
@ -58,8 +58,8 @@
|
|||||||
</span>
|
</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item pro="pullImage" v-if="operateReq.operate === 'upgrade'">
|
<el-form-item pro="pullImage" v-if="operateReq.operate === 'upgrade'">
|
||||||
<el-checkbox v-model="operateReq.pullImage" :label="$t('container.forcePull')" size="large" />
|
<el-checkbox v-model="operateReq.pullImage" :label="$t('app.pullImage')" size="large" />
|
||||||
<span class="input-help">{{ $t('container.forcePullHelper') }}</span>
|
<span class="input-help">{{ $t('app.pullImageHelper') }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user