Skip to content

Commit 6f1d4b3

Browse files
Moved individual component url back to a base of /components/:uuid. Updated condition logic
1 parent e47618b commit 6f1d4b3

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/views/portfolio/projects/ProjectFindings.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
field: "component.name",
4949
sortable: true,
5050
formatter(value, row, index) {
51-
let url = xssFilters.uriInUnQuotedAttr("../projects/" + row.component.project + "/" + row.component.uuid);
51+
let url = xssFilters.uriInUnQuotedAttr("../components/" + row.component.uuid);
5252
return `<a href="${url}">${xssFilters.inHTMLData(value)}</a>`;
5353
}
5454
},

src/views/portfolio/projects/ProjectPolicyViolations.vue

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export default {
7676
field: "component.name",
7777
sortable: true,
7878
formatter(value, row, index) {
79-
let url = xssFilters.uriInUnQuotedAttr("../projects/" + row.component.project.uuid + "/" + row.component.uuid);
79+
let url = xssFilters.uriInUnQuotedAttr("../components/" + row.component.uuid);
8080
let versionString = "";
8181
if (row.component.version) {
8282
versionString = " " + row.component.version;
@@ -174,6 +174,10 @@ export default {
174174
</b-form-group>
175175
</div>
176176
177+
<b-form-group id="failedCondition" :label="this.$t('message.condition')" label-for="failedCondition-input">
178+
<b-form-textarea id="failedCondition-input" v-model="conditionString" rows="3" class="form-control disabled" readonly trim />
179+
</b-form-group>
180+
177181
</b-col>
178182
<b-col sm="6">
179183
<b-form-group id="fieldset-7" :label="this.$t('message.audit_trail')" label-for="auditTrailField">
@@ -209,6 +213,11 @@ export default {
209213
projectUuid: projectUuid
210214
}
211215
},
216+
computed: {
217+
conditionString: function() {
218+
return "subject == " + this.violation.policyCondition.subject + " && value " + this.violation.policyCondition.operator + " " + this.violation.policyCondition.value;
219+
}
220+
},
212221
watch: {
213222
isSuppressed: function (currentValue, oldValue) {
214223
if (oldValue != null) {

0 commit comments

Comments
 (0)