Skip to content

Commit

Permalink
Always display project nodes in dependency graph using name and version
Browse files Browse the repository at this point in the history
Fixes DependencyTrack#1026

Signed-off-by: nscuro <nscuro@protonmail.com>
  • Loading branch information
nscuro committed Oct 9, 2024
1 parent 52607ab commit c0a9031
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/views/portfolio/projects/ProjectDependencyGraph.vue
Original file line number Diff line number Diff line change
Expand Up @@ -529,10 +529,12 @@ export default {
}
},
createNodeLabel: function (identity) {
// could be a project or a component
if (identity.purlCoordinates) {
// Could be a project or a directDependency object.
// Projects don't have the objectType property.
const isProject = !identity.objectType;
if (!isProject && identity.purlCoordinates) {
return identity.purlCoordinates;
} else if (identity.purl) {
} else if (!isProject && identity.purl) {
return identity.purl;
} else {
let label = '';
Expand Down

0 comments on commit c0a9031

Please sign in to comment.