diff --git a/backend/app/dto/response/website.go b/backend/app/dto/response/website.go index 17de036da..dfcc31ab8 100644 --- a/backend/app/dto/response/website.go +++ b/backend/app/dto/response/website.go @@ -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 { diff --git a/backend/app/service/website.go b/backend/app/service/website.go index e0738dfc8..e1460dca1 100644 --- a/backend/app/service/website.go +++ b/backend/app/service/website.go @@ -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 diff --git a/frontend/src/api/interface/website.ts b/frontend/src/api/interface/website.ts index 797b9b885..a7d7170b7 100644 --- a/frontend/src/api/interface/website.ts +++ b/frontend/src/api/interface/website.ts @@ -31,6 +31,7 @@ export namespace Website { sitePath: string; appName: string; runtimeName: string; + runtimeType: string; } export interface WebsiteRes extends CommonModel { protocol: string; diff --git a/frontend/src/components/log-file/index.vue b/frontend/src/components/log-file/index.vue index becbee84d..fdf84db8b 100644 --- a/frontend/src/components/log-file/index.vue +++ b/frontend/src/components/log-file/index.vue @@ -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'); }); }; diff --git a/frontend/src/views/log/system/index.vue b/frontend/src/views/log/system/index.vue index 4012c51b2..3b258920e 100644 --- a/frontend/src/views/log/system/index.vue +++ b/frontend/src/views/log/system/index.vue @@ -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'" diff --git a/frontend/src/views/website/website/delete/index.vue b/frontend/src/views/website/website/delete/index.vue index 424bdc781..391384c05 100644 --- a/frontend/src/views/website/website/delete/index.vue +++ b/frontend/src/views/website/website/delete/index.vue @@ -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; }