Human readable sizes for Webadmin Interface#7880
Conversation
fa5ef37 to
47ffa86
Compare
47ffa86 to
208f3e0
Compare
|
Hi @mcmilk. Thanks for the contribution. Before we merge, could you please update that the table headers don't say |
There was a problem hiding this comment.
Pull Request Overview
This PR implements human-readable size display for the dcache web admin interface and improves table sorting functionality. The changes replace the existing JavaScript table sorting library with a more capable one and add a toggle feature to switch between raw MiB values and human-readable size formats (GiB, TiB, etc.).
Key changes include:
- Replace standardista-table-sorting.js with enhanced sorttable.js library
- Add human-readable size conversion and toggle functionality in common.js
- Update HTML header to reference new JavaScript files
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| standardista-table-sorting.js | Removed old table sorting library |
| sorttable.js | Added enhanced table sorting library with better functionality |
| css.js | Removed CSS utility functions (no longer needed) |
| common.js | Added size conversion functions and toggle button logic |
| HTMLWriter.java | Updated script references to use new sorting library |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Motivation ---------- During the last dcache hackathon meeting, there was the idea to display the rather large byte values of the web interface in a human-readable way. Already during the meeting there was a first short version of the implementation. Today I have adjusted a few small things and now ask for a review. Modification ------------ Replace the old JavaScript code of 'httpd/static/scripts/sorting' with a better working one: https://github.com/White-Tiger/sorttable.js The JavaScript file 'common.js' could be used for other modifications as well. Result ------ Fix sorting of the times in 'ms' within the '/cellInfo' page. Display all sizes in human-readable format instead of MiB. The old and new views can be switched using a button in the top left corner. Target: trunk Request: 11.x, 10.x, 9.x Require-book: no Require-notes: yes
208f3e0 to
acf6cc0
Compare
|
We won't backport the change to older branches. |
Even not v10.2.x - the Latest Golden Release? |
|
Usually, we backport only bug fixes or significant performance improvements. This PR updates something that (a) nobody really suffers, (b) might break people's scripts if they scrape web pages. I will spring this on dev meeting next week |




Motivation
During the last dcache hackathon meeting, there was the idea to display the rather large byte values of the web interface in a human-readable way.
Already during the meeting there was a first short version of the implementation. Today I have adjusted a few small things and now ask for a review.
Modification
Replace the old JavaScript code of 'httpd/static/scripts/sorting' with a better working one: https://github.com/White-Tiger/sorttable.js
The JavaScript file 'common.js' could be used for other modifications as well.
Result
Fix sorting of the times in 'ms' within the '/cellInfo' page. Display all sizes in human-readable format instead of MiB. The old and new views can be switched using a button in the top left corner.
Target: trunk
Request: 11.x, 10.x, 9.x
Require-book: no
Require-notes: yes