Skip to content

Commit 48c8fb2

Browse files
feat: remove the "More Information" string when references is empty
1 parent 93f85f5 commit 48c8fb2

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/ui/helpview/helpview_assurance.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,12 @@ export function getPolicyData(item: TrivyTreeItem, html: string): string {
4545
<th>Severity</th>
4646
<td>${severityCalc(Number(result.severity))}</td>
4747
</tr>
48-
${
49-
result.pkgName
50-
? `<tr>
48+
${result.pkgName
49+
? `<tr>
5150
<th>Package</th>
5251
<td>${result.pkgName}</td>
5352
</tr>`
54-
: ''
53+
: ''
5554
}
5655
<tr>
5756
<th>Fix</th>
@@ -66,14 +65,14 @@ export function getPolicyData(item: TrivyTreeItem, html: string): string {
6665
<td>${result.filename}</td>
6766
</tr>
6867
</table>
69-
70-
71-
<h4>More Information</h4>
72-
<ul>
73-
<li><a href="https://cloud.aquasec.com/ah/#/supplychain/policies/${result.id}">Aqua Platform (${result.avdId})</a></li>
7468
`;
7569

7670
if (result.references) {
71+
html += `
72+
<h4>More Information</h4>
73+
<ul>
74+
<li><a href="https://cloud.aquasec.com/ah/#/supplychain/policies/${result.id}">Aqua Platform (${result.avdId})</a></li>
75+
`;
7776
for (let i = 0; i < result.references.length; i++) {
7877
const reference = result.references[i];
7978
html += `<li><a href="${reference}">${reference}</a></li>

0 commit comments

Comments
 (0)