Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into issue-2529-add-to…
Browse files Browse the repository at this point in the history
…ggle-for-integriry-check
  • Loading branch information
sahibamittal committed Aug 24, 2023
2 parents f5df3d6 + 16735ff commit e9a20d9
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile.alpine
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nginxinc/nginx-unprivileged:1.25.1-alpine@sha256:05696001775e33798fccab756b8a9441671aa961718019d7097fb7c75dae69b6
FROM nginxinc/nginx-unprivileged:1.25.1-alpine@sha256:279824ecfd934ab8cf08b5e4debabdc711c5768371203263f2d5c5141423ed80

# Arguments that can be passed at build time
ARG COMMIT_SHA=unknown
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@
"template": "Template",
"source_header": "Source Header",
"license_name": "License Name",
"license_expression": "SPDX Expression",
"license_url": "License URL",
"required_license_name": "The license name is required",
"license_name_desc": "The name of the license as provided by the supplier",
Expand Down Expand Up @@ -309,6 +310,7 @@
"component_swid_tagid_desc": "The ISO/IEC 19770-2:2015 (SWID) tag ID provided by the software vendor",
"component_classifier_desc": "Specifies the type of component: Assets (applications, operating systems, and hardware) and non-assets (libraries, frameworks, and files)",
"component_spdx_license_desc": "Specifies the SPDX license ID of the component",
"component_license_expression_desc": "Specifies license information for the component in the form of an SPDX expression",
"component_license_url_desc": "Specifies the URL to the license of the component",
"component_filename_desc": "Specifies the observed filename of the component",
"component_hash_desc": "Specifies the observed hash value of the component using the preceding algorithm",
Expand Down
6 changes: 6 additions & 0 deletions src/views/portfolio/projects/ComponentDetailsModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
v-model="selectedLicense" :options="selectableLicenses"
:label="$t('message.license')" :tooltip="$t('message.component_spdx_license_desc')"
:disabled="this.isNotPermitted(PERMISSIONS.PORTFOLIO_MANAGEMENT)" />
<b-input-group-form-input id="component-license-expression" input-group-size="mb-3" type="text" v-model="component.licenseExpression"
required="false" :label="$t('message.license_expression')" :tooltip="$t('message.component_license_expression_desc')"
:readonly="this.isNotPermitted(PERMISSIONS.PORTFOLIO_MANAGEMENT)" />
<b-input-group-form-input id="component-license-url-input" input-group-size="mb-3" type="text" v-model="component.licenseUrl"
required="false" :label="$t('message.license_url')" :tooltip="$t('message.component_license_url_desc')"
:readonly="this.isNotPermitted(PERMISSIONS.PORTFOLIO_MANAGEMENT)" />
Expand Down Expand Up @@ -221,6 +224,7 @@
author: this.component.author,
description: this.component.description,
license: this.selectedLicense,
licenseExpression: this.component.licenseExpression,
licenseUrl: this.component.licenseUrl,
filename: this.component.filename,
classifier: this.component.classifier,
Expand Down Expand Up @@ -255,6 +259,8 @@
retrieveLicenses: function() {
let url = `${this.$api.BASE_URL}/${this.$api.URL_LICENSE_CONCISE}`;
this.axios.get(url).then((response) => {
// Allow for license to be un-selected.
this.selectableLicenses.push({value: '', text: ''});
for (let i = 0; i < response.data.length; i++) {
let license = response.data[i];
this.selectableLicenses.push({value: license.licenseId, text: license.name, uuid: license.uuid});
Expand Down
8 changes: 8 additions & 0 deletions src/views/portfolio/projects/ProjectAddComponentModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@
<b-input-group-form-select id="component-license-input" required="false"
v-model="selectedLicense" :options="selectableLicenses"
:label="$t('message.license')" :tooltip="$t('message.component_spdx_license_desc')" />
<b-input-group-form-input id="component-license-expression" input-group-size="mb-3" type="text" v-model="component.licenseExpression"
required="false" :label="$t('message.license_expression')" :tooltip="$t('message.component_license_expression_desc')" />
<b-input-group-form-input id="component-license-url-input" input-group-size="mb-3" type="text" v-model="component.licenseUrl"
required="false" :label="$t('message.license_url')" :tooltip="$t('message.component_license_url_desc')" />
<b-form-group
id="component-copyright-form-group"
:label="this.$t('message.copyright')"
Expand Down Expand Up @@ -138,6 +142,7 @@
group: this.component.group,
description: this.component.description,
license: this.selectedLicense,
licenseExpression: this.component.licenseExpression,
licenseUrl: this.component.licenseUrl,
filename: this.component.filename,
classifier: this.component.classifier,
Expand Down Expand Up @@ -167,6 +172,7 @@
group: null,
description: null,
license: null,
licenseExpression: null,
licenseUrl:null,
filename: null,
classifier: null,
Expand All @@ -186,6 +192,8 @@
retrieveLicenses: function() {
let url = `${this.$api.BASE_URL}/${this.$api.URL_LICENSE_CONCISE}`;
this.axios.get(url).then((response) => {
// Allow for license to be un-selected.
this.selectableLicenses.push({value: '', text: ''});
for (let i = 0; i < response.data.length; i++) {
let license = response.data[i];
this.selectableLicenses.push({value: license.licenseId, text: license.name});
Expand Down
6 changes: 5 additions & 1 deletion src/views/portfolio/projects/ProjectComponents.vue
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,12 @@ import SeverityProgressBar from "../../components/SeverityProgressBar";
if (Object.prototype.hasOwnProperty.call(row, "resolvedLicense")) {
let licenseurl = "../../../licenses/" + row.resolvedLicense.licenseId;
return "<a href=\"" + licenseurl + "\">" + xssFilters.inHTMLData(row.resolvedLicense.licenseId) + "</a>";
} else {
} else if (value) {
return xssFilters.inHTMLData(common.valueWithDefault(value, ""));
} else if (row.licenseExpression) {
return xssFilters.inHTMLData(common.valueWithDefault(row.licenseExpression, ""));
} else {
return "";
}
}
},
Expand Down

0 comments on commit e9a20d9

Please sign in to comment.