-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Feature to Display Disk Space Usage #1100
base: master
Are you sure you want to change the base?
Conversation
# Changes: - Added disk space calculation logic to the `index.php` file. - Updated the file listing footer to include total, used, and remaining disk space information. - Utilized `disk_total_space`, `disk_free_space`, and `fm_get_filesize` functions to obtain and format disk space information. - Ensured that the feature works seamlessly with existing functionalities and adheres to the project's coding standards. # Benefits: - Users with multiple mounted drives on their servers can easily see how much disk space is available, used, and remaining on each drive, facilitating better disk space management. - Enhances user experience by providing valuable disk space information, aiding in capacity planning and preventing potential issues related to disk space exhaustion. - Helps in monitoring disk space usage directly from the file manager without needing to use external tools or commands. # Use Case: - As someone managing a server with multiple mounted drives, this feature is invaluable for monitoring the disk space usage on each drive. It helps in ensuring that none of the drives are nearing capacity, which could lead to performance degradation or even system failures. Having this information readily available within Tiny File Manager streamlines the process of managing disk space and ensures that I can take timely action if needed, such as cleaning up old files or moving data to other drives with more available space.
This commit builds upon the previous feature of displaying disk space information by adding a toggle option in the settings to show or hide disk space usage details. #### Changes: - Added a new setting under the settings section allowing users to toggle the display of disk space usage information. - Updated the disk space display logic to check the setting before fetching and displaying disk space information. #### Code Additions: - Introduced a new checkbox under the settings section to allow users to toggle the display of disk space usage. - Implemented a check for the `show_disk_usage` setting before executing disk space calculation and display logic. #### Benefits: - Provides users with the flexibility to choose whether or not to display disk space information based on their preferences or needs. - Helps in reducing unnecessary disk space calculations when the information is not needed, potentially improving performance. - Maintains a clean and uncluttered UI by allowing users to hide disk space information when it's not required.
This commit add translations for the terms 'Used Space' and 'Remaining Space' across all supported languages using Google Translate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Congratulations |
This PR reminds me of PR #911, albeit this one is more elegant and complete, but I never really understood why the latter wasn't merged back then. I did end up implementing it in my custom version though since I think it's undeniable that it adds to the script without taking anything away. |
Thank you for referencing PR #911. My PR aims to provide a detailed view of disk usage for systems with multiple mounted drives. |
Thanks for clarifying this, I wasn't fully aware of the extension of your implementation (although I admittedly hadn't read your entire description yet). I hope this gets merged soon, but even if it doesn't I'll look into integrating it within my custom script anyway. |
will this be merged? it looks good |
Changes:
index.php
file.disk_total_space
,disk_free_space
, andfm_get_filesize
functions to obtain and format disk space information.js-show-usage
) to allow users to toggle the display of disk space usage.show_disk_usage
setting before executing disk space calculation and display logic.Benefits:
Use Case:
Screenshots:
Example with Mounted disk:
I believe this feature, along with the toggle setting, would be a valuable addition to Tiny File Manager, helping users better manage their disk space on servers with multiple drives. I have tested the changes on my local setup to ensure accuracy and compatibility. Looking forward to the feedback and am happy to make any necessary adjustments.
Thank you for considering this contribution.