* feat: enhance upgrade process with space check and file handling improvements
* fix: update minimum upgrade free space requirement to 500MB and simplify space check logic
* 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
* chore: update dependencies and migrate S3 client to MinIO SDK
- Removed AWS SDK dependency and replaced S3 client implementation with MinIO SDK.
- Updated various dependencies in go.mod and go.sum, including version upgrades for `klauspost/compress`, `minio/minio-go`, and `rs/xid`.
- Adjusted S3 client methods to utilize MinIO's API for bucket listing, object existence checks, uploads, downloads, and deletions.
* refactor: enhance S3 client with context management and TLS support
- Introduced context management with timeouts for S3 client operations to improve reliability.
- Added TLS configuration to support secure connections based on the endpoint scheme.
- Updated S3 client methods to utilize the new context and transport settings for enhanced performance and security.
---------
Co-authored-by: ssongliu <sloooop1x@gmail.com>
* fix: Ensure proper resource management in file operations by closing files after creation and compression
* fix: Improve error handling for log file operations in MediaFile function
- Added visual indicators for container status and creation date.
- Introduced a new radio button for environment configuration alongside existing options.
- Improved layout and styling for better user experience.
- Adjusted table column widths and added a class for styling.
- Introduced concurrent processing for app synchronization tasks to improve performance.
- Added structures for managing app work items and results.
- Implemented detailed logging of synchronization progress and HTTP request outcomes.
- Enhanced error handling for icon downloads and app details updates.
- Updated the compose item to include a new class for active state, improving visual feedback.
- Refactored action buttons into a dedicated container for better organization and hover effects.
- Added CSS transitions for smoother interactions on hover and active states.
* feat: Implement caching for settings retrieval and update logic
- Introduced a caching mechanism for settings using go-cache to improve performance.
- Updated the Create, Update, and UpdateOrCreate methods to cache values after database operations.
- Modified the Get and GetValueByKey methods to utilize the cache for faster access.
- Adjusted middleware to use the new GetValueByKey method for retrieving settings, enhancing code consistency.
* feat: Enhance setting cache management with dynamic TTL
- Introduced a function to determine cache TTL based on setting keys, allowing critical settings to have shorter cache durations.
- Updated cache logic in Create, Update, Get, and GetValueByKey methods to utilize the new TTL management, improving performance and consistency in settings retrieval.
* refactor: Simplify setting cache TTL management
- Removed the dynamic TTL function and standardized the cache TTL to a fixed duration for all settings.
- Updated cache logic in Create, Update, Get, and GetValueByKey methods to use the new fixed TTL, enhancing code clarity and maintainability.
- Added a new function to restart the core service after resetting settings, improving the reset command's functionality.
* refactor: Remove core restart functionality from reset commands
- Eliminated the restartCoreAfterReset function to simplify the reset command logic.
- Updated reset commands to return nil after setting changes, enhancing clarity and reducing unnecessary complexity.
- Added iconfont directory to .prettierignore
- Removed jsxBracketSameLine option from .prettierrc.js
- Fixed indentation in common.scss and reset.scss files
- Modified the logic to retain app details computed from remote sources, only falling back to existing details when necessary.
- Enhanced the synchronization process to ensure only remote resources are included in the synced app IDs for both addition and update scenarios.
* refactor: replace DownloadFileWithProxy with DownloadFileWithProxyStream for improved file downloading logic
* refactor: remove commented-out DownloadFileWithProxy function to clean up code
* fix: enhance app icon download logic to include file existence check
- Updated the downloadAppIcon function to parse the icon field for the file name and ETag.
- Added a condition to check if the icon file exists before setting the If-None-Match header for the request.
* fix: improve app icon retrieval logic by adding filename check
- Updated GetAppIcon method to include filename in the response.
- Added a condition to ensure the ETag header is set only if both ETag and filename are present, enhancing the integrity of the caching mechanism.
* fix: update browser cache handling in website proxy service
- Adjusted cache time condition to allow for negative values, introducing a no-cache option.
- Updated TypeScript interface to specify browser cache options as 'enable', 'disable', or 'noModify' for better clarity.
* refactor: clean up imports and enhance browser cache comments in website proxy service
- Removed unused import statements for better code clarity.
- Added detailed comments to clarify the behavior of the cache time settings in the OperateProxy function.
* fix: update SSL setting check to include 'Mux' option in GetSystemSSL function
* fix: update language files to clarify muxHelper descriptions for security implications
* feat: add keepdeps.go to preserve enterprise-only dependencies in OSS builds
* revert: revert cherrypick
- Introduced functionality to track if the auto passkey login has been attempted using session storage.
- Implemented methods to initialize and mark the auto passkey trial status.
- Automatically trigger passkey login if conditions are met during settings retrieval.
- Updated app icon handling to use a dedicated function for improved clarity and maintainability.
- Introduced a new method, getAppIconSrc, to manage icon source retrieval based on app properties.
- Ensured proper handling of base64 and URL-based icons for better performance and consistency.
* feat: implement app icon management and caching mechanism
* feat: enhance app synchronization and icon management
- Refactored app synchronization tasks to improve structure and clarity.
- Introduced shared context for managing app sync state and metadata.
- Updated icon handling to ensure proper content type and caching.
- Adjusted cache control settings for app icons to extend cache duration.
- Improved error handling and logging during app sync processes.
* refactor: streamline app icon retrieval by removing unused fileName return
- Removed the fileName return value from GetAppIcon function as it was not utilized.
- Enhanced the GetAppIcon method in BaseApi to improve clarity and maintainability.
- Ensured proper caching headers are set for app icons.
* feat: Add passkey authentication support with registration and login endpoints
* style: Refactor import statements and improve button formatting in login and settings views
* chore: Update dependencies in go.mod and go.sum, including adding go-webauthn and updating indirect dependencies
* refactor: Consolidate passkey session management and update related structures for improved clarity and functionality
* feat: Add passkey support in multiple languages with corresponding error messages and management options
* feat: Implement passkey reset command and enhance internationalization support for passkey-related messages
* refactor: Simplify login form structure by removing commented sections and unused passkey login function
* fix: Update passkey failure messages across multiple languages to include SSL certificate verification instructions
* chore: update go mod
* refactor: Update passkey handling by consolidating status checks and renaming related fields for clarity
* style: Format i18n file
* refactor: Enhance passkey configuration checks
* feat: Implement AppStore synchronization task
- Introduced a new `syncAppStoreTask` function to handle the synchronization of applications from the AppStore.
- The function checks for updates, retrieves the application list, and manages the synchronization process, including downloading app icons and updating app details.
- Refactored the existing app synchronization logic from `SyncAppListFromRemote` into the new task for improved maintainability and clarity.
- Added logging for progress tracking during the synchronization process.
* feat: Refactor HTTP request handling to support custom client
- Introduced `HandleRequestWithClient` function to allow custom HTTP clients for requests.
- Moved the transport loading logic into the new function for better separation of concerns.
- Updated `HandleRequest` to utilize the new function, enhancing flexibility in request handling.
* refactor: Simplify HTTP request handling in app synchronization
- Replaced direct HTTP request handling with `HandleRequestWithClient` for downloading app icons and Docker Compose files.
- Removed unused variables and logging related to icon download updates for cleaner code.
- Improved error handling and logging for failed requests.
* feat: Add endpoint to retrieve listening processes and update related services
* fix: Update listening process retrieval logic to include socket type checks
* refactor: accept context for improved request handling
* feat: Add pullImage option to ComposeCreate and update related logic
- Introduced a new optional field `pullImage` in the `ComposeCreate` struct to control image pulling behavior.
- Updated `CreateCompose` method to handle the `pullImage` flag when invoking the compose up command.
- Modified `UpWithTask` function to conditionally skip image pulling based on the `pullImages` parameter.
- Enhanced frontend form to include a checkbox for the `pullImage` option, with default value set to true.
* feat: Add label for environment variable input in Compose form
* refactor: enhance Mux connection handling in server
* fix: Increase maximum allowed length for RequestURI in Mux connection handling
* feat: Add support for HTTP/2 in Mux mode
* fix: Update regex patterns for log highlighting in custom component
* feat: Add new regex pattern for HTTP status codes highlighting in custom log component
* refactor: Update HTTP status code regex patterns in custom log component for improved highlighting
* feat: Add support for Mux SSL mode and update related settings
- Introduced a new SSL mode "Mux" in the settings, allowing for HTTP to HTTPS redirection.
- Updated the `SSL` field in the `SettingUpdate` struct to include "Mux" as a valid option.
- Modified the server logic to handle Mux connections, including certificate management and HTTP redirection.
- Updated frontend components to reflect the new SSL options and improved user guidance in multiple languages.
* fix: Update HTTPS related messages for improved clarity and security guidance in multiple languages
* feat: Enhance browser cache management and localization support
- Updated browser cache handling in WebsiteService to include a 'noModify' option.
- Introduced new method AddBroswerNoCache in Location to manage no-cache directives.
- Added localization for 'noModify' in multiple languages.
- Updated frontend to support the new browser cache options in the proxy configuration.
* fix: Update cache display logic in proxy configuration
- Adjusted the rendering of cache tags in the proxy configuration to conditionally display based on cache time values.
- Improved user interface by adding margin classes for better spacing between cache tags.
- Introduced ProcessStore for managing process and network data via WebSocket.
- Enhanced TableSearch component to synchronize search parameters with props.
- Updated network and process views to utilize ProcessStore for data fetching and state management.
- Improved data filtering and sorting in network and process views.
- Added WebSocket connection management with polling for real-time updates.
* feat: Enhance WebSocket client functionality and improve data processing
- Reduced message queue size in WebSocket client from 100 to 32.
- Introduced atomic boolean to track client closure state.
- Added SendPayload method to handle message sending with queue management.
- Updated ProcessData function to utilize SendPayload for sending responses.
- Expanded netTypes to include both IPv4 and IPv6 protocols in network connection retrieval.
- Improved net connection processing by using a map for process names, enhancing efficiency.
* feat: Enhance WebSocket client and process data handling
- Added synchronization with sync.Once for safe closure of WebSocket client.
- Updated message queue size to a constant for better maintainability.
- Implemented context timeouts for process data retrieval to prevent blocking.
- Improved network connection handling by utilizing a more efficient method for retrieving connections.
- Introduced a new function to determine connection types based on protocol family.
* feat: Enhance network connection retrieval and process name mapping
- Updated getNetConnections function to improve efficiency by using maps for process names and connections.
- Introduced a new helper function to retrieve process names from the filesystem or process context.
- Enhanced filtering logic for network connections based on process ID, name, and port.
- Increased initial capacity for connection results to optimize performance.
* refactor: Rename SendPayload method to Send in WebSocket client
- Updated the SendPayload method to be more succinctly named Send for clarity.
- Ensured the method continues to handle message sending while maintaining existing functionality.
* refactor: Update ProcessData and getNetConnections for improved clarity and efficiency
- Replaced SendPayload method calls with Send for consistency in WebSocket message handling.
- Enhanced getNetConnections function by refining process name retrieval and filtering logic.
- Improved error handling in getProcessNameWithContext for better robustness.
* refactor: Simplify WebSocket client closure and reading logic
- Removed unnecessary synchronization for closing the WebSocket client.
- Updated the Read method to handle message reading directly without a separate Close method.
- Ensured the Socket is closed properly after reading messages to prevent resource leaks.
* refactor: Simplify process data handling and improve performance
- Replaced goroutine-based processing with a direct loop for handling process data.
- Introduced context support for process and connection retrieval.
- Enhanced error handling and data structuring for process information.
- Improved SSH session retrieval by mapping users by host for better efficiency.
* chore: go fmt
* 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.
* feat: Enhance proxy initialization and error handling
* Add a timeout to the dialer for Unix socket connections
* Improve error response by including the error message in the "Bad Gateway" response
* refactor: Change sockPath variable to constant in proxy initialization
* Update sockPath to a constant SockPath for improved clarity and consistency
* Ensure the new constant is used in the dialer function for Unix socket connections
* feat: Add PrettyDistro field to dashboard information and update related services and frontend components
* fix: Trim whitespace and parentheses from detected Linux distribution name in GetDistro method
* fix: Correctly trim parentheses from detected Linux distribution name in GetDistro method
* refactor: Simplify Linux distribution detection by removing unnecessary checks and consolidating logic
* fix: Update CPU usage retrieval to include detailed percentage information
* feat: Enhance CPU metrics by adding CPU frequency and detailed usage percentages
* feat: Add CPU frequency metric to dashboard base information
* feat: Add copy button for raw JSON in container and network detail views
* refactor: Change CodemirrorPro component from disabled to readonly in container and network detail views
* feat: Add readonly prop to CodemirrorPro component for enhanced editing control
* perf: use gzipped data for improved load speed in big files
* perf: switch to gzipped response for GetFileTree to enhance performance
* perf: switch to gzipped response for SearchApp to improve performance
* perf: update file size conditions for gzipped response to enhance performance
* feat: Add path protection mechanism to prevent deletion of critical system directories
* feat: Enhance recycle bin service with path protection for deletion requests
* feat: async load data of top CPU and memory processes data
* refactor: Update CPU and memory top toggle functionality and state management
---------
Co-authored-by: 王贺 <wanghe@fit2cloud.com>
* 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
* feat: Add ComposeDetail view for enhanced container management
* feat: Update container log management with new table layout and improved stats display
* feat: Update log search mode to 'all' for comprehensive log retrieval
* cleanup
* feat: Enhance log container and compose management with new UI components and improved functionality
* refactor: Remove unused ComposeDetail route and enhance UI components in container management
* refactor: Improve UI styling and interaction for compose list items in container management
* refactor: Update styling and hover effects for compose list items in container management
* refactor: Enhance container compose header with additional context and improve port handling in inspect view
* refactor: Update .env label to use translation for improved localization in container compose view
* refactor: Adjust height and placeholder text for YAML editor in container compose view
* refactor: Adjust docker compose layout
---------
Co-authored-by: ssongliu <songlius11@163.com>
* feat: Implement language caching and improve language handling in i18n module
* refactor: Optimize i18n initialization with sync.Once for thread safety
* fix: Replace logging with fmt.Println for language file loading errors in i18n module
* fix: Correct format string in error logging for language file loading in i18n module
* fix: Update language files and improve error handling in i18n module
* fix: Update Malay language file extension from .yml to .yaml and add new translations in i18n module
* fix: Improve error messages for language file loading in i18n module
* fix: Ensure cached database language is set correctly during i18n initialization
* fix: Enhance language detection in i18n module by using Accept-Language header
* feat: enhance S3 region selection with dropdown and custom input option
* refactor: streamline S3 region selection and endpoint handling in backup account settings
* feat: Enhance caching options for proxy configuration
* fix: typo
* feat: Update caching and directive handling in proxy configuration
* feat: Update default cache time and unit to improve caching configuration
* feat: Implement RemoveCorsOption method to streamline CORS directive removal
* feat: Enhance cache display and initialization in proxy configuration
* refactor: Clean up AddBrowserCache and RemoveCache methods by removing commented-out code