Skip to content

Commit

Permalink
add integrity check column in project component view
Browse files Browse the repository at this point in the history
  • Loading branch information
sahibamittal committed Aug 28, 2023
1 parent e9a20d9 commit fbc188d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@
"vulnerability_deleted": "Vulnerability deleted",
"created": "Created",
"internal": "Internal",
"integrity_check": "Integrity Check",
"latest_version": "Latest Version",
"metric_refresh_requested": "A refresh has been requested. Metrics will be updated when the refresh task has completed.",
"used_by": "Used By",
Expand Down
20 changes: 20 additions & 0 deletions src/views/portfolio/projects/ProjectComponents.vue
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,26 @@ import SeverityProgressBar from "../../components/SeverityProgressBar";
return value === true ? '<i class="fa fa-check-square-o" />' : "";
},
},
{
title: this.$t('message.integrity_check'),
field: "integrityCheckStatus",
sortable: true,
formatter: (value, row, index) => {
if (Object.prototype.hasOwnProperty.call(row, "integrityAnalysis") && Object.prototype.hasOwnProperty.call(row.integrityAnalysis, "integrityCheckPassed")) {
row.lastCheck = row.integrityAnalysis.lastCheck;
if (typeof row.lastCheck !== 'undefined') {
row.lastCheck = common.formatTimestamp(row.lastCheck);
}
if (row.integrityAnalysis.integrityCheckPassed == false) {
return '<span style="float:right" data-toggle="tooltip" data-placement="bottom" title="Integrity Check FAILED "><i class="fa fa-exclamation-triangle status-warning" aria-hidden="true"></i></span> ' + xssFilters.inHTMLData(row.lastCheck);
} else {
return '<span style="float:right" data-toggle="tooltip" data-placement="bottom" title="Integrity Check PASSED "><i class="fa fa-check status-passed" aria-hidden="true"></i></span> ' + xssFilters.inHTMLData(row.lastCheck);
}
} else {
return xssFilters.inHTMLData(common.valueWithDefault(value, ""));
}
}
},
{
title: this.$t('message.license'),
field: "license",
Expand Down

0 comments on commit fbc188d

Please sign in to comment.