Skip to content

Commit

Permalink
Merge pull request #1082 from nscuro/issue-1081
Browse files Browse the repository at this point in the history
  • Loading branch information
nscuro authored Nov 10, 2024
2 parents 0244383 + f359ed3 commit b4a4b1a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/views/portfolio/tags/TagList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import TaggedNotificationRuleListModal from '@/views/portfolio/tags/TaggedNotifi
import TaggedPoliciesListModal from '@/views/portfolio/tags/TaggedPoliciesListModal.vue';
import TaggedProjectListModal from '@/views/portfolio/tags/TaggedProjectListModal.vue';
import i18n from '@/i18n';
import MurmurHash2 from 'imurmurhash';
export default {
mixins: [bootstrapTableMixin, permissionsMixin, routerMixin],
components: {
Expand Down Expand Up @@ -195,7 +197,7 @@ export default {
},
buttonsOrder: ['btnDeleteSelected', 'refresh', 'columns'],
clickToSelect: true,
uniqueId: 'name',
uniqueId: 'nameHash',
search: true,
showColumns: true,
showRefresh: true,
Expand All @@ -212,6 +214,11 @@ export default {
refresh: 'fa-refresh',
},
responseHandler: function (res, xhr) {
for (let tag of res) {
// Tag names with special characters can break table rendering.
// https://github.com/DependencyTrack/dependency-track/issues/4357
tag.nameHash = MurmurHash2(tag.name).result();
}
res.total = xhr.getResponseHeader('X-Total-Count');
return res;
},
Expand Down

0 comments on commit b4a4b1a

Please sign in to comment.