Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Show in Dependency-Graph" Button in "Affected Projects" List [improved version] #667

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