change(debug): Add display of issue cause

cause: Issue causes are now displayed if they're provided.
is-runtime: If an issue was discovered at runtime, they're prefixed with `Runtime` before the severity.
This commit is contained in:
tecc 2022-11-08 03:21:11 +01:00
parent f89344ca33
commit fc36d148f4
No known key found for this signature in database
GPG Key ID: 400AAD881FCC028B

View File

@ -133,12 +133,21 @@ export const Issue: FC<IssueProps> = function (props) {
id={`${id}-summary`}
>
<div className={"flex flex-col bg-transparent"}>
<span className={"text-xs uppercase"}>{getNameFromSeverity(issue.severity, i18n)}</span>
<span className={"text-xs uppercase"}>
{issue.isRuntime === true ? 'Runtime ' : ''}
{getNameFromSeverity(issue.severity, i18n)}
</span>
<span className={"font-bold"}>{issue.name}</span>
</div>
</AccordionSummary>
<AccordionDetails className={"flex flex-col"}>
<span>{issue.description ?? t('No description was provided for this issue.')}</span>
{issue.cause && (
<div className={"flex flex-col my-1"}>
<span className={"font-bold"}>{t('Cause')}</span>
<span className={"font-mono"}>{String(issue.cause)}</span>
</div>
)}
{issue.fixes.length > 0 ? (
<div className={"mt-1 flex flex-col"}>