评测记录添加唯一表示

pre_develop
jingquan huang 6 years ago
parent 294e5440eb
commit c10ed929da

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

@ -1,54 +1,29 @@
<% if false %>
<style>
.manage_ol ol li{list-style-type: disc;}
</style>
<div class="task-popup" style="width:400px;">
<div class=" task-popup-title clearfix task-popup-bggrey">
<h3 class="fl ">耗时详情</h3>
<a href="javascript:void(0)" id="closeIcon" style="top: -48px;right: -20px;z-index: 100000;"><i class="iconfont icon-shanchudiao"></i></a>
</div>
<div class="task_popup_con manage_ol">
<ol class="pl30">
<li>总耗时:<%= @consume_time %></li>
<li>作品更新:<%= @student_work %></li>
<li>文件更新:<%= @file_update %></li>
<li>中间层总耗时:<%= @brige %></li>
<li class="ml15">pull代码<%= @git_pull %></li>
<li class="ml15">pod启动<%= @create_pod %></li>
<li class="ml15">pod执行<%= @pod_execute %></li>
<li>中间层回传:<%= @return_back %>--中间层出结果传Educoder</li>
<li>前端轮询:<%= @front_js %>--局部数据查询Js轮询</li>
<li>回调结果存储:<%= @test_cases %></li>
</ol>
</div>
</div>
<% end %>
<% if @recodes.present? %>
<div class="edu-con-bg01 mt15" id="evaluate_records_list">
<table class="edu-pop-table edu-txt-center" cellpadding="0" cellspacing="0" style="table-layout: fixed">
<thead>
<tr>
<th width="5%">序号</th>
<th width="10%">总耗时<i class="fa fa-long-arrow-down color-light-green ml5" ></i></th>
<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>
<th width="5%">pod启动</th>
<th width="5%">pod执行</th>
<th width="10%">中间层回传</th>
<th width="5%">回传时间</th>
<th width="5%">前端轮询</th>
<th width="10%">回调结果存储</th>
<th width="5%">结果存储</th>
<th width="15%">创建时间</th>
<th width="15%">实训名称</th>
<th width="8%">唯一表示</th>
<th width="17%">实训名称</th>
</tr>
</thead>
<tbody>
<% @recodes.each_with_index do |record, index| %>
<% @recodes.each do |record| %>
<tr>
<td><%= index %></td>
<td><%= record.id %></td>
<td><%= record.consume_time %></td>
<td><%= record.student_work %></td>
<td><%= record.file_update %></td>
@ -60,6 +35,7 @@
<td><%= record.front_js %></td>
<td><%= record.test_cases %></td>
<td><%= format_time record.created_at %></td>
<td><%= record.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