Description:
[web] more info on grader queues
git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@257 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
r127:9f136d243b9c - - 2 files changed: 14 inserted, 0 deleted
@@ -10,12 +10,17 | |||||
|
10 | end |
|
10 | end |
|
11 |
|
11 | ||
|
12 | def list |
|
12 | def list |
|
13 | @grader_processes = GraderProcess.find(:all, |
|
13 | @grader_processes = GraderProcess.find(:all, |
|
14 | :order => 'updated_at desc') |
|
14 | :order => 'updated_at desc') |
|
15 | @stalled_processes = GraderProcess.find_stalled_process |
|
15 | @stalled_processes = GraderProcess.find_stalled_process |
|
|
16 | + | ||
|
|
17 | + @last_task = Task.find(:first, | ||
|
|
18 | + :order => 'created_at DESC') | ||
|
|
19 | + @last_test_request = TestRequest.find(:first, | ||
|
|
20 | + :order => 'created_at DESC') | ||
|
16 | end |
|
21 | end |
|
17 |
|
22 | ||
|
18 | def clear |
|
23 | def clear |
|
19 | grader_proc = GraderProcess.find(params[:id]) |
|
24 | grader_proc = GraderProcess.find(params[:id]) |
|
20 | grader_proc.destroy if grader_proc!=nil |
|
25 | grader_proc.destroy if grader_proc!=nil |
|
21 | redirect_to :action => 'list' |
|
26 | redirect_to :action => 'list' |
@@ -3,12 +3,21 | |||||
|
3 |
|
3 | ||
|
4 | %h2 (Under Experiments) |
|
4 | %h2 (Under Experiments) |
|
5 |
|
5 | ||
|
6 | - form_for :clear, nil, :url => {:action => 'clear_all'} do |f| |
|
6 | - form_for :clear, nil, :url => {:action => 'clear_all'} do |f| |
|
7 | = submit_tag 'Clear all data' |
|
7 | = submit_tag 'Clear all data' |
|
8 |
|
8 | ||
|
|
9 | + Last task: | ||
|
|
10 | + = link_to "#{@last_task.id}", :action => 'view', :id => @last_task.id, :type => 'Task' | ||
|
|
11 | + | ||
|
|
12 | + %br/ | ||
|
|
13 | + | ||
|
|
14 | + Last test_request: | ||
|
|
15 | + = link_to "#{@last_test_request.id}", :action => 'view', :id => @last_test_request.id, :type => 'TestRequest' | ||
|
|
16 | + | ||
|
|
17 | + | ||
|
9 | %h3 Current graders |
|
18 | %h3 Current graders |
|
10 |
|
19 | ||
|
11 | = render :partial => 'grader_list', :locals => {:grader_list => @grader_processes} |
|
20 | = render :partial => 'grader_list', :locals => {:grader_list => @grader_processes} |
|
12 |
|
21 | ||
|
13 | %h3 Stalled graders |
|
22 | %h3 Stalled graders |
|
14 |
|
23 |
You need to be logged in to leave comments.
Login now