简略版统计

dev_ec
jingquan huang 6 years ago
parent ed00b8e773
commit 034312aec4

@ -851,6 +851,15 @@ class ManagementsController < ApplicationController
@front_js = eva.front_js
end
def evaluate_simple
page = params[:page]
@recodes = EvaluateRecord.where("created_at > ?", Time.now - 1.days).order("consume_time desc")
@recodes_count = @recodes.size
@record_pages = Paginator.new @recodes_count, 20, page || 1
@offset ||= @record_pages.offset
@recodes = paginateHelper @recodes, 20
end
# 评测时间列表
def evaluate_records
shixun_tomcat = Redmine::Configuration['shixun_tomcat']

@ -0,0 +1,76 @@
<% 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%">总耗时</th>
<th width="5%">作品更新</th>
<th width="5%">文件更新</th>
<th width="10%">中间层总耗时<i class="fa fa-long-arrow-down color-light-green ml5" ></i></th>
<th width="5%">pull代码</th>
<th width="10%">pod启动</th>
<th width="10%">pod执行</th>
<th width="10%">中间层回传</th>
<th width="10%">前端轮询</th>
<th width="10%">回调结果存储</th>
<th width="10%">实训详情</th>
</tr>
</thead>
<tbody>
<% @recodes.each_with_index do |record, index| %>
<tr>
<td><%= index %></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>
<td><%= record.create_pod %></td>
<td><%= record.pod_execute %></td>
<td><%= record.return_back %></td>
<td><%= record.front_js %></td>
<td><%= record.test_cases %></td>
<td><%= link_to record.game.try(:identifier), task_path(record.game), :target => "_blank" %></td>
</tr>
<% end %>
</tbody>
</table>
<div style="text-align:center;" class="new_expand">
<div class="pages_user_show" style="width:auto; display:inline-block;margin: 18px 0;">
<ul id="homework_pository_ref_pages">
<%= pagination_links_full @record_pages, @recodes_count, :per_page_links => false, :remote => false, :flag => true, :is_new => true %>
</ul>
<div class="cl"></div>
</div>
</div>
</div>
<% end %>

@ -523,6 +523,7 @@ RedmineApp::Application.routes.draw do ## oauth相关
resources :managements do
collection do
get 'evaluate_simple'
get 'hidden_course'
match 'training_2018',:via=>[:get,:post]
get 'update_pay_status'

Loading…
Cancel
Save