Description:
[web] improved test result display
git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@166 6386c4cd-e34a-4fa8-8920-d93eb39b512e
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r84:15a7f2a094fe - - 3 files changed: 12 inserted, 11 deleted
@@ -1,15 +1,18 | |||||
|
1 | %tr{:class => (test_request_counter%2==0) ? "info-even" : "info-odd"} |
|
1 | %tr{:class => (test_request_counter%2==0) ? "info-even" : "info-odd"} |
|
2 | %td{:align => "center"} |
|
2 | %td{:align => "center"} |
|
3 | = format_short_time(test_request.submitted_at) |
|
3 | = format_short_time(test_request.submitted_at) |
|
4 | %td= test_request.problem.full_name |
|
4 | %td= test_request.problem.full_name |
|
5 | %td{:align => "center"} |
|
5 | %td{:align => "center"} |
|
6 | = test_request.submission.number |
|
6 | = test_request.submission.number |
|
7 | %td{:align => "center"} |
|
7 | %td{:align => "center"} |
|
8 | = test_request.status_str |
|
8 | = test_request.status_str |
|
9 | - %td= simple_format((test_request.running_stat or '')) |
|
||
|
10 | %td{:align => "center"} |
|
9 | %td{:align => "center"} |
|
11 | - if test_request.output_file_name!=nil |
|
10 | - if test_request.output_file_name!=nil |
|
12 |
- = link_to '[ |
|
11 | + = link_to '[download]', :action => 'read', :id => test_request.id |
|
13 | - %td= test_request.grader_comment or '' |
|
12 | + %td{:align => "center"} |
|
14 | - %td= simple_format((test_request.compiler_message or '')) |
|
13 | + - if test_request.compiler_message!=nil and test_request.compiler_message!='' |
|
15 | - %td= link_to '[view]', :action => 'result', :id => test_request.id |
|
14 | + = "yes" |
|
|
15 | + - else | ||
|
|
16 | + = "no" | ||
|
|
17 | + %td{:align => "center"} | ||
|
|
18 | + = link_to '[view]', :action => 'result', :id => test_request.id |
@@ -49,35 +49,33 | |||||
|
49 | <%= select(:test_request, |
|
49 | <%= select(:test_request, |
|
50 | :submission_number, |
|
50 | :submission_number, |
|
51 | ((1..@submissions[0].number).collect {|n| [n,n]}).reverse) %> |
|
51 | ((1..@submissions[0].number).collect {|n| [n,n]}).reverse) %> |
|
52 | </td> |
|
52 | </td> |
|
53 | </tr> |
|
53 | </tr> |
|
54 | <tr> |
|
54 | <tr> |
|
55 | <td>Input data:</td> |
|
55 | <td>Input data:</td> |
|
56 | <td><%= f.file_field :input_file %></td> |
|
56 | <td><%= f.file_field :input_file %></td> |
|
57 | <tr> |
|
57 | <tr> |
|
58 | <td colspan="2"> |
|
58 | <td colspan="2"> |
|
59 | <%= submit_tag 'submit' %> |
|
59 | <%= submit_tag 'submit' %> |
|
60 | </td> |
|
60 | </td> |
|
61 | </tr> |
|
61 | </tr> |
|
62 | </table> |
|
62 | </table> |
|
63 | <% end %> |
|
63 | <% end %> |
|
64 |
|
64 | ||
|
65 | <h3>Previous requests</h3> |
|
65 | <h3>Previous requests</h3> |
|
66 |
|
66 | ||
|
67 | <table class="info"> |
|
67 | <table class="info"> |
|
68 | <tr class="info-head"> |
|
68 | <tr class="info-head"> |
|
69 | <th>at</th> |
|
69 | <th>at</th> |
|
70 | <th>problem</th> |
|
70 | <th>problem</th> |
|
71 | <th>sub #</th> |
|
71 | <th>sub #</th> |
|
72 | <th>status</th> |
|
72 | <th>status</th> |
|
73 | - <th>running stat</th> |
|
||
|
74 | <th>output (first 2kb)</th> |
|
73 | <th>output (first 2kb)</th> |
|
75 | - <th>grading comment</th> |
|
||
|
76 | <th>compiler message</th> |
|
74 | <th>compiler message</th> |
|
77 |
- <th> |
|
75 | + <th>detail</th> |
|
78 | </tr> |
|
76 | </tr> |
|
79 | <%= render :partial => 'test_request', :collection => @test_requests %> |
|
77 | <%= render :partial => 'test_request', :collection => @test_requests %> |
|
80 | </table> |
|
78 | </table> |
|
81 |
|
79 | ||
|
82 | <% end %> |
|
80 | <% end %> |
|
83 |
|
81 |
@@ -1,32 +1,32 | |||||
|
1 | = user_title_bar(@user) |
|
1 | = user_title_bar(@user) |
|
2 |
|
2 | ||
|
3 | %div{:style => "text-align: center; font-size: 12px"} |
|
3 | %div{:style => "text-align: center; font-size: 12px"} |
|
4 | = "Problem: #{@test_request.problem.full_name}" |
|
4 | = "Problem: #{@test_request.problem.full_name}" |
|
5 | %br/ |
|
5 | %br/ |
|
6 | = "Submission: #{@test_request.submission.number}" |
|
6 | = "Submission: #{@test_request.submission.number}" |
|
7 | %br/ |
|
7 | %br/ |
|
8 | = "Test submitted at: #{format_short_time(@test_request.submitted_at)}" |
|
8 | = "Test submitted at: #{format_short_time(@test_request.submitted_at)}" |
|
9 | %br/ |
|
9 | %br/ |
|
10 | = "Execution time: #{@test_request.running_time} s." |
|
10 | = "Execution time: #{@test_request.running_time} s." |
|
11 | %br/ |
|
11 | %br/ |
|
12 | - = "Memory usage: #{@test_request.memory_usage}" |
|
12 | + = "Memory usage: #{@test_request.memory_usage}kb" |
|
13 | %br/ |
|
13 | %br/ |
|
14 | %b= @test_request.exit_status |
|
14 | %b= @test_request.exit_status |
|
15 | %br/ |
|
15 | %br/ |
|
16 |
|
16 | ||
|
17 | - if @test_request.compiler_message!=nil and @test_request.compiler_message!='' |
|
17 | - if @test_request.compiler_message!=nil and @test_request.compiler_message!='' |
|
18 | %b Compiler Message |
|
18 | %b Compiler Message |
|
19 | %div{:style => "border: 1px solid black; background: lightgrey"} |
|
19 | %div{:style => "border: 1px solid black; background: lightgrey"} |
|
20 | = simple_format((@test_request.compiler_message or '')) |
|
20 | = simple_format((@test_request.compiler_message or '')) |
|
21 |
|
21 | ||
|
22 | - %b Input |
|
22 | + %b Input (first 2kb) |
|
23 | %div{:style => "border: 1px solid black; background: lightgrey"} |
|
23 | %div{:style => "border: 1px solid black; background: lightgrey"} |
|
24 | - if @test_request.input_file_name!=nil |
|
24 | - if @test_request.input_file_name!=nil |
|
25 | = simple_format(read_textfile(@test_request.input_file_name,2048)) |
|
25 | = simple_format(read_textfile(@test_request.input_file_name,2048)) |
|
26 |
|
26 | ||
|
27 | - %b Output |
|
27 | + %b Output (first 2kb) |
|
28 | %div{:style => "border: 1px solid black; background: lightgrey"} |
|
28 | %div{:style => "border: 1px solid black; background: lightgrey"} |
|
29 | - if @test_request.output_file_name!=nil |
|
29 | - if @test_request.output_file_name!=nil |
|
30 | = simple_format(read_textfile(@test_request.output_file_name,2048)) |
|
30 | = simple_format(read_textfile(@test_request.output_file_name,2048)) |
|
31 | - else |
|
31 | - else |
|
32 | (no output) |
|
32 | (no output) |
You need to be logged in to leave comments.
Login now