* fix(dashboard): keep disk info working when a mount is stale or broken
The dashboard, the file manager mount list and the alert disk list
enumerated mounts with df. df calls statfs on every mount, so one bad
mount took the whole disk list down: the request hung until the
frontend timed out, or the list came back empty.
- enumerate mounts from /proc/self/mountinfo instead of running df
- read each mount through a guard with a 3s timeout that keeps at most
one call per mount in flight
- fail closed: a mount that cannot be read stays in the list with
errorType and error, and an unreadable mount table is an error
rather than an empty list
- show failed mounts and their reasons on the dashboard and in the
file manager
- cmd: after killing a timed-out command, wait at most 5s for it
instead of forever
* fix(dashboard): distinguish remounted and hidden filesystems
* fix(disk): simplify disk queries and bound timeout handling
* fix(disk): prevent overlapping df collection tasks
---------
Co-authored-by: ssongliu <sloooop1x@gmail.com>
* feat: Remote download supports server file name options and improves error handling
* feat: Remote download supports server file name options and improves error handling
* feat: enhance archiving and extraction capabilities with additional compression formats and ownership preservation
* feat: enhance archiving and extraction capabilities with additional compression formats and ownership preservation
* feat: enhance archiving and extraction capabilities with additional compression formats and ownership preservation
#### What this PR does / why we need it?
Refs https://github.com/1Panel-dev/1Panel/issues/12681
#### Summary of your change
#### Please indicate you've done the following:
- [ ] Made sure tests are passing and test coverage is added if needed.
- [ ] Made sure commit message follow the rule of [Conventional Commits specification](https://www.conventionalcommits.org/).
- [ ] Considered the docs impact and opened a new docs issue or PR with docs changes if needed.
`NewIFileService` returns the bare struct type `FileService`, but its
body returns a pointer (`&FileService{}`), and the function name suggests
it should return the interface (`IFileService`). The current signature
breaks `go build ./...` on the `agent` module:
app/service/file.go:95:9: cannot use &FileService{} (value of type
*FileService) as FileService value in return statement
app/service/website_proxy.go:276:36: cannot call pointer method
GetFileList on FileService
Both errors resolve when the constructor returns the interface, since
`*FileService` implements every method on `IFileService` (verified with
`go vet ./...`).
After this change, `go build ./...` and `go vet ./...` are clean on the
`agent` module.
* feat: Enhance file and recycle bin services with metadata handling and validation
* refactor: Rename recycle bin metadata handling to trash info and update related functions
* refactor: Remove orphan trash info pruning logic and related map usage in recycle bin service
* feat: Add file content preview functionality
- Implemented a new API endpoint for previewing file content.
- Added PreviewContent method in BaseApi to handle requests.
- Introduced GetPreviewContent method in FileService to retrieve file previews.
- Updated frontend to include a TextPreview component for displaying file previews.
- Added localization support for preview-related messages in multiple languages.
- Enhanced file management view to support previewing large files.
* feat: Update file preview functionality and interface
- Added PreviewContentReq interface to define request parameters for file preview.
- Updated getPreviewContent function to use the new PreviewContentReq type.
- Modified text-preview component to align with updated API, removing unnecessary parameters.
* refactor: Optimize log file reading with buffered reader pool and improve pagination logic
* refactor: Enhance file reading logic with improved buffer management and constant usage
* refactor: Adjust maximum read file size and enhance line reading functionality