fix: 限制应用失败情况下启动应用 (#1020)

This commit is contained in:
zhengkunwang223
2023-05-12 22:30:02 +08:00
committed by GitHub
parent 7d08875f95
commit 0157326d61
3 changed files with 3 additions and 4 deletions
+2 -2
View File
@@ -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)
-1
View File
@@ -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';
},
},
{