|
|
- content_for :head do
|
|
|
<meta http-equiv ="refresh" content="60"/>
|
|
|
|
|
|
%h1 Grader information
|
|
|
|
|
|
%p
|
|
|
= link_to 'Refresh', { :action => 'list' }, class: 'btn btn-info'
|
|
|
|
|
|
.panel.panel-primary
|
|
|
.panel-heading
|
|
|
Grader control:
|
|
|
.panel-body
|
|
|
=link_to 'Start Graders in grading env', { action: 'start_grading'}, class: 'btn btn-default', method: 'post'
|
|
|
=link_to 'Start Graders in exam env', { action: 'start_exam'}, class: 'btn btn-default', method: 'post'
|
|
|
=link_to 'Stop all running Graders', { action: 'stop_all'}, class: 'btn btn-default', method: 'post'
|
|
|
=link_to 'Clear all data', { action: 'clear_all'}, class: 'btn btn-default', method: 'post'
|
|
|
|
|
|
.row
|
|
|
.col-md-6
|
|
|
- if @last_task
|
|
|
Last task:
|
|
|
= link_to "#{@last_task.id}", :action => 'view', :id => @last_task.id, :type => 'Task'
|
|
|
|
|
|
%br/
|
|
|
|
|
|
- if @last_test_request
|
|
|
Last test_request:
|
|
|
= link_to "#{@last_test_request.id}", :action => 'view', :id => @last_test_request.id, :type => 'TestRequest'
|
|
|
|
|
|
%h2 Current graders
|
|
|
|
|
|
= render :partial => 'grader_list', :locals => {:grader_list => @grader_processes}
|
|
|
|
|
|
%h2 Stalled graders
|
|
|
|
|
|
= render :partial => 'grader_list', :locals => {:grader_list => @stalled_processes}
|
|
|
|
|
|
%h2 Terminated graders
|
|
|
|
|
|
%p= link_to 'Clear data for terminated graders', { action: 'clear_terminated'}, class: 'btn btn-default', method: 'post'
|
|
|
|
|
|
= render :partial => 'grader_list', :locals => {:grader_list => @terminated_processes}
|
|
|
.col-md-6
|
|
|
%h2 Last 20 submissions
|
|
|
%table.table.table-striped.table-condensed
|
|
|
%thead
|
|
|
%th ID
|
|
|
%th User
|
|
|
%th Problem
|
|
|
%th Submitted
|
|
|
%th Graded
|
|
|
%th Result
|
|
|
%tbody
|
|
|
- @submission.each do |sub|
|
|
|
%tr.inactive
|
|
|
%td= link_to sub.id, submission_path(sub.id)
|
|
|
%td= ("" unless sub.user) || link_to(sub.try(:user).try(:full_name), stat_user_path(sub.user.id))
|
|
|
%td= ("" unless sub.problem) || link_to(sub.try(:problem).try(:full_name), stat_problem_path(sub.problem.id))
|
|
|
%td= "#{time_ago_in_words(sub.submitted_at)} ago"
|
|
|
%td= sub.graded_at ? "#{time_ago_in_words(sub.graded_at)} ago" : " "
|
|
|
%td= sub.grader_comment
|
|
|
%h2 Ungraded submission
|
|
|
%table.table.table-striped.table-condensed
|
|
|
%thead
|
|
|
%th ID
|
|
|
%th User
|
|
|
%th Problem
|
|
|
%th Submitted
|
|
|
%th Graded
|
|
|
%th Result
|
|
|
%tbody
|
|
|
- @backlog_submission.each do |sub|
|
|
|
%tr.inactive
|
|
|
%td= link_to sub.id, submission_path(sub.id)
|
|
|
%td= ("" unless sub.user) || link_to( sub.try(:user).try(:full_name), stat_user_path(sub.user.id))
|
|
|
%td= ("" unless sub.problem) || link_to( sub.try(:problem).try(:full_name), stat_problem_path(sub.problem.id))
|
|
|
%td= "#{time_ago_in_words(sub.submitted_at)} ago"
|
|
|
%td= sub.graded_at ? "#{time_ago_in_words(sub.graded_at)} ago" : " "
|
|
|
%td= sub.grader_comment
|
|
|
|
|
|
|
|
|
|
|
|
|