Bug 50756 - univention-run-diagnostic-checks does not show links
univention-run-diagnostic-checks does not show links
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - System diagnostic
UCS 4.4
Other Linux
: P5 minor (vote)
: UCS 5.0-1-errata
Assigned To: Maximilian Janßen
Florian Best
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-01-29 13:05 CET by Moritz Bunkus
Modified: 2022-03-09 13:43 CET (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.114
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): bitesize
Max CVSS v3 score:


Attachments
output of same check in the UMC (32.00 KB, image/png)
2020-01-29 13:05 CET, Moritz Bunkus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Moritz Bunkus 2020-01-29 13:05:34 CET
Created attachment 10287 [details]
output of same check in the UMC

Running univention-run-diagnostic-checks from the command line will result in links (e.g. to additional information) not being output even if the same links are shown in the UMC. Example:

##################### Start 58_check_memberOf ######################
## Check failed: 58_check_memberOf - Prüfe LDAP-Attribut memberOf ##
Das Attribut für Gruppenmitgliedschaften "memberOf" ist auf dem LDAP-Server auf diesem Host nicht verfügbar. Diese Funktion wird bei Neuinstallationen seit UCS Version 4.3-0 standardmäßig aktiviert, und verschiedene Dienste hängen davon ab. Dieses Attribut wird in zukünftigen UCS-Versionen vorausgesetzt. Sie können die memberOf-Funktion für den LDAP-Server folgendermaßen aktivieren:
###################### End 58_check_memberOf #######################
Comment 1 Florian Best univentionstaff 2022-01-28 17:39:18 CET
@Max, could you implement a fix for this.
The UMC javascript module does the following logic for inserting links:

131 »   »   »   array.forEach(item.links, lang.hitch(this, function(link) {
132 »   »   »   »   var a = domConstruct.create('div');
133 »   »   »   »   a.appendChild(domConstruct.create('a', {href: link.href, innerHTML: link.label || link.href, target: '_blank', rel: 'noopener noreferrer'}));
134 »   »   »   »   a = new Text({innerHTML: a.innerHTML});
135 »   »   »   »   this.own(a);
136 »   »   »   »   var repl = '{' + link.name  + '}';
137 »   »   »   »   if (description.indexOf(repl) !== -1) {
138 »   »   »   »   »   description = description.replace(repl, a.innerHTML);
139 »   »   »   »   } else {
140 »   »   »   »   »   div.addChild(a);
141 »   »   »   »   }
142 »   »   »   }));

We should do something similar in the univention-run-diagnostic-checks CLI tool and print the link target and the label of the link.
Comment 2 Maximilian Janßen univentionstaff 2022-03-04 10:02:31 CET
implemented replace function for link placeholders in the cli for error messages.

univention-management-console-module-diagnostic (6.0.0-25)
339f192a0f77 | Bug #50756: display links of failed diagnostic plugins also in univention-run-diagnostic-checks
Comment 3 Florian Best univentionstaff 2022-03-04 11:25:04 CET
Great work!

OK: links inline in the text (enhancement would have been to put the labels into quotes)
OK: links appended to the text
OK: YAML