Use highlight rich objecttype to render links in CodeIntegrity setup check

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
Côme Chilliet 2024-01-09 18:03:32 +01:00
parent f06b8da249
commit 1c4d43923a
No known key found for this signature in database
GPG key ID: A3E2F658B28C760A

View file

@ -55,8 +55,23 @@ class CodeIntegrity implements ISetupCheck {
} else {
// FIXME: If setup check can link to settings pages this should link to /settings/integrity/failed and /settings/integrity/rescan?requesttoken=TOKEN
return SetupResult::error(
$this->l10n->t('Some files have not passed the integrity check.'),
$this->urlGenerator->linkToDocs('admin-code-integrity')
$this->l10n->t('Some files have not passed the integrity check. {link1} {link2}'),
$this->urlGenerator->linkToDocs('admin-code-integrity'),
[
'link1' => [
'type' => 'highlight',
'id' => 'getFailedIntegrityCheckFiles',
'name' => 'List of invalid files…',
'link' => $this->urlGenerator->linkToRoute('settings.CheckSetup.getFailedIntegrityCheckFiles'),
],
'link2' => [
'type' => 'highlight',
'id' => 'rescanFailedIntegrityCheck',
'name' => 'Rescan…',
//, ['requesttoken' => '']?
'link' => $this->urlGenerator->linkToRoute('settings.CheckSetup.rescanFailedIntegrityCheck'),
],
],
);
}
}