File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 1313 </b-progress >
1414 </span >
1515 <b-tooltip :target =" 'progressbar' + hoverId" placement =" left" noninteractive >
16- Info: {{ info }}<br >
17- Warn: {{ warn }}<br >
18- Fail: {{ fail }}<br >
19- Total: {{ total }}<br >
16+ <div style =" text-align : left ;" >
17+ {{$t('policy_violation.infos')}}: {{ info }}<br >
18+ {{$t('policy_violation.warns')}}: {{ warn }}<br >
19+ {{$t('policy_violation.fails')}}: {{ fail }}<br >
20+ {{$t('message.total')}}: {{ total }}<br >
21+ </div >
2022 </b-tooltip >
2123 </span >
2224</template >
@@ -28,6 +30,7 @@ export default {
2830 info: Number ,
2931 warn: Number ,
3032 fail: Number ,
33+ $t: Function ,
3134 },
3235 data () {
3336 return {
Original file line number Diff line number Diff line change 121121 {
122122 title: this .$t (' message.policy_violations' ),
123123 field: " metrics" ,
124- formatter ( metrics , row , index ) {
124+ formatter : function ( metrics ) {
125125 if (typeof metrics === " undefined" ) {
126126 return " -" ; // No vulnerability info available
127127 }
128-
129128 let ComponentClass = Vue .extend (PolicyViolationProgressBar);
130129 let progressBar = new ComponentClass ({
131130 propsData: {
132131 total: metrics .policyViolationsTotal ,
133132 warn: metrics .policyViolationsWarn ,
134133 fail: metrics .policyViolationsFail ,
135134 info: metrics .policyViolationsInfo ,
135+ $t: this .$t .bind (this ),
136136 }
137137 });
138138 progressBar .$mount ();
139139 return progressBar .$el .outerHTML ;
140- }
140+ }. bind ( this )
141141 },
142142 {
143143 title: this .$t (' message.vulnerabilities' ),
You can’t perform that action at this time.
0 commit comments