Skip to content

Commit

Permalink
fix display issues with external references in SBOM view
Browse files Browse the repository at this point in the history
Signed-off-by: Kaden Emley <[email protected]>
  • Loading branch information
kemley76 committed Aug 12, 2024
1 parent 8e089fd commit a687b4c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions apps/frontend/src/components/cards/sbomview/ComponentContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ function jsonToTabFormat(value: Object): Omit<Tab, 'name'> {
const customRender = [
'affectingVulnerabilities',
'properties',
'externalReferences',
'component',
'parents',
'children',
Expand Down Expand Up @@ -235,6 +236,16 @@ function generateTabs(
}
if (generalProps.tableData!.rows.length > 0) tabs.unshift(generalProps);
const externalReferences = _.get(object, 'externalReferences');
if (externalReferences) {
tabs.push({
name: `${prefix}${' External References'}`,
...jsonToTabFormat(
externalReferences.map((reference) => _.omit(reference, 'hashes'))
)
});
}
// These are properties on `object` used to include arbitrary data from external tools
if (object.properties)
tabs.push(...generateTabsFromProperties(object.properties, prefix));
Expand Down Expand Up @@ -323,13 +334,15 @@ export default class ComponentContent extends Vue {
});
}
// show components that this component depends on
if (this.component.children.length) {
tabs.push({
name: 'Dependencies',
relatedComponents: this.component.children
});
}
// show components that depend on this component
if (this.component.parents.length) {
tabs.push({
name: 'Parents',
Expand Down

0 comments on commit a687b4c

Please sign in to comment.