Skip to content

Commit

Permalink
address feedback
Browse files Browse the repository at this point in the history
Signed-off-by: leec94 <leec94@bu.edu>
  • Loading branch information
leec94 committed Jun 17, 2024
1 parent 7622b08 commit f46a957
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 20 deletions.
6 changes: 3 additions & 3 deletions src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -806,9 +806,9 @@
"index_general_description": "Dependency Track uses Apache Lucene to enable full-text search on various entities like projects or vulnerabilities.",
"index_use_cases": "The full-text search feature is principally used for the search API (i.e. all the indexes) and internal analyzer fuzzy matching on CPE (i.e. the vulnerable software index).",
"index_issues_description": "The lucene indexes can degrade or drift from Dependency Track database over time. Even though DT does its best to minimize the drift, the administrative features below are provided to check or restore the indexes if need be. It must be used with caution.",
"index_risk_score_description": "Dependency Track calculates the risk score of each project as a weighted severity score using the following calculation as default: ",
"index_risk_score_calc": "((critical * 10) + (high * 5) + (medium * 3) + (low * 1) + (unassigned * 5))",
"index_risk_score_weighting_description": "You can customize the weighting of each severity to customize the risk score.",
"risk_score_description": "Dependency Track calculates the risk score of each project as a weighted severity score using the following calculation as default: ",
"risk_score_calc": "((critical * 10) + (high * 5) + (medium * 3) + (low * 1) + (unassigned * 5))",
"risk_score_weighting_description": "You can customize the weighting of each severity to customize the risk score.",
"enable_risk_score_history_check": "Recalculate risk score weighting on project history",
"risk_score_weight_critical": "Critical (default: 10)",
"risk_score_weight_high": "High (default: 5)",
Expand Down
20 changes: 3 additions & 17 deletions src/views/administration/configuration/RiskScore.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<template>
<div>
<p>{{ $t('admin.index_risk_score_description') }}</p>
<p>{{ $t('admin.index_risk_score_calc') }}</p>
<p>{{ $t('admin.risk_score_description') }}</p>
<p>{{ $t('admin.risk_score_calc') }}</p>
<br/>
<b-card no-body :header="headers.customRiskScore">
<b-card-body>
<p>{{ $t('admin.index_risk_score_weighting_description') }}</p>
<p>{{ $t('admin.risk_score_weighting_description') }}</p>
<c-switch id="weight.history.enabled" color="primary" v-model="customRiskScore.enabled" label v-bind="labelIcon" />{{$t('admin.enable_risk_score_history_check')}}
<b-validated-input-group-form-input
id="custom-risk-score-critical"
Expand Down Expand Up @@ -140,20 +140,6 @@
{groupName: 'risk-score', propertyName: 'weight.low', propertyValue: this.customRiskScore.low},
{groupName: 'risk-score', propertyName: 'weight.unassigned', propertyValue: this.customRiskScore.unassigned}
]);
},
reindex: function() {
let url = `${this.$api.BASE_URL}/${this.$api.URL_SEARCH}/reindex`;
let params = new URLSearchParams();
Object.entries(this.type).forEach(([key, value]) => {
if(value) {
params.append('type', key.toUpperCase());
}
});
this.axios.post(url, null, { params: params }).then((response) => {
this.$toastr.s(this.$t('admin.reindex_submitted'));
}).catch((error) => {
this.$toastr.s(this.$t('admin.reindex_error'));
});
}
}
}
Expand Down

0 comments on commit f46a957

Please sign in to comment.