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

Fix: navigation in new tab and/or window #1055

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/views/audit/PolicyViolationAudit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -356,15 +356,15 @@ export default {
formatter: (value, row, index) => {
if (row.component) {
let url = xssFilters.uriInUnQuotedAttr(
'../../../components/' + row.component.uuid,
'./components/' + row.component.uuid,
);
let name = common.concatenateComponentName(
null,
row.component.name,
row.component.version,
);
let dependencyGraphUrl = xssFilters.uriInUnQuotedAttr(
'../../../projects/' +
'./projects/' +
row.project.uuid +
'/dependencyGraph/' +
row.component.uuid,
Expand All @@ -384,7 +384,7 @@ export default {
sortable: true,
formatter(value, row, index) {
let url = xssFilters.uriInUnQuotedAttr(
'../projects/' + row.project.uuid,
'./projects/' + row.project.uuid,
);
let name = common.concatenateComponentName(
null,
Expand Down Expand Up @@ -429,7 +429,7 @@ export default {
)
) {
let licenseurl =
'../../../licenses/' + row.component.resolvedLicense.licenseId;
'./licenses/' + row.component.resolvedLicense.licenseId;
return (
'<a href="' +
licenseurl +
Expand Down
8 changes: 4 additions & 4 deletions src/views/globalAudit/VulnerabilityAuditByOccurrence.vue
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ export default {
sortable: true,
formatter(value, row, index) {
let url = xssFilters.uriInUnQuotedAttr(
'../vulnerabilities/' + row.vulnerability.source + '/' + value,
'./vulnerabilities/' + row.vulnerability.source + '/' + value,
);
return (
common.formatSourceLabel(row.vulnerability.source) +
Expand Down Expand Up @@ -586,7 +586,7 @@ export default {
sortable: true,
formatter(value, row, index) {
let url = xssFilters.uriInUnQuotedAttr(
'../projects/' + row.component.project,
'./projects/' + row.component.project,
);
let name = common.concatenateComponentName(
null,
Expand All @@ -602,10 +602,10 @@ export default {
sortable: true,
formatter: (value, row, index) => {
let url = xssFilters.uriInUnQuotedAttr(
'../../../components/' + row.component.uuid,
'./components/' + row.component.uuid,
);
let dependencyGraphUrl = xssFilters.uriInUnQuotedAttr(
'../../../projects/' +
'./projects/' +
row.component.project +
'/dependencyGraph/' +
row.component.uuid,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ export default {
sortable: true,
formatter(value, row, index) {
let url = xssFilters.uriInUnQuotedAttr(
'../vulnerabilities/' + row.vulnerability.source + '/' + value,
'./vulnerabilities/' + row.vulnerability.source + '/' + value,
);
return (
common.formatSourceLabel(row.vulnerability.source) +
Expand Down
10 changes: 3 additions & 7 deletions src/views/portfolio/components/ComponentSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,7 @@ export default {
formatter(value, row, index) {
let url = xssFilters.uriInUnQuotedAttr('../components/' + row.uuid);
let dependencyGraphUrl = xssFilters.uriInUnQuotedAttr(
'../../../projects/' +
row.project.uuid +
'/dependencyGraph/' +
row.uuid,
'./projects/' + row.project.uuid + '/dependencyGraph/' + row.uuid,
);
return row.project.directDependencies
? `<a href="${dependencyGraphUrl}"<i class="fa fa-sitemap" aria-hidden="true" style="float:right; padding-top: 4px; cursor:pointer" data-toggle="tooltip" data-placement="bottom" title="Show in dependency graph"></i></a> ` +
Expand Down Expand Up @@ -291,7 +288,7 @@ export default {
sortable: false,
formatter(value, row, index) {
let url = xssFilters.uriInUnQuotedAttr(
'../projects/' + row.project.uuid,
'./projects/' + row.project.uuid,
);
let name = common.concatenateComponentName(
null,
Expand All @@ -312,8 +309,7 @@ export default {
}

let url = xssFilters.uriInUnQuotedAttr(
'../licenses/' +
encodeURIComponent(row.resolvedLicense.licenseId),
'./licenses/' + encodeURIComponent(row.resolvedLicense.licenseId),
);
return `<a href="${url}">${xssFilters.inHTMLData(row.resolvedLicense.name)}</a>`;
},
Expand Down
2 changes: 1 addition & 1 deletion src/views/portfolio/licenses/LicenseList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default {
sortable: true,
formatter: function (value, row, index) {
let url = xssFilters.uriInUnQuotedAttr(
'../licenses/' + encodeURIComponent(value),
'./licenses/' + encodeURIComponent(value),
);
return `<a href="${url}">${xssFilters.inHTMLData(value)}</a>`;
},
Expand Down
4 changes: 2 additions & 2 deletions src/views/portfolio/projects/ComponentVulnerabilities.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default {
sortable: true,
formatter(value, row, index) {
let url = xssFilters.uriInUnQuotedAttr(
'../../vulnerabilities/' + row.source + '/' + value,
'./vulnerabilities/' + row.source + '/' + value,
);
return (
common.formatSourceLabel(row.source) +
Expand All @@ -55,7 +55,7 @@ export default {
for (let i = 0; i < aliases.length; i++) {
let alias = aliases[i];
let url = xssFilters.uriInUnQuotedAttr(
'../../vulnerabilities/' + alias.source + '/' + alias.vulnId,
'./vulnerabilities/' + alias.source + '/' + alias.vulnId,
);
label +=
common.formatSourceLabel(alias.source) +
Expand Down
9 changes: 3 additions & 6 deletions src/views/portfolio/projects/ProjectComponents.vue
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,9 @@ export default {
field: 'name',
sortable: true,
formatter: (value, row, index) => {
let url = xssFilters.uriInUnQuotedAttr(
'../../../components/' + row.uuid,
);
let url = xssFilters.uriInUnQuotedAttr('./components/' + row.uuid);
let dependencyGraphUrl = xssFilters.uriInUnQuotedAttr(
'../../../projects/' + this.uuid + '/dependencyGraph/' + row.uuid,
'./projects/' + this.uuid + '/dependencyGraph/' + row.uuid,
);
return (
`<a href="${dependencyGraphUrl}"<i class="fa fa-sitemap" aria-hidden="true" style="float:right; padding-top: 4px; cursor:pointer" data-toggle="tooltip" data-placement="bottom" title="Show in dependency graph"></i></a> ` +
Expand Down Expand Up @@ -258,8 +256,7 @@ export default {
sortable: false,
formatter(value, row, index) {
if (Object.prototype.hasOwnProperty.call(row, 'resolvedLicense')) {
let licenseurl =
'../../../licenses/' + row.resolvedLicense.licenseId;
let licenseurl = './licenses/' + row.resolvedLicense.licenseId;
return (
'<a href="' +
licenseurl +
Expand Down
9 changes: 3 additions & 6 deletions src/views/portfolio/projects/ProjectEpss.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ export default {
sortable: true,
formatter: (value, row, index) => {
let url = xssFilters.uriInUnQuotedAttr(
'../../../components/' + row.component.uuid,
'./components/' + row.component.uuid,
);
let dependencyGraphUrl = xssFilters.uriInUnQuotedAttr(
'../../../projects/' +
'./projects/' +
this.uuid +
'/dependencyGraph/' +
row.component.uuid,
Expand Down Expand Up @@ -155,10 +155,7 @@ export default {
sortable: true,
formatter(value, row, index) {
let url = xssFilters.uriInUnQuotedAttr(
'../../../vulnerabilities/' +
row.vulnerability.source +
'/' +
value,
'./vulnerabilities/' + row.vulnerability.source + '/' + value,
);
return (
common.formatSourceLabel(row.vulnerability.source) +
Expand Down
14 changes: 4 additions & 10 deletions src/views/portfolio/projects/ProjectFindings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,10 @@ export default {
sortable: true,
formatter: (value, row, index) => {
let url = xssFilters.uriInUnQuotedAttr(
'../../../components/' + row.component.uuid,
'./components/' + row.component.uuid,
);
let dependencyGraphUrl = xssFilters.uriInUnQuotedAttr(
'../../../projects/' +
'./projects/' +
this.uuid +
'/dependencyGraph/' +
row.component.uuid,
Expand Down Expand Up @@ -235,10 +235,7 @@ export default {
sortable: true,
formatter(value, row, index) {
let url = xssFilters.uriInUnQuotedAttr(
'../../../vulnerabilities/' +
row.vulnerability.source +
'/' +
value,
'./vulnerabilities/' + row.vulnerability.source + '/' + value,
);
return (
common.formatSourceLabel(row.vulnerability.source) +
Expand All @@ -260,10 +257,7 @@ export default {
for (let i = 0; i < aliases.length; i++) {
let alias = aliases[i];
let url = xssFilters.uriInUnQuotedAttr(
'../../../vulnerabilities/' +
alias.source +
'/' +
alias.vulnId,
'./vulnerabilities/' + alias.source + '/' + alias.vulnId,
);
label +=
common.formatSourceLabel(alias.source) +
Expand Down
2 changes: 1 addition & 1 deletion src/views/portfolio/projects/ProjectList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ export default {
field: 'name',
sortable: true,
formatter(value, row, index) {
let url = xssFilters.uriInUnQuotedAttr('../projects/' + row.uuid);
let url = xssFilters.uriInUnQuotedAttr('./projects/' + row.uuid);
return `<a href="${url}">${xssFilters.inHTMLData(value)}</a>`;
},
},
Expand Down
4 changes: 2 additions & 2 deletions src/views/portfolio/projects/ProjectPolicyViolations.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,15 @@ export default {
formatter: (value, row, index) => {
if (row.component) {
let url = xssFilters.uriInUnQuotedAttr(
'../../../components/' + row.component.uuid,
'./components/' + row.component.uuid,
);
let name = common.concatenateComponentName(
null,
row.component.name,
row.component.version,
);
let dependencyGraphUrl = xssFilters.uriInUnQuotedAttr(
'../../../projects/' +
'./projects/' +
this.uuid +
'/dependencyGraph/' +
row.component.uuid,
Expand Down
4 changes: 1 addition & 3 deletions src/views/portfolio/projects/ProjectServices.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ export default {
field: 'name',
sortable: true,
formatter(value, row, index) {
let url = xssFilters.uriInUnQuotedAttr(
'../../../services/' + row.uuid,
);
let url = xssFilters.uriInUnQuotedAttr('./services/' + row.uuid);
return `<a href="${url}">${xssFilters.inHTMLData(value)}</a>`;
},
},
Expand Down
4 changes: 2 additions & 2 deletions src/views/portfolio/vulnerabilities/VulnerabilityList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export default {
sortable: true,
formatter(value, row, index) {
let url = xssFilters.uriInUnQuotedAttr(
'../vulnerabilities/' + row.source + '/' + value,
'./vulnerabilities/' + row.source + '/' + value,
);
return (
common.formatSourceLabel(row.source) +
Expand All @@ -93,7 +93,7 @@ export default {
for (let i = 0; i < aliases.length; i++) {
let alias = aliases[i];
let url = xssFilters.uriInUnQuotedAttr(
'../vulnerabilities/' + alias.source + '/' + alias.vulnId,
'./vulnerabilities/' + alias.source + '/' + alias.vulnId,
);
label +=
common.formatSourceLabel(alias.source) +
Expand Down
Loading