44
55{% block extrahead %}
66{{ parent () }}
7- <link rel =" stylesheet" href =" {{asset(' css/nv.d3.min.css' )}}" >
8- <script src =" {{asset(' js/d3.min.js' )}}" ></script >
9- <script src =" {{asset(' js/nv.d3.min.js' )}}" ></script >
10- <script src =" {{asset(' js/FileSaver.min.js' )}}" ></script >
7+ <link rel =" stylesheet" href =" {{ asset(' css/nv.d3.min.css' ) }}" >
8+ <script src =" {{ asset(' js/d3.min.js' ) }}" ></script >
9+ <script src =" {{ asset(' js/nv.d3.min.js' ) }}" ></script >
10+ <script src =" {{ asset(' js/FileSaver.min.js' ) }}" ></script >
1111<style >
1212.row.equal {
1313 display : flex ;
3535 <div class =" card-body" >
3636 <dl class =" row" >
3737 <dt class =" col-sm-6" ># Submissions</dt >
38- <dd class =" col-sm-6" >{{ submissions | length }}</dd >
38+ <dd class =" col-sm-6" >{{ submissions | length }}</dd >
3939
4040 <dt class =" col-sm-6" ># Correct</dt >
41- <dd class =" col-sm-6" >{{ results ['correct' ]| default (0 ) }} <span class =" text-muted" >({{ misc .correct_percentage | number_format (2 ) }}%)</span ></dd >
41+ <dd class =" col-sm-6" >{{ results ['correct' ] | default(0 ) }} <span class =" text-muted" >({{ misc .correct_percentage | number_format(2 ) }}%)</span ></dd >
4242 </dl >
4343 </div >
4444 </div >
6666 </div >
6767 <div class =" row equal" >
6868 {% for problem in problems %}
69- <div class =" col-3 mt-3" id =" maxruntime_{{problem .probid }}" >
69+ <div class =" col-3 mt-3" id =" maxruntime_{{ problem .probid }}" >
7070 <div class =" card" >
7171 <div class =" card-header" >
7272 Max Runtimes for problem {{ problem .name }}
@@ -97,7 +97,7 @@ set colors = {
9797$ (function (){
9898
9999 {% for problem in problems % }
100- var run_max_times_{{problem .probid }} = [
100+ var run_max_times_{{ problem .probid }} = [
101101 {
102102 key: " Max Runtimes" ,
103103 values: [
@@ -120,7 +120,7 @@ $(function(){
120120 .x (function (d ) { return d .label })
121121 .y (function (d ) { return d .value })
122122 .valueFormat (d3 .format (' .3f' ))
123- .staggerLabels (run_max_times_{{problem .probid }}[0 ].values .length > 10 )
123+ .staggerLabels (run_max_times_{{ problem .probid }}[0 ].values .length > 10 )
124124 .showValues (false )
125125 .forceY ([0 , {{ problem .timelimit * 1.20 }}])
126126 .margin ({bottom: 90 })
@@ -132,8 +132,8 @@ $(function(){
132132 .tickFormat (d3 .format (' .3f' ))
133133 .axisLabel (' Runtime(in s)' );
134134 chart .xAxis .axisLabel (" Judgings" );
135- d3 .select (' #maxruntime_{{problem.probid}} svg' )
136- .datum (run_max_times_{{problem .probid }})
135+ d3 .select (' #maxruntime_{{ problem.probid }} svg' )
136+ .datum (run_max_times_{{ problem .probid }})
137137 .call (chart);
138138 // Clicking on one of the bars takes you to the judgment
139139 chart .discretebar .dispatch .on (' elementClick' , function (e ) {
@@ -156,24 +156,24 @@ $(function(){
156156 });
157157
158158 // Create our timelimit line
159- d3 .select (' #maxruntime_{{problem.probid}} svg' )
159+ d3 .select (' #maxruntime_{{ problem.probid }} svg' )
160160 .append (' line' )
161161 .attr ({id: ' maxline' })
162162 .style (" stroke" , " #F00" );
163163
164164 var svgsize = chart .container .clientWidth || chart .container .parentNode .clientWidth ;
165- updateline_{{problem .probid }} = function (){
166- line = d3 .select (' #maxruntime_{{problem.probid}} svg #maxline' )
165+ updateline_{{ problem .probid }} = function (){
166+ line = d3 .select (' #maxruntime_{{ problem.probid }} svg #maxline' )
167167 .attr ({
168168 x1: chart .margin ().left ,
169- y1: chart .yAxis .scale ()({{problem .timelimit }})+ chart .margin ().top ,
169+ y1: chart .yAxis .scale ()({{ problem .timelimit }})+ chart .margin ().top ,
170170 x2: + svgsize - chart .margin ().right ,
171- y2: chart .yAxis .scale ()({{problem .timelimit }}) + chart .margin ().top ,
171+ y2: chart .yAxis .scale ()({{ problem .timelimit }}) + chart .margin ().top ,
172172 })
173173 }
174- updateline_{{problem .probid }}();
174+ updateline_{{ problem .probid }}();
175175 nv .utils .windowResize (function () {
176- updateline_{{problem .probid }}();
176+ updateline_{{ problem .probid }}();
177177 chart .update ()
178178 });
179179 return chart;
@@ -189,7 +189,7 @@ $(function(){
189189 values: [
190190 {% for result,count in results % }
191191 {
192- " label" : " {{result}}" ,
192+ " label" : " {{ result }}" ,
193193 " value" : {{ count }},
194194 " color" : " {{ colors[result] }}" ,
195195 },
@@ -227,8 +227,8 @@ $(function(){
227227 var submission_stats = [
228228 {% for result in [' correct' , ' wrong-answer' , ' timelimit' , ' run-error' , ' compiler-error' , ' no-output' ] % }
229229 {
230- key: " {{result}}" ,
231- color: " {{colors[result]}}" ,
230+ key: " {{ result }}" ,
231+ color: " {{ colors[result] }}" ,
232232 values: [
233233 {# TODO : make sure these are actually ordered by submittime #}
234234 {# TODO : also make sure these submissions are in the same contest #}
@@ -256,7 +256,7 @@ $(function(){
256256 .showYAxis (true ) // Show the y-axis
257257 .showXAxis (true ) // Show the x-axis
258258 .forceX ([0 , {{ (current_contest .endtime - current_contest .starttime ) / 60 }}])
259- .forceY ([0 , {{ submissions| length * 1.10 }}])
259+ .forceY ([0 , {{ submissions | length * 1.10 }}])
260260 ;
261261 chart .xAxis // Chart x-axis settings
262262 .axisLabel (' Contest Time(minutes)' )
0 commit comments