feat: Add file preview functionality and interface #11200
feat: Add file preview functionality and interface #11200zhengkunwang223 merged 2 commits into1Panel-dev:dev-v2from
Conversation
- 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.
- 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.
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
What this PR does / why we need it?
文件管理现在可以支持打开大于10M的文件,后端不再报文件太大无法打开,以只读预览方式调用tailfromend,展示文件最后300行,有助于查看一些程序的日志文件内容
Summary of your change
Please indicate you've done the following: