@@ -134,11 +134,10 @@ function plotPie(div, data) {
134134 pie : {
135135 show : true ,
136136 radius : 1 ,
137- label : { radius : 3 / 4 ,
137+ stroke : { color : "#eee" , width : 0.5 } ,
138+ label : { radius : 5 / 8 ,
138139 show : true ,
139- formatter : function ( label , series ) {
140- return '<div style="font-size:8pt;text-align:center;padding:2px;color:white;">' + label + '<br/>' + Math . round ( series . percent ) + '%</div>' ;
141- } ,
140+ threshold : 0.01 ,
142141 }
143142 }
144143 } ,
@@ -242,16 +241,21 @@ function processData(project) {
242241$ ( document ) . ready ( function ( ) {
243242 // Set up the datepicker divs
244243 $ ( '.datepicker' ) . datepicker ( { dateFormat : 'yy-mm-dd' } ) ;
245- $ ( '#total' ) . html ( "Total: " + ( totalSuccess + totalFail + totalMiss ) ) ;
246- $ ( '#success' ) . html ( "Success: " + totalSuccess ) ;
247- $ ( '#failed' ) . html ( "Failed: " + totalFail ) ;
248- $ ( '#missed' ) . html ( "Missed: " + totalMiss ) ;
244+
245+ $ ( '#total' ) . html ( totalSuccess + totalFail + totalMiss ) ;
246+ $ ( '#success' ) . html ( totalSuccess ) ;
247+ $ ( '#failed' ) . html ( totalFail ) ;
248+ $ ( '#missed' ) . html ( totalMiss ) ;
249+ $ ( '#totalps' ) . html ( patchsetSuccess + patchsetFail + patchsetMiss ) ;
250+ $ ( '#successps' ) . html ( patchsetSuccess ) ;
251+ $ ( '#failedps' ) . html ( patchsetFail ) ;
252+ $ ( '#missedps' ) . html ( patchsetMiss ) ;
249253
250254 // Process the nova data and setup the nova charts
251255 var novaData = processData ( "nova" ) ;
252256 var novaSums = novaData [ 0 ] ;
253257 var totalNova = novaSums [ 0 ] + novaSums [ 1 ] + novaSums [ 2 ] ;
254- $ ( "#novaInfo" ) . html ( "<h3 >Total: " + totalNova + "</h3><h3 >Success: " + novaSums [ 1 ] + "</h3><h3 >Failed: " + novaSums [ 0 ] + "</h3><h3 >Missed: " + novaSums [ 2 ] + "</h3>" ) ;
258+ $ ( "#novaInfo" ) . html ( "<strong >Total:</strong> " + totalNova + "<br /><strong >Success:</strong> " + novaSums [ 1 ] + "<br /><strong >Failed:</strong> " + novaSums [ 0 ] + "<br /><strong >Missed:</strong> " + novaSums [ 2 ] ) ;
255259 if ( totalNova > 0 ) {
256260 novaData = novaData [ 1 ] ;
257261 insertCheckBoxes ( "#novachartlegend" , novaData , "nova" ) ;
@@ -270,7 +274,7 @@ $(document).ready(function() {
270274 var neutronData = processData ( "neutron" ) ;
271275 var neutronSums = neutronData [ 0 ] ;
272276 var totalNeutron = neutronSums [ 0 ] + neutronSums [ 1 ] + neutronSums [ 2 ] ;
273- $ ( "#neutronInfo" ) . html ( "<h3 >Total: " + totalNeutron + "</h3><h3 >Success: " + neutronSums [ 1 ] + "</h3><h3 >Failed: " + neutronSums [ 0 ] + "</h3><h3 >Missed: " + neutronSums [ 2 ] + "</h3>" ) ;
277+ $ ( "#neutronInfo" ) . html ( "<strong >Total:</strong> " + totalNeutron + "<br /><strong >Success:</strong> " + neutronSums [ 1 ] + "<br /><strong >Failed:</strong> " + neutronSums [ 0 ] + "<br /><strong >Missed:</strong> " + neutronSums [ 2 ] ) ;
274278 if ( totalNeutron > 0 ) {
275279 neutronData = neutronData [ 1 ] ;
276280 insertCheckBoxes ( "#neutronchartlegend" , neutronData , "neutron" ) ;
@@ -284,4 +288,18 @@ $(document).ready(function() {
284288 } else {
285289 $ ( "#neutronchart" ) . html ( "<p>No data available or has been unselected in data model.</p>" ) . css ( { height : 'auto' } ) ;
286290 }
291+ $ ( "#sidebar" ) . css ( { "width" : "auto" , "max-width" : "200px" } ) ;
292+ $ ( "#sidebar" ) . width ( "auto" ) ;
293+ $ ( "#main" ) . css ( "padding-left" , $ ( "#sidebar" ) . width ( ) + 20 ) ;
294+ $ ( "#print" ) . click ( function ( e ) {
295+ var win = window . open ( ) ;
296+ win . document . write ( "<table>" ) ;
297+ win . document . write ( "<tr><td><h3>Nova</h3>" + $ ( "#novaInfo" ) . html ( ) + "</td>" ) ;
298+ win . document . write ( "<td><img src=\"" + $ ( "#novachart" ) . children ( ) [ 0 ] . toDataURL ( ) + "\"/></td>" ) ;
299+ win . document . write ( "<td><img src=\"" + $ ( "#novapiechart" ) . children ( ) [ 0 ] . toDataURL ( ) + "\"/></td></tr>" ) ;
300+ win . document . write ( "<tr><td><h3>Neutron</h3>" + $ ( "#neutronInfo" ) . html ( ) + "</td>" ) ;
301+ win . document . write ( "<td><img src=\"" + $ ( "#neutronchart" ) . children ( ) [ 0 ] . toDataURL ( ) + "\"/></td>" ) ;
302+ win . document . write ( "<td><img src=\"" + $ ( "#neutronpiechart" ) . children ( ) [ 0 ] . toDataURL ( ) + "\"/></td></tr>" ) ;
303+ win . document . write ( "</table>" ) ;
304+ } ) ;
287305} ) ;
0 commit comments