mirror of https://github.com/1Panel-dev/1Panel
feat: 修改非 PHP 运行环境网站的删除提示 (#6189)
parent
07562c203a
commit
e0a5e14978
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -31,6 +31,7 @@ export namespace Website {
|
|||
sitePath: string;
|
||||
appName: string;
|
||||
runtimeName: string;
|
||||
runtimeType: string;
|
||||
}
|
||||
export interface WebsiteRes extends CommonModel {
|
||||
protocol: string;
|
||||
|
|
|
@ -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');
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -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'"
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue