4
4
5
5
{% block extrahead %}
6
6
{{ 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 >
11
11
<style >
12
12
.row.equal {
13
13
display : flex ;
35
35
<div class =" card-body" >
36
36
<dl class =" row" >
37
37
<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 >
39
39
40
40
<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 >
42
42
</dl >
43
43
</div >
44
44
</div >
66
66
</div >
67
67
<div class =" row equal" >
68
68
{% 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 }}" >
70
70
<div class =" card" >
71
71
<div class =" card-header" >
72
72
Max Runtimes for problem {{ problem .name }}
@@ -97,7 +97,7 @@ set colors = {
97
97
$ (function (){
98
98
99
99
{% for problem in problems % }
100
- var run_max_times_{{problem .probid }} = [
100
+ var run_max_times_{{ problem .probid }} = [
101
101
{
102
102
key: " Max Runtimes" ,
103
103
values: [
@@ -120,7 +120,7 @@ $(function(){
120
120
.x (function (d ) { return d .label })
121
121
.y (function (d ) { return d .value })
122
122
.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 )
124
124
.showValues (false )
125
125
.forceY ([0 , {{ problem .timelimit * 1.20 }}])
126
126
.margin ({bottom: 90 })
@@ -132,8 +132,8 @@ $(function(){
132
132
.tickFormat (d3 .format (' .3f' ))
133
133
.axisLabel (' Runtime(in s)' );
134
134
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 }})
137
137
.call (chart);
138
138
// Clicking on one of the bars takes you to the judgment
139
139
chart .discretebar .dispatch .on (' elementClick' , function (e ) {
@@ -156,24 +156,24 @@ $(function(){
156
156
});
157
157
158
158
// Create our timelimit line
159
- d3 .select (' #maxruntime_{{problem.probid}} svg' )
159
+ d3 .select (' #maxruntime_{{ problem.probid }} svg' )
160
160
.append (' line' )
161
161
.attr ({id: ' maxline' })
162
162
.style (" stroke" , " #F00" );
163
163
164
164
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' )
167
167
.attr ({
168
168
x1: chart .margin ().left ,
169
- y1: chart .yAxis .scale ()({{problem .timelimit }})+ chart .margin ().top ,
169
+ y1: chart .yAxis .scale ()({{ problem .timelimit }})+ chart .margin ().top ,
170
170
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 ,
172
172
})
173
173
}
174
- updateline_{{problem .probid }}();
174
+ updateline_{{ problem .probid }}();
175
175
nv .utils .windowResize (function () {
176
- updateline_{{problem .probid }}();
176
+ updateline_{{ problem .probid }}();
177
177
chart .update ()
178
178
});
179
179
return chart;
@@ -189,7 +189,7 @@ $(function(){
189
189
values: [
190
190
{% for result,count in results % }
191
191
{
192
- " label" : " {{result}}" ,
192
+ " label" : " {{ result }}" ,
193
193
" value" : {{ count }},
194
194
" color" : " {{ colors[result] }}" ,
195
195
},
@@ -227,8 +227,8 @@ $(function(){
227
227
var submission_stats = [
228
228
{% for result in [' correct' , ' wrong-answer' , ' timelimit' , ' run-error' , ' compiler-error' , ' no-output' ] % }
229
229
{
230
- key: " {{result}}" ,
231
- color: " {{colors[result]}}" ,
230
+ key: " {{ result }}" ,
231
+ color: " {{ colors[result] }}" ,
232
232
values: [
233
233
{# TODO : make sure these are actually ordered by submittime #}
234
234
{# TODO : also make sure these submissions are in the same contest #}
@@ -256,7 +256,7 @@ $(function(){
256
256
.showYAxis (true ) // Show the y-axis
257
257
.showXAxis (true ) // Show the x-axis
258
258
.forceX ([0 , {{ (current_contest .endtime - current_contest .starttime ) / 60 }}])
259
- .forceY ([0 , {{ submissions| length * 1.10 }}])
259
+ .forceY ([0 , {{ submissions | length * 1.10 }}])
260
260
;
261
261
chart .xAxis // Chart x-axis settings
262
262
.axisLabel (' Contest Time(minutes)' )
0 commit comments