mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 22:18:07 +08:00
fix: 限制应用失败情况下启动应用 (#1020)
This commit is contained in:
parent
7d08875f95
commit
0157326d61
@ -859,8 +859,8 @@ func (w WebsiteService) OpWebsiteLog(req request.WebsiteLogReq) (*response.Websi
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if fileInfo.Size() > 10*1024*1024 {
|
if fileInfo.Size() > 10<<20 {
|
||||||
return nil, buserr.New(constant.ErrFileTooLarge)
|
return nil, buserr.New(constant.ErrFileToLarge)
|
||||||
}
|
}
|
||||||
fileInfo.Size()
|
fileInfo.Size()
|
||||||
content, err := os.ReadFile(filePath)
|
content, err := os.ReadFile(filePath)
|
||||||
|
@ -89,7 +89,6 @@ var (
|
|||||||
ErrLinkPathNotFound = "ErrLinkPathNotFound"
|
ErrLinkPathNotFound = "ErrLinkPathNotFound"
|
||||||
ErrFileIsExit = "ErrFileIsExit"
|
ErrFileIsExit = "ErrFileIsExit"
|
||||||
ErrFileUpload = "ErrFileUpload"
|
ErrFileUpload = "ErrFileUpload"
|
||||||
ErrFileTooLarge = "ErrFileTooLarge"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// mysql
|
// mysql
|
||||||
|
@ -347,7 +347,7 @@ const buttons = [
|
|||||||
openOperate(row, 'start');
|
openOperate(row, 'start');
|
||||||
},
|
},
|
||||||
disabled: (row: any) => {
|
disabled: (row: any) => {
|
||||||
return row.status === 'Running';
|
return row.status === 'Running' || row.status === 'Error';
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user