Bug 45060 - Make URLs from /var/log/univention/updater.log clickable
Make URLs from /var/log/univention/updater.log clickable
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - Software update
UCS 4.2
Other Linux
: P5 enhancement (vote)
: UCS 4.2-3-errata
Assigned To: Jannik Ahlers
Florian Best
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-24 15:15 CEST by Philipp Hahn
Modified: 2017-12-07 16:34 CET (History)
2 users (show)

See Also:
What kind of report is it?: Feature Request
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): External feedback
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2017-07-24 15:15:53 CEST
The preup.sh script often print URLs, e.g. for the release notes or to sdb articels if the update is blocked. Currently the UMC module only shows the logfile as text, so those URLs need to be copied and pasted to the browser manually.
It would help if the UMC updater could detect URLs itself and show them as clickable links.

Noticed by UCS Technical Training 2017-07
Comment 1 Jannik Ahlers univentionstaff 2017-11-27 16:33:45 CET
Fixed in branch jahlers/45060-updater-links-click
Comment 2 Florian Best univentionstaff 2017-11-29 15:42:30 CET
Please rebase your branch, I commited a little enhancement.

And make the following adjustments:
1. The links should open in a new tab.
2. Add some security mechanism by adding rel="noopener noreferrer" to the links.
(https://mathiasbynens.github.io/rel-noopener/)

Please adjust the description in the YAML to something like the following:
Links in the log view during installing software upgrades via the UMC module can now be clicked.
Comment 3 Florian Best univentionstaff 2017-12-01 16:56:57 CET
Please note that the maximum line length for YAML files is 80. I adjusted this in commit 5aa2a9c.
Comment 4 Florian Best univentionstaff 2017-12-01 17:38:06 CET
The links aren't opened in a new tab (typo "tagret" instead of "target").
The "noreferrer" relation is missing in the link.
Comment 5 Jannik Ahlers univentionstaff 2017-12-05 15:59:42 CET
The URLs that appear in the updater module's logs now get matched and replaced.
A very simple regex was used that only matches links beginning with 'http[s]://',
so possibly not all URLs get detected.

univention-updater (12.0.11-16)
574799afc795 | Bug #45060: URLs now open in a new tab

univention-updater (12.0.11-15)
732c6e433b62 | Bug #45060: Merge branch 'jahlers/45060-updater-links-click2' into 4.2-3
6f1c62e6ec92 | Bug #45060: URLs printed by the log in the UMC updater module are now clickable

univention-updater.yaml
1fff9da16702 | Bug #45060: YAML
5aa2a9ce1c43 | YAML Bug #44080, Bug #45060
e242fbe15c80 | Bug #45060: YAML
732c6e433b62 | Bug #45060: Merge branch 'jahlers/45060-updater-links-click2' into 4.2-3
07a3a9066f6c | Bug #45060: YAML

Successful build
Package: univention-updater
Version: 12.0.11-16A~4.2.0.201712051543
Branch: ucs_4.2-0
Scope: errata4.2-3
User: jahlers
Comment 6 Florian Best univentionstaff 2017-12-07 13:42:57 CET
This works very nice now.
The YAML file is OK.
Comment 7 Arvid Requate univentionstaff 2017-12-07 16:34:38 CET
<http://errata.software-univention.de/ucs/4.2/243.html>