fix: 调整网元日志文件列表返回信息
This commit is contained in:
@@ -125,9 +125,14 @@ func (s *NeActionController) Files(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
total, rows, err := ssh.FileList(querys.Path, neInfo.IP, querys.Search)
|
||||
totalSize, rows, err := ssh.FileList(querys.Path, neInfo.IP, querys.Search)
|
||||
if err != nil {
|
||||
c.JSON(200, result.ErrMsg(err.Error()))
|
||||
c.JSON(200, result.Ok(map[string]any{
|
||||
"path": querys.Path,
|
||||
"totalSize": totalSize,
|
||||
"total": len(rows),
|
||||
"rows": []ssh.FileListRow{},
|
||||
}))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -145,8 +150,9 @@ func (s *NeActionController) Files(c *gin.Context) {
|
||||
}
|
||||
|
||||
c.JSON(200, result.Ok(map[string]any{
|
||||
"path": querys.Path,
|
||||
"total": total,
|
||||
"rows": splitRows,
|
||||
"path": querys.Path,
|
||||
"totalSize": totalSize,
|
||||
"total": lenNum,
|
||||
"rows": splitRows,
|
||||
}))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user