Skip to content

Commit

Permalink
Merge pull request #686 from mykter/608-fix-column-settings
Browse files Browse the repository at this point in the history
Use unique fields for project list metrics columns
  • Loading branch information
nscuro authored Dec 21, 2023
2 parents b3e1586 + 970c04a commit 3872283
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/views/portfolio/projects/ProjectList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,9 @@ import ProjectCreateProjectModal from "./ProjectCreateProjectModal";
},
{
title: this.$t('message.policy_violations'),
field: "metrics",
formatter: function (metrics) {
field: "metrics.policyViolationsTotal", // this column uses other fields, but the field id must be unique
formatter: function (_, row) {
let metrics = row.metrics
if (typeof metrics === "undefined") {
return "-"; // No vulnerability info available
}
Expand All @@ -270,9 +271,10 @@ import ProjectCreateProjectModal from "./ProjectCreateProjectModal";
},
{
title: this.$t('message.vulnerabilities'),
field: "metrics",
field: "metrics.vulnerabilities", // this column uses other fields, but the field id must be unique
sortable: false,
formatter(metrics, row, index) {
formatter(_, row) {
let metrics = row.metrics
if (typeof metrics === "undefined") {
return "-"; // No vulnerability info available
}
Expand Down

0 comments on commit 3872283

Please sign in to comment.