# HG changeset patch # User jittat # Date 2008-05-09 07:07:01 # Node ID 9f136d243b9c6533bcb4383d77ec650d20480d26 # Parent b4095ef6a972e0673cccfcef111ec55f99a4eacc [web] more info on grader queues git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@257 6386c4cd-e34a-4fa8-8920-d93eb39b512e diff --git a/app/controllers/graders_controller.rb b/app/controllers/graders_controller.rb --- a/app/controllers/graders_controller.rb +++ b/app/controllers/graders_controller.rb @@ -13,6 +13,11 @@ @grader_processes = GraderProcess.find(:all, :order => 'updated_at desc') @stalled_processes = GraderProcess.find_stalled_process + + @last_task = Task.find(:first, + :order => 'created_at DESC') + @last_test_request = TestRequest.find(:first, + :order => 'created_at DESC') end def clear diff --git a/app/views/graders/list.html.haml b/app/views/graders/list.html.haml --- a/app/views/graders/list.html.haml +++ b/app/views/graders/list.html.haml @@ -6,6 +6,15 @@ - form_for :clear, nil, :url => {:action => 'clear_all'} do |f| = submit_tag 'Clear all data' +Last task: += link_to "#{@last_task.id}", :action => 'view', :id => @last_task.id, :type => 'Task' + +%br/ + +Last test_request: += link_to "#{@last_test_request.id}", :action => 'view', :id => @last_test_request.id, :type => 'TestRequest' + + %h3 Current graders = render :partial => 'grader_list', :locals => {:grader_list => @grader_processes}