Skip to content

Commit

Permalink
fix linting errors
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Setch <[email protected]>
  • Loading branch information
setchy committed Feb 29, 2024
1 parent ab9a085 commit 3fcdeca
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -892,4 +892,4 @@
"message": "The page you're looking for could not be found",
"action": "Go Back"
}
}
}
10 changes: 8 additions & 2 deletions src/shared/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ $common.formatProjectTagLabel = function formatProjectTagLabel(router, tag) {
if (!tag) {
return '';
}
return `<a href="${router.resolve({ name: 'Projects', query: { tag: tag.name } }).href}" class="badge badge-tag text-lowercase mr-1">${xssFilters.inHTMLData(tag.name)}</a>`;
return `<a href="${
router.resolve({ name: 'Projects', query: { tag: tag.name } }).href
}" class="badge badge-tag text-lowercase mr-1">${xssFilters.inHTMLData(
tag.name,
)}</a>`;
};

/**
Expand Down Expand Up @@ -408,7 +412,9 @@ $common.componentClassifierLabelProjectUrlFormatter = (i18n) => {
case 'DEVICE':
case 'FIRMWARE':
case 'FILE':
return `<a href="${url}">${i18n.$t(`message.component_${value.toLowerCase()}`)}</a>`;
return `<a href="${url}">${i18n.$t(
`message.component_${value.toLowerCase()}`,
)}</a>`;
default:
return null;
}
Expand Down
11 changes: 9 additions & 2 deletions src/views/portfolio/projects/Component.vue
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,15 @@
v-on:total="totalVulnerabilities = $event"
/>
</b-tab>
<b-tab @click="$router.push(`/components#/search/PACKAGE_URL/${component.purl}`)">
<template v-slot:title><i class="fa fa-cubes"></i> {{ $t('message.projects_also_used_in') }}</template>
<b-tab
@click="
$router.push(`/components#/search/PACKAGE_URL/${component.purl}`)
"
>
<template v-slot:title
><i class="fa fa-cubes"></i>
{{ $t('message.projects_also_used_in') }}</template
>
</b-tab>
</b-tabs>
<component-details-modal
Expand Down
4 changes: 3 additions & 1 deletion src/views/portfolio/projects/ComponentDetailsModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,9 @@ export default {
let url = xssFilters.uriInUnQuotedAttr(
common.valueWithDefault(value, ''),
);
return `<a href="${url}">${xssFilters.inHTMLData(common.valueWithDefault(value, ''))}</a>`;
return `<a href="${url}">${xssFilters.inHTMLData(
common.valueWithDefault(value, ''),
)}</a>`;
},
},
{
Expand Down
4 changes: 3 additions & 1 deletion src/views/portfolio/projects/ComponentVulnerabilities.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ export default {
);
label +=
common.formatSourceLabel(alias.source) +
` <a href="${url}">${xssFilters.inHTMLData(alias.vulnId)}</a>`;
` <a href="${url}">${xssFilters.inHTMLData(
alias.vulnId,
)}</a>`;
if (i < aliases.length - 1) label += '<br/><br/>';
}
return label;
Expand Down
6 changes: 5 additions & 1 deletion src/views/portfolio/projects/ProjectDependencyGraph.vue
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,11 @@ export default {
this.$route.params.componentUuids,
);
this.loading = true;
let url = `${this.$api.BASE_URL}/${this.$api.URL_COMPONENT}/project/${this.project.uuid}/dependencyGraph/${encodeURIComponent(this.$route.params.componentUuids)}`;
let url = `${this.$api.BASE_URL}/${this.$api.URL_COMPONENT}/project/${
this.project.uuid
}/dependencyGraph/${encodeURIComponent(
this.$route.params.componentUuids,
)}`;
this.axios.get(url).then((response) => {
if (response.data && Object.keys(response.data).length > 0) {
this.notFound = false;
Expand Down
4 changes: 3 additions & 1 deletion src/views/portfolio/projects/ProjectDetailsModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,9 @@ export default {
let url = xssFilters.uriInUnQuotedAttr(
common.valueWithDefault(value, ''),
);
return `<a href="${url}">${xssFilters.inHTMLData(common.valueWithDefault(value, ''))}</a>`;
return `<a href="${url}">${xssFilters.inHTMLData(
common.valueWithDefault(value, ''),
)}</a>`;
},
},
{
Expand Down
4 changes: 3 additions & 1 deletion src/views/portfolio/projects/ProjectFindings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,9 @@ export default {
);
label +=
common.formatSourceLabel(alias.source) +
` <a href="${url}">${xssFilters.inHTMLData(alias.vulnId)}</a>`;
` <a href="${url}">${xssFilters.inHTMLData(
alias.vulnId,
)}</a>`;
if (i < aliases.length - 1) label += '<br/><br/>';
}
return label;
Expand Down
4 changes: 3 additions & 1 deletion src/views/portfolio/projects/ServiceDetailsModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,9 @@ export default {
let url = xssFilters.uriInUnQuotedAttr(
common.valueWithDefault(value, ''),
);
return `<a href="${url}">${xssFilters.inHTMLData(common.valueWithDefault(value, ''))}</a>`;
return `<a href="${url}">${xssFilters.inHTMLData(
common.valueWithDefault(value, ''),
)}</a>`;
},
},
{
Expand Down
4 changes: 3 additions & 1 deletion src/views/portfolio/vulnerabilities/VulnerabilityList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ export default {
);
label +=
common.formatSourceLabel(alias.source) +
` <a href="${url}">${xssFilters.inHTMLData(alias.vulnId)}</a>`;
` <a href="${url}">${xssFilters.inHTMLData(
alias.vulnId,
)}</a>`;
if (i < aliases.length - 1) label += '<br/><br/>';
}
return label;
Expand Down

0 comments on commit 3fcdeca

Please sign in to comment.