Description of problem:
Name for logs is too long to show suitably in the Logs field on web UI
Like here https://beaker.engineering.redhat.com/recipes/3007
If we roll out the resules, look into the Logs field. We will see:
And they should be
Version-Release number of selected component (if applicable):
Beaker Version - 0.5.41
Steps to Reproduce:
It's how rhts-db-submit-result names the file and I could remove it easily, but have a dilemma:
- when downloading files from WebUI it is not bad having a descriptive filename.
- On the other hand I do not think WebUI should tinker with filenames.
Thus harness should send both short and long names.
Unfortunately there is no file database and files are hold in filesystem only.
Is it sure beaker will always run on a FS able to store extended metadata?
May be we could use a .../short-name/long-name schema instead and this seems the most reasonable thing to do:
- No big changes.
- simple changes on harness side
- not that bad for WebUI too
- Bonus: This would solve Bug 584518 too.
Proposed changes to WebUI:
- display only directory-names, not files.
- exception: top-level-files - backward compatibility and convenience
- file links would link to themselves
- directory links would:
- if there are multiple files, display a list (AJAX?),
- if there is single file in directory, link would be direct to the file.
Created attachment 438080 [details]
harness side patch
On lab-machine it would be as easy as this.
Sorry Ray... ;-)
Suggestion: for Web UI, since the test names are in the same row already, would it make sense to use short descriptive labels instead of semicomplete paths?
[log] (or [output] or [stdout/stderr])
Documented my GreaseMonkey script, with screen captures:
For the reasons given in comment 1 I don't think the filenames used by rhts-* should be changed, nor that Beaker should fiddle with them.
And anyway even if that were changed, Beaker accepts arbitrarily named file uploads so it still needs to deal with this problem of displaying long log file names.
I think the real issue is that the log filenames are truncated (in Python, not in CSS) to the final 50 characters, even though in most cases the useful distinguishing information is at the start (test_log-..., avc_log-...). Also it seems that the results UI has evolved since the original bug report because the logs are separated according to their result, so there will normally only be one test_log-... file in each row.
We can skip truncating the filenames in Python and instead use the text-overflow CSS property along with a max-width to prevent long log filenames from blowing out the width of the results table.
We could also put the complete filename in the title attribute to make it easier to distinguish filenames that have been truncated, although the browser will already show the complete URL when hovering so maybe that isn't necessary.
beaker 0.15.1 has been released.