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