Description:
more report adjustment
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r440:d56910b3d8d2 - - 2 files changed: 2 inserted, 2 deleted
@@ -1,44 +1,44 | |||||
|
1 | :css |
|
1 | :css |
|
2 | .hof_user { color: orangered; font-style: italic; } |
|
2 | .hof_user { color: orangered; font-style: italic; } |
|
3 | .hof_language { color: green; font-style: italic; } |
|
3 | .hof_language { color: green; font-style: italic; } |
|
4 | .hof_value { color: deeppink;font-style: italic; } |
|
4 | .hof_value { color: deeppink;font-style: italic; } |
|
5 |
|
5 | ||
|
6 | %h2 Overall |
|
6 | %h2 Overall |
|
7 |
|
7 | ||
|
8 | - if @best |
|
8 | - if @best |
|
9 | %b Best Runtime: |
|
9 | %b Best Runtime: |
|
10 | by #{link_to @best[:runtime][:user], controller:'users', action:'profile', id:@best[:memory][:user_id]} |
|
10 | by #{link_to @best[:runtime][:user], controller:'users', action:'profile', id:@best[:memory][:user_id]} |
|
11 | using <span class="hof_language">#{@best[:runtime][:lang]}</span> |
|
11 | using <span class="hof_language">#{@best[:runtime][:lang]}</span> |
|
12 | with <span class="hof_value">#{@best[:runtime][:value] * 1000} milliseconds</span> |
|
12 | with <span class="hof_value">#{@best[:runtime][:value] * 1000} milliseconds</span> |
|
13 | at submission |
|
13 | at submission |
|
14 | = link_to("#" + @best[:runtime][:sub_id].to_s, controller: 'graders', action: 'submission', id:@best[:runtime][:sub_id]) |
|
14 | = link_to("#" + @best[:runtime][:sub_id].to_s, controller: 'graders', action: 'submission', id:@best[:runtime][:sub_id]) |
|
15 | %br/ |
|
15 | %br/ |
|
16 |
|
16 | ||
|
17 | %b Best Memory Usage: |
|
17 | %b Best Memory Usage: |
|
18 | by #{link_to @best[:memory][:user], controller:'users', action:'profile', id:@best[:memory][:user_id]} |
|
18 | by #{link_to @best[:memory][:user], controller:'users', action:'profile', id:@best[:memory][:user_id]} |
|
19 | using <span class="hof_language">#{@best[:memory][:lang]}</span> |
|
19 | using <span class="hof_language">#{@best[:memory][:lang]}</span> |
|
20 | - with <span class="hof_value">#{@best[:memory][:value]} kbytes </span> |
|
20 | + with <span class="hof_value">#{number_with_delimiter(@best[:memory][:value])} kbytes </span> |
|
21 | at submission |
|
21 | at submission |
|
22 | = link_to("#" + @best[:memory][:sub_id].to_s, controller: 'graders' , action: 'submission', id:@best[:memory][:sub_id]) |
|
22 | = link_to("#" + @best[:memory][:sub_id].to_s, controller: 'graders' , action: 'submission', id:@best[:memory][:sub_id]) |
|
23 | %br/ |
|
23 | %br/ |
|
24 |
|
24 | ||
|
25 | %b Shortest Code: |
|
25 | %b Shortest Code: |
|
26 | by #{link_to @best[:length][:user], controller:'users', action:'profile', id:@best[:length][:user_id]} |
|
26 | by #{link_to @best[:length][:user], controller:'users', action:'profile', id:@best[:length][:user_id]} |
|
27 | using <span class="hof_language">#{@best[:length][:lang]}</span> |
|
27 | using <span class="hof_language">#{@best[:length][:lang]}</span> |
|
28 | with <span class="hof_value">#{@best[:length][:value]} bytes</span> |
|
28 | with <span class="hof_value">#{@best[:length][:value]} bytes</span> |
|
29 | at submission |
|
29 | at submission |
|
30 | = link_to("#" + @best[:length][:sub_id].to_s, controller: 'graders' , action: 'submission', id: @best[:length][:sub_id]) |
|
30 | = link_to("#" + @best[:length][:sub_id].to_s, controller: 'graders' , action: 'submission', id: @best[:length][:sub_id]) |
|
31 | %br/ |
|
31 | %br/ |
|
32 |
|
32 | ||
|
33 | %b First solver: |
|
33 | %b First solver: |
|
34 | #{link_to @best[:first][:user], controller:'users', action:'profile', id:@best[:first][:user_id]} is the first solver |
|
34 | #{link_to @best[:first][:user], controller:'users', action:'profile', id:@best[:first][:user_id]} is the first solver |
|
35 | using <span class="hof_language">#{@best[:first][:lang]}</span> |
|
35 | using <span class="hof_language">#{@best[:first][:lang]}</span> |
|
36 | on <span class="hof_value">#{@best[:first][:value]}</span> |
|
36 | on <span class="hof_value">#{@best[:first][:value]}</span> |
|
37 | at submission |
|
37 | at submission |
|
38 | = link_to("#" + @best[:first][:sub_id].to_s, controller: 'graders' , action: 'submission', id: @best[:first][:sub_id]) |
|
38 | = link_to("#" + @best[:first][:sub_id].to_s, controller: 'graders' , action: 'submission', id: @best[:first][:sub_id]) |
|
39 | %br/ |
|
39 | %br/ |
|
40 |
|
40 | ||
|
41 |
|
41 | ||
|
42 | %p |
|
42 | %p |
|
43 | This counts only for submission with 100% score <br/> |
|
43 | This counts only for submission with 100% score <br/> |
|
44 | Right now, java is excluded from memory usage competition. (Because it always uses 2GB memory...) |
|
44 | Right now, java is excluded from memory usage competition. (Because it always uses 2GB memory...) |
@@ -8,25 +8,25 | |||||
|
8 | $('#until_datetime').datetimepicker({ showButtonPanel: true, dateFormat: "yy-mm-dd", controlType: "slider"} ); |
|
8 | $('#until_datetime').datetimepicker({ showButtonPanel: true, dateFormat: "yy-mm-dd", controlType: "slider"} ); |
|
9 | $('#my_table').tablesorter({widthFixed: true, widgets: ['zebra']}); |
|
9 | $('#my_table').tablesorter({widthFixed: true, widgets: ['zebra']}); |
|
10 | }); |
|
10 | }); |
|
11 |
|
11 | ||
|
12 | %h1 Login status |
|
12 | %h1 Login status |
|
13 |
|
13 | ||
|
14 | =render partial: 'report_menu' |
|
14 | =render partial: 'report_menu' |
|
15 | =render partial: 'date_range', locals: {param_text: 'Login date range:', title: 'Query login stat in the range' } |
|
15 | =render partial: 'date_range', locals: {param_text: 'Login date range:', title: 'Query login stat in the range' } |
|
16 |
|
16 | ||
|
17 | %table.tablesorter-cafe#my_table |
|
17 | %table.tablesorter-cafe#my_table |
|
18 | %thead |
|
18 | %thead |
|
19 | %tr |
|
19 | %tr |
|
20 | %th login |
|
20 | %th login |
|
21 | %th full name |
|
21 | %th full name |
|
22 | %th login count |
|
22 | %th login count |
|
23 | %th earliest |
|
23 | %th earliest |
|
24 | %th latest |
|
24 | %th latest |
|
25 | %tbody |
|
25 | %tbody |
|
26 | - @logins.each do |l| |
|
26 | - @logins.each do |l| |
|
27 | %tr{class: cycle('info-even','info-odd')} |
|
27 | %tr{class: cycle('info-even','info-odd')} |
|
28 | %td= link_to l[:login], controller: 'users', action: 'profile', id: l[:id] |
|
28 | %td= link_to l[:login], controller: 'users', action: 'profile', id: l[:id] |
|
29 | %td= l[:full_name] |
|
29 | %td= l[:full_name] |
|
30 | %td= l[:count] |
|
30 | %td= l[:count] |
|
31 | %td= l[:min] ? l[:min].in_time_zone.strftime('%Y-%m-%d %H:%M') : '' |
|
31 | %td= l[:min] ? l[:min].in_time_zone.strftime('%Y-%m-%d %H:%M') : '' |
|
32 |
- %td= l[:max] ? time_ago_in_words(l[:max].in_time_zone) |
|
32 | + %td= l[:max] ? "#{l[:max].in_time_zone.strftime('%Y-%m-%d %H:%M')} (#{time_ago_in_words(l[:max].in_time_zone)} ago)" : '' |
You need to be logged in to leave comments.
Login now