File tree Expand file tree Collapse file tree 2 files changed +28
-15
lines changed Expand file tree Collapse file tree 2 files changed +28
-15
lines changed Original file line number Diff line number Diff line change 55 </b-progress >
66 </span >
77 <span v-else class =" progress" >
8- <b-progress class =" table-progress" :max =" total" show-value >
9- <b-progress-bar :value =" info" class =" severity-info-bg" ></b-progress-bar >
10- <b-progress-bar :value =" warn" class =" severity-warn-bg" ></b-progress-bar >
11- <b-progress-bar :value =" fail" class =" severity-fail-bg" ></b-progress-bar >
12- </b-progress >
8+ <span :id =" 'progressbar' + hoverId" class =" table-progress" >
9+ <b-progress class =" table-progress" :max =" total" show-value >
10+ <b-progress-bar :value =" info" class =" severity-info-bg" ></b-progress-bar >
11+ <b-progress-bar :value =" warn" class =" severity-warn-bg" ></b-progress-bar >
12+ <b-progress-bar :value =" fail" class =" severity-fail-bg" ></b-progress-bar >
13+ </b-progress >
14+ </span >
15+ <b-tooltip :target =" 'progressbar' + hoverId" placement =" left" noninteractive >
16+ Info: {{ info }}<br >
17+ Warn: {{ warn }}<br >
18+ Fail: {{ fail }}<br >
19+ Total: {{ total }}<br >
20+ </b-tooltip >
1321 </span >
1422</template >
1523
1624<script >
17- export default {
18- props: {
19- total: Number ,
20- info: Number ,
21- warn: Number ,
22- fail: Number ,
23- }
24- }
25+ export default {
26+ props: {
27+ total: Number ,
28+ info: Number ,
29+ warn: Number ,
30+ fail: Number ,
31+ },
32+ data () {
33+ return {
34+ // Workaround for vue references to the progress-bars. Using the ref targets doesn't seem to work.
35+ hoverId: Math .random ().toString (36 ),
36+ };
37+ },
38+ }
2539 </script >
Original file line number Diff line number Diff line change 125125 if (typeof metrics === " undefined" ) {
126126 return " -" ; // No vulnerability info available
127127 }
128- console .log (metrics);
129128
130129 let ComponentClass = Vue .extend (PolicyViolationProgressBar);
131130 let progressBar = new ComponentClass ({
132131 propsData: {
133132 total: metrics .policyViolationsTotal ,
134133 warn: metrics .policyViolationsWarn ,
135134 fail: metrics .policyViolationsFail ,
136- info: metrics .policyViolationsInfo
135+ info: metrics .policyViolationsInfo ,
137136 }
138137 });
139138 progressBar .$mount ();
You can’t perform that action at this time.
0 commit comments