mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-03-15 02:04:46 +08:00
feat: 修改非 PHP 运行环境网站的删除提示 (#6189)
This commit is contained in:
parent
07562c203a
commit
e0a5e14978
@ -31,6 +31,7 @@ type WebsiteRes struct {
|
|||||||
SSLExpireDate time.Time `json:"sslExpireDate"`
|
SSLExpireDate time.Time `json:"sslExpireDate"`
|
||||||
SSLStatus string `json:"sslStatus"`
|
SSLStatus string `json:"sslStatus"`
|
||||||
AppInstallID uint `json:"appInstallId"`
|
AppInstallID uint `json:"appInstallId"`
|
||||||
|
RuntimeType string `json:"runtimeType"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type WebsiteOption struct {
|
type WebsiteOption struct {
|
||||||
|
@ -141,6 +141,7 @@ func (w WebsiteService) PageWebsite(req request.WebsiteSearch) (int64, []respons
|
|||||||
var (
|
var (
|
||||||
appName string
|
appName string
|
||||||
runtimeName string
|
runtimeName string
|
||||||
|
runtimeType string
|
||||||
appInstallID uint
|
appInstallID uint
|
||||||
)
|
)
|
||||||
switch web.Type {
|
switch web.Type {
|
||||||
@ -157,6 +158,7 @@ func (w WebsiteService) PageWebsite(req request.WebsiteSearch) (int64, []respons
|
|||||||
return 0, nil, err
|
return 0, nil, err
|
||||||
}
|
}
|
||||||
runtimeName = runtime.Name
|
runtimeName = runtime.Name
|
||||||
|
runtimeType = runtime.Type
|
||||||
appInstallID = runtime.ID
|
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)
|
||||||
@ -177,6 +179,7 @@ func (w WebsiteService) PageWebsite(req request.WebsiteSearch) (int64, []respons
|
|||||||
RuntimeName: runtimeName,
|
RuntimeName: runtimeName,
|
||||||
SitePath: sitePath,
|
SitePath: sitePath,
|
||||||
AppInstallID: appInstallID,
|
AppInstallID: appInstallID,
|
||||||
|
RuntimeType: runtimeType,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return total, websiteDTOs, nil
|
return total, websiteDTOs, nil
|
||||||
|
@ -31,6 +31,7 @@ export namespace Website {
|
|||||||
sitePath: string;
|
sitePath: string;
|
||||||
appName: string;
|
appName: string;
|
||||||
runtimeName: string;
|
runtimeName: string;
|
||||||
|
runtimeType: string;
|
||||||
}
|
}
|
||||||
export interface WebsiteRes extends CommonModel {
|
export interface WebsiteRes extends CommonModel {
|
||||||
protocol: string;
|
protocol: string;
|
||||||
|
@ -174,6 +174,8 @@ const getContent = (pre: boolean) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
end.value = res.data.end;
|
end.value = res.data.end;
|
||||||
|
content.value = logs.value.join('\n');
|
||||||
|
|
||||||
emit('update:hasContent', content.value !== '');
|
emit('update:hasContent', content.value !== '');
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
if (pre) {
|
if (pre) {
|
||||||
@ -199,7 +201,6 @@ const getContent = (pre: boolean) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
isLoading.value = false;
|
isLoading.value = false;
|
||||||
content.value = logs.value.join('\n');
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -32,7 +32,6 @@
|
|||||||
ref="logRef"
|
ref="logRef"
|
||||||
:config="logConfig"
|
:config="logConfig"
|
||||||
:default-button="false"
|
:default-button="false"
|
||||||
v-if="showLog"
|
|
||||||
v-model:loading="loading"
|
v-model:loading="loading"
|
||||||
v-model:hasContent="hasContent"
|
v-model:hasContent="hasContent"
|
||||||
:style="'height: calc(100vh - 370px);min-height: 200px'"
|
:style="'height: calc(100vh - 370px);min-height: 200px'"
|
||||||
|
@ -80,14 +80,14 @@ const handleClose = () => {
|
|||||||
em('close', false);
|
em('close', false);
|
||||||
};
|
};
|
||||||
|
|
||||||
const acceptParams = async (website: Website.Website) => {
|
const acceptParams = async (website: Website.WebsiteDTO) => {
|
||||||
deleteReq.value = {
|
deleteReq.value = {
|
||||||
id: 0,
|
id: 0,
|
||||||
deleteApp: false,
|
deleteApp: false,
|
||||||
deleteBackup: false,
|
deleteBackup: false,
|
||||||
forceDelete: false,
|
forceDelete: false,
|
||||||
};
|
};
|
||||||
if (website.type === 'runtime' && website.appInstallId > 0) {
|
if (website.type === 'runtime' && website.appInstallId > 0 && website.runtimeType == 'php') {
|
||||||
runtimeApp.value = true;
|
runtimeApp.value = true;
|
||||||
deleteReq.value.deleteApp = true;
|
deleteReq.value.deleteApp = true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user