Skip to content

Commit c51e6e2

Browse files
Added frontend support for security policy violations - DependencyTrack/dependency-track#771
1 parent 70ce6ef commit c51e6e2

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/views/policy/PolicyCondition.vue

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
//{value: 'AGE', text: this.$t('message.age')},
6666
//{value: 'ANALYZER', text: this.$t('message.analyzer')},
6767
//{value: 'BOM', text: this.$t('message.bom')},
68+
{value: 'SEVERITY', text: this.$t('message.severity')},
6869
{value: 'COORDINATES', text: this.$t('message.coordinates')},
6970
{value: 'LICENSE', text: this.$t('message.license')},
7071
{value: 'LICENSE_GROUP', text: this.$t('message.license_group')},
@@ -101,6 +102,8 @@
101102
return true;
102103
case 'BOM':
103104
return true;
105+
case 'SEVERITY':
106+
return true;
104107
case 'COORDINATES':
105108
return false;
106109
case 'LICENSE':
@@ -140,6 +143,10 @@
140143
case 'BOM':
141144
this.operators = this.objectOperators;
142145
break;
146+
case 'SEVERITY':
147+
this.operators = this.objectOperators;
148+
this.populateSeverity()
149+
break;
143150
case 'COORDINATES':
144151
this.operators = this.regexOperators;
145152
break;
@@ -255,6 +262,16 @@
255262
this.$toastr.w(this.$t('condition.unsuccessful_action'));
256263
}
257264
});
265+
},
266+
populateSeverity: function () {
267+
this.possibleValues = [
268+
{value: "CRITICAL", text: this.$t('severity.critical')},
269+
{value: "HIGH", text: this.$t('severity.high')},
270+
{value: "MEDIUM", text: this.$t('severity.medium')},
271+
{value: "LOW", text: this.$t('severity.low')},
272+
{value: "INFO", text: this.$t('severity.info')},
273+
{value: "UNASSIGNED", text: this.$t('severity.unassigned')}
274+
];
258275
}
259276
}
260277
}

0 commit comments

Comments
 (0)