feat: 修改非 PHP 运行环境网站的删除提示 (#6189)

pull/6190/head
zhengkunwang 2024-08-20 17:42:47 +08:00 committed by GitHub
parent 07562c203a
commit e0a5e14978
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 9 additions and 4 deletions

View File

@ -31,6 +31,7 @@ type WebsiteRes struct {
SSLExpireDate time.Time `json:"sslExpireDate"`
SSLStatus string `json:"sslStatus"`
AppInstallID uint `json:"appInstallId"`
RuntimeType string `json:"runtimeType"`
}
type WebsiteOption struct {

View File

@ -141,6 +141,7 @@ func (w WebsiteService) PageWebsite(req request.WebsiteSearch) (int64, []respons
var (
appName string
runtimeName string
runtimeType string
appInstallID uint
)
switch web.Type {
@ -157,6 +158,7 @@ func (w WebsiteService) PageWebsite(req request.WebsiteSearch) (int64, []respons
return 0, nil, err
}
runtimeName = runtime.Name
runtimeType = runtime.Type
appInstallID = runtime.ID
}
sitePath := path.Join(constant.AppInstallDir, constant.AppOpenresty, nginxInstall.Name, "www", "sites", web.Alias)
@ -177,6 +179,7 @@ func (w WebsiteService) PageWebsite(req request.WebsiteSearch) (int64, []respons
RuntimeName: runtimeName,
SitePath: sitePath,
AppInstallID: appInstallID,
RuntimeType: runtimeType,
})
}
return total, websiteDTOs, nil

View File

@ -31,6 +31,7 @@ export namespace Website {
sitePath: string;
appName: string;
runtimeName: string;
runtimeType: string;
}
export interface WebsiteRes extends CommonModel {
protocol: string;

View File

@ -174,6 +174,8 @@ const getContent = (pre: boolean) => {
}
end.value = res.data.end;
content.value = logs.value.join('\n');
emit('update:hasContent', content.value !== '');
nextTick(() => {
if (pre) {
@ -199,7 +201,6 @@ const getContent = (pre: boolean) => {
}
isLoading.value = false;
content.value = logs.value.join('\n');
});
};

View File

@ -32,7 +32,6 @@
ref="logRef"
:config="logConfig"
:default-button="false"
v-if="showLog"
v-model:loading="loading"
v-model:hasContent="hasContent"
:style="'height: calc(100vh - 370px);min-height: 200px'"

View File

@ -80,14 +80,14 @@ const handleClose = () => {
em('close', false);
};
const acceptParams = async (website: Website.Website) => {
const acceptParams = async (website: Website.WebsiteDTO) => {
deleteReq.value = {
id: 0,
deleteApp: false,
deleteBackup: false,
forceDelete: false,
};
if (website.type === 'runtime' && website.appInstallId > 0) {
if (website.type === 'runtime' && website.appInstallId > 0 && website.runtimeType == 'php') {
runtimeApp.value = true;
deleteReq.value.deleteApp = true;
}