Skip to content

Commit 0a4e519

Browse files
aravindparappil46nscuro
authored andcommitted
Bind i18n Object To SeverityProgressBar Props
When instantiating the SeverityProgressBar ComponentClass, the $t prop should be passed to it, so that the messages in the tooltip of the progress bar are rendered Signed-off-by: Aravind Parappil <[email protected]>
1 parent 8c2c6ff commit 0a4e519

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

src/views/portfolio/components/ComponentSearch.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ export default {
330330
field: 'metrics',
331331
sortable: false,
332332
visible: false,
333-
formatter(metrics, row, index) {
333+
formatter: function (metrics, row, index) {
334334
if (typeof metrics === 'undefined') {
335335
return '-'; // No vulnerability info available
336336
}
@@ -345,11 +345,12 @@ export default {
345345
medium: metrics.medium,
346346
low: metrics.low,
347347
unassigned: metrics.unassigned,
348+
$t: this.$t.bind(this),
348349
},
349350
});
350351
progressBar.$mount();
351352
return progressBar.$el.outerHTML;
352-
},
353+
}.bind(this),
353354
},
354355
],
355356
data: [],

src/views/portfolio/projects/ProjectComponents.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ export default {
275275
title: this.$t('message.vulnerabilities'),
276276
field: 'metrics',
277277
sortable: false,
278-
formatter(metrics, row, index) {
278+
formatter: function (metrics, row, index) {
279279
if (typeof metrics === 'undefined') {
280280
return '-'; // No vulnerability info available
281281
}
@@ -290,11 +290,12 @@ export default {
290290
medium: metrics.medium,
291291
low: metrics.low,
292292
unassigned: metrics.unassigned,
293+
$t: this.$t.bind(this),
293294
},
294295
});
295296
progressBar.$mount();
296297
return progressBar.$el.outerHTML;
297-
},
298+
}.bind(this),
298299
},
299300
],
300301
data: [],

src/views/portfolio/projects/ProjectServices.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export default {
8282
title: this.$t('message.vulnerabilities'),
8383
field: 'metrics',
8484
sortable: false,
85-
formatter(metrics, row, index) {
85+
formatter: function (metrics, row, index) {
8686
if (typeof metrics === 'undefined') {
8787
return '-'; // No vulnerability info available
8888
}
@@ -97,11 +97,12 @@ export default {
9797
medium: metrics.medium,
9898
low: metrics.low,
9999
unassigned: metrics.unassigned,
100+
$t: this.$t.bind(this),
100101
},
101102
});
102103
progressBar.$mount();
103104
return progressBar.$el.outerHTML;
104-
},
105+
}.bind(this),
105106
},
106107
],
107108
data: [],

0 commit comments

Comments
 (0)