Skip to content

Commit

Permalink
Merge pull request #667 from rkg-mm/master-open-dependency-graph-from…
Browse files Browse the repository at this point in the history
…-affected-projects

Add "Show in Dependency-Graph" Button in "Affected Projects" List [improved version]
  • Loading branch information
nscuro authored Dec 10, 2023
2 parents 473237d + 2cab0c4 commit 7779934
Show file tree
Hide file tree
Showing 7 changed files with 250 additions and 208 deletions.
3 changes: 2 additions & 1 deletion src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,8 @@
"version_distance_major": "major",
"version_distance_minor": "minor",
"version_distance_patch": "patch",
"version_distance_tooltip": "Specify the difference between version numbers, or empty to ignore"
"version_distance_tooltip": "Specify the difference between version numbers, or empty to ignore",
"matrix": "Matrix"
},
"admin": {
"configuration": "Configuration",
Expand Down
33 changes: 31 additions & 2 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,40 @@ function configRoutes() {
}
},
{
path: 'projects/:uuid/dependencyGraph/:componentUuid',
path: 'projects/:uuid/dependencyGraph/:componentUuids',
name: 'Dependency Graph Component Lookup',
props: (route) => ( {
uuid: route.params.uuid,
componentUuid: route.params.componentUuid
componentUuids: route.params.componentUuids
} ),
component: Project,
meta: {
i18n: 'message.projects',
sectionPath: '/projects',
permission: 'VIEW_PORTFOLIO'
}
},
{
path: 'projects/:uuid/findings/:vulnerability',
name: 'Project Finding Lookup',
props: (route) => ( {
uuid: route.params.uuid,
vulnerability: route.params.vulnerability
} ),
component: Project,
meta: {
i18n: 'message.projects',
sectionPath: '/projects',
permission: 'VIEW_PORTFOLIO'
}
},
{
path: 'projects/:uuid/findings/:affectedComponent/:vulnerability',
name: 'Project Finding Lookup',
props: (route) => ( {
uuid: route.params.uuid,
affectedComponent: route.params.componentUuid,
vulnerability: route.params.vulnerability
} ),
component: Project,
meta: {
Expand Down
4 changes: 2 additions & 2 deletions src/views/portfolio/projects/Project.vue
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@
},
mounted() {
try {
if (this.$route.params.componentUuid){
if (this.$route.params.componentUuids){
this.$refs.dependencygraph.active = true;
} else {
this.getTabFromRoute().active = true;
Expand All @@ -297,7 +297,7 @@
this.uuid = this.$route.params.uuid;
if (to.params.uuid !== from.params.uuid) {
this.initialize();
} else if (this.$route.params.componentUuid){
} else if (this.$route.params.componentUuids){
this.initialize();
this.$refs.dependencygraph.activate();
}
Expand Down
Loading

0 comments on commit 7779934

Please sign in to comment.