最大提交时间

dev_aliyun
jingquan huang 5 years ago
parent b1b96a4149
commit 77bb60f323

@ -878,7 +878,7 @@ class ManagementsController < ApplicationController
def evaluate_simple
page = params[:page]
@recodes = EvaluateRecord.where("created_at > ?", Time.now - 1.days).reorder("consume_time desc")
@recodes = EvaluateRecord.where("created_at < ?", Time.now).reorder("consume_time desc")
@recodes_count = @recodes.size
@record_pages = Paginator.new @recodes_count, 20, page || 1
@offset ||= @record_pages.offset

@ -5,7 +5,6 @@
<tr>
<th width="5%">ID</th>
<th width="5%">总耗时<i class="fa fa-long-arrow-down color-light-green ml5" ></i></th>
<th width="5%">作品更新</th>
<th width="5%">文件更新</th>
<th width="10%">中间层总耗时</th>
<th width="5%">pull代码</th>
@ -15,7 +14,8 @@
<th width="5%">前端轮询</th>
<th width="5%">结果存储</th>
<th width="10%">创建时间</th>
<th width="5%">最大执行时间</th>
<th width="5%">评测时最大时间</th>
<th width="5%">最新执行时间</th>
<th width="8%">唯一标识</th>
<th width="17%">实训名称</th>
</tr>
@ -26,7 +26,6 @@
<tr>
<td><%= record.id %></td>
<td><%= record.consume_time %></td>
<td><%= record.student_work %></td>
<td><%= record.file_update %></td>
<td><%= record.brige %></td>
<td><%= record.git_pull %></td>
@ -37,8 +36,9 @@
<td><%= record.test_cases %></td>
<td><%= format_time record.created_at %></td>
<% challenge = Game.find(record.game_id).challenge %>
<td><%= record.try(:exec_time) %></td>
<td><%= challenge.try(:exec_time) %></td>
<td><%= record.shixun.try(:identifier) %></td>
<td><%= record.try(:identifier) %></td>
<td><%= link_to record.shixun.try(:name), task_path(record.game), :target => "_blank", :title => "#{record.shixun.try(:name)}" %></td>
</tr>
<% end %>

Loading…
Cancel
Save