Merge branch 'dev_shixun_project' of https://git.trustie.net/jacknudt/trustieforge into dev_shixun_project

Conflicts:
	app/views/shixuns/_monitor_tip.html.erb
This commit is contained in:
huang 2017-03-15 17:16:39 +08:00
commit 91e043cc16
5 changed files with 81 additions and 124 deletions

View File

@ -1,24 +1,22 @@
<div style="width:460px;"> <div style="width:460px;">
<div class="sy_popup_top"> <div class="task-popup-title clearfix">
<h3 class="fl">提示</h3> <h3 class="fl color-grey">提示</h3>
<a href="javascript:void(0);" class="sy_icons_close fr" onclick="hideModal()"></a> <a href="javascript:void(0);" onclick="hideModal()"><i class="fa fa-times-circle font-18 link-color-grey fr"></i></a>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="sy_popup_con" style="width:380px;"> <div class="sy_popup_con" style="width:380px;">
<ul class="sy_popup_add" > <ul class="sy_popup_add" >
<li class="center mb30" style="line-height:20px"> <li class="center mb30" style="line-height:20px">
<%= @notice %> 确定开启后,将开始计算耗时<br/>请问是否确定继续?
</li> </li>
<li class="mt10"> <div class="task-popup-submit clearfix">
<label class="mr27">&nbsp;</label> <a href="javascript:void(0);" class="task-btn fl" onclick="hideModal()">取消</a>
<a href="javascript:void(0);" class="sy_btn_grey fl " onclick="hideModal()">取&nbsp;&nbsp;消</a>
<% if @had_exec == true %> <% if @had_exec == true %>
<%= link_to "确 定", myshixun_path(@tpm), :class => "sy_btn_blue fl ml20", :onclick => "hideModal();", :target => "_blank" %> <%= link_to "确 定", myshixun_path(@tpm), :class => "sy_btn_blue fl ml20", :onclick => "hideModal();", :target => "_blank" %>
<% else %> <% else %>
<%= link_to "确 定", shixun_exec_shixun_path(@shixun), :class => "sy_btn_blue fl ml20", :onclick => "hideModal();", :target => "_blank" %> <a href="<%= shixun_exec_shixun_path(@shixun) %>" class="task-btn task-btn-green fr" onclick="hideModal();">确定</a>
<% end %> <% end %>
<div class="cl"></div> </div>
</li>
</ul> </ul>
</div> </div>
</div> </div>

View File

@ -1,36 +1,26 @@
<div class="task-setting-tab">
<div class="panel-form ">
<ul>
<li class="clearfix">
<label class="panel-form-label fl">测试脚本:</label>
<textarea class="panel-form-width-690 panel-form-height-150 fl"></textarea>
</li>
<li class="clearfix">
<a href="#" class="task-btn task-btn-green fr mr10">保存</a>
</li>
</ul>
</div>
</div>
<% if false%>
<div id="training_project_exec_tip"> <div id="training_project_exec_tip">
<%= render :partial => "shixuns/settings_challenges_result_tip" %> <%= render :partial => "shixuns/settings_challenges_result_tip" %>
</div> </div>
<div class="task-setting-tab">
<div class=" sy_new_tchbox clear ">
<div id="training_project_filter_tip"> <div id="training_project_filter_tip">
<%= render :partial => "shixuns/settings_challenges_action_tip" %> <%= render :partial => "shixuns/settings_challenges_action_tip" %>
</div> </div>
<div class="cl"></div> <div class="panel-form">
<div class="clear"> <ul>
<%= form_tag(url_for(:controller => 'shixuns', :action => 'add_script', :id => @shixun), :method => "post", :remote => true, :id => "project_script_form") do %> <%= form_tag(url_for(:controller => 'shixuns', :action => 'add_script', :id => @shixun), :method => "post", :remote => true, :id => "project_script_form") do %>
<textarea id="shixun_script" name="shixun_script" style="width:746px; height:300px;border: 1px solid #c8c8c8; padding:5px;margin-bottom: 5px;" placeholder="请输入脚本"><%= @shixun.script %></textarea> <li class="clearfix">
<span id ="shixun_script_tip" class="c_red" style="display: none">内容不能为空</span> <label class="panel-form-label fl">测试脚本:</label>
<a href="javascript:void(0)" class="fr btn btn-grey">取消</a> <textarea id="shixun_script" name="shixun_script" class="panel-form-width-690 panel-form-height-150 fl" placeholder="请输入脚本"><%= @shixun.script %></textarea>
<a href="javascript:void(0)" class="fr btn btn-blue mr5" onclick="project_script_commit()">确定</a> <span id ="shixun_script_tip" class="c_red ml85" style="display: none">内容不能为空</span>
<% end %> </li>
<li class="clearfix">
<a href="javascript:void(0)" class="task-btn task-btn-green fr mr10" onclick="project_script_commit()">保存</a>
</li>
<% end %>
</ul>
</div> </div>
</div> </div>
<% end %>
<script> <script>
function regex_pr_comment() function regex_pr_comment()
{ {

View File

@ -3,88 +3,47 @@
<button data-dismiss="alert" class="task-close fr" type="button" onclick="close_waring_frame();">×</button> <button data-dismiss="alert" class="task-close fr" type="button" onclick="close_waring_frame();">×</button>
温馨提示:每个项目只能创建一个版本库。 温馨提示:每个项目只能创建一个版本库。
</div> </div>
<div class=" sy_new_tchbox clear" style="margin-left:0; margin-right:0;" > <%= error_messages_for 'project' %>
<ul class="pro_newsetting_con mb15" > <% if @repository.nil? %>
<li class="mb10 clear"> <div class=" sy_new_tchbox clear" style="margin-left:0; margin-right:0;" >
<label class=" fl" style="line-height:40px;"><span class="c_red f12">*</span>&nbsp;版本库名称&nbsp;&nbsp;:&nbsp;</label> <%= labelled_form_for :repository, @repository, :url => shixun_repositories_path(@shixun), :html => {:method => "post", :autocomplete => 'off'} do |f| %>
<input type="text" class="panel-form-width-690 panel-form-height-30 fl" style="width:830px;"> <ul class="pro_newsetting_con mb15" >
</li> <li class="mb10 clear">
<li class="clear"> <label class=" fl" style="line-height:40px;"><span class="c_red f12">*</span>&nbsp;版本库名称&nbsp;&nbsp;:&nbsp;</label>
<label class=" fl" style="width:100px;">&nbsp;&nbsp;</label> <%= f.text_field :identifier, :no_label => true, :class => "panel-form-width-690 panel-form-height-30 fl", :style => "width:830px;", :id => "shixun_identifier" %>
<p class=" fl c_grey pro_new_grey">1.长度必须在1到254个字符之间<br/> <span style="display: none" class="c_orange ml100" id="valid_repository_name">版本库名是无效的</span>
2.仅限使用小写字母a-z、数字、破折号-和下划线_<br> </li>
3.一旦保存,标识无法修改</p> <li class="clear">
</li> <label class=" fl" style="width:100px;">&nbsp;&nbsp;</label>
</ul> <p class=" fl c_grey pro_new_grey">1.长度必须在1到254个字符之间<br/>
<a href="#" class=" task-btn task-btn-green fr">保存</a> 2.仅限使用小写字母a-z、数字、破折号-和下划线_<br>
<a href="#" class=" task-btn fr mr10">取消</a> 3.一旦保存,标识无法修改</p>
</div> </li>
<table class="sy_new_table" cellpadding="0" cellspacing="0"> </ul>
<thead> <a href="javascript:void(0)" onclick="project_repository_commit();" class=" task-btn task-btn-green fr">保存</a>
<tr> <a href="javascript:void(0)" onclick="cancel_for_create();" class=" task-btn fr mr10">取消</a>
<th>版本库名</th> <% end %>
<th>管理系统</th> </div>
<th>库路径</th> <% else %>
</tr> <table class="sy_new_table" cellpadding="0" cellspacing="0">
</thead>
<tbody>
<tr>
<th>sasa Test</th>
<th>Gitlab</th>
<th>https://git.trustie.net/hushasha/sasatest.git</th>
</tr>
</tbody>
</table>
</div>
<% if false %>
<div class="pro_new_prompt ml15 mr15 mb10"><p>温馨提示:每个项目只能创建一个版本库</p></div>
<%= error_messages_for 'project' %>
<% if @repository.nil? %>
<div class="sy_new_tchbox clear">
<%= labelled_form_for :repository, @repository, :url => shixun_repositories_path(@shixun), :html => {:method => "post", :autocomplete => 'off'} do |f| %>
<ul class="pro_newsetting_con mb15">
<li>
<label class=" fl"><span class="c_red f12">*</span>&nbsp;版本库名称&nbsp;&nbsp;:&nbsp;</label>
<%= f.text_field :identifier, :no_label => true, :class => "w650 fl", :style => "height: 28px;", :id => "shixun_identifier" %>
<span style="display: none" class="c_orange ml100" id="valid_repository_name">版本库名是无效的</span>
</li>
<li class="clear">
<label class=" fl">&nbsp;&nbsp;</label>
<p class=" fl c_grey pro_new_grey">
1.长度必须在1到254个字符之间<br/>
2.仅限使用小写字母a-z、数字、破折号-和下划线_<br>
3.一旦保存,标识无法修改<br>
4.版本库名不能是纯数字
</p>
</li>
</ul>
<a href="javascript:void(0)" onclick="cancel_for_create();" class="fr sy_btn_grey"><%=l(:button_cancel)%></a>
<a href="javascript:void(0)" onclick="project_repository_commit();" class="fr sy_btn_blue mr5"><%=l(:lable_project_rep_create) %></a>
<% end %>
</div>
<% else %>
<div class=" clear ml15 mr15" >
<table class="sy_new_table clear mb15" cellpadding="0" cellspacing="0">
<thead> <thead>
<tr> <tr>
<th class="w130 pl10 pr10 hidden fl">版本库名</th> <th>版本库名</th>
<th class="w90 pr10 hidden fl">管理系统</th> <th>管理系统</th>
<th class="w490 hidden fl">库路径</th> <th>库路径</th>
<th class="w46 hidden fl">&nbsp;</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<th class="w130 pl10 pr10 hidden fl"><%= @repository.identifier %></th> <th><%= @repository.identifier %></th>
<th class="w90 pr10 hidden fl">Git</th> <th>Git</th>
<th class="w490 hidden fl"><%=h @repos_url %></th> <th><%= h @repos_url %></th>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> <% end %>
<% end %> </div>
<% end %>
<script> <script>
function pro_st_show_ku() function pro_st_show_ku()
{ {

View File

@ -14,19 +14,20 @@
<div class="task-header-nav"> <div class="task-header-nav">
<ul class="task-header-navs clearfix"> <ul class="task-header-navs clearfix">
<li><a href="<%= shixun_challenges_url(@shixun) %>" class="active">实训</a></li> <li><a href="<%= shixun_challenges_url(@shixun) %>" class="<%= params[:action] == "index" ? "active" : "" %>" >实训</a></li>
<% unless @shixun.repository.nil? %> <% unless @shixun.repository.nil? %>
<li> <li>
<%= link_to l(:project_module_repository), <%= link_to l(:project_module_repository),
({:controller => 'repositories', ({:controller => 'repositories',
:action => 'shixun_show', :action => 'shixun_show',
:id => @shixun, :id => @shixun,
:repository_id => shixun_repository(@shixun).try(:identifier)}) :repository_id => shixun_repository(@shixun).try(:identifier)}),
:class => (params[:controller] == 'repositories' ? 'active' : '')
%> %>
</li> </li>
<% end %> <% end %>
<% if User.current.manager_of_shixun?(@shixun) %> <% if User.current.manager_of_shixun?(@shixun) %>
<li><a href="<%= settings_shixun_path(@shixun) %>">配置</a></li> <li><a href="<%= settings_shixun_path(@shixun) %>" class="<%= params[:action] == "settings" ? "active" : "" %>">配置</a></li>
<% end %> <% end %>
</ul> </ul>
</div> </div>

View File

@ -1144,8 +1144,8 @@ ActiveRecord::Schema.define(:version => 20170314085929) do
t.string "name" t.string "name"
t.integer "user_id" t.integer "user_id"
t.text "description" t.text "description"
t.date "publish_time" t.datetime "publish_time"
t.date "end_time" t.datetime "end_time"
t.integer "homework_type", :default => 1 t.integer "homework_type", :default => 1
t.string "late_penalty" t.string "late_penalty"
t.integer "course_id" t.integer "course_id"
@ -1242,6 +1242,19 @@ ActiveRecord::Schema.define(:version => 20170314085929) do
t.datetime "updated_at", :null => false t.datetime "updated_at", :null => false
end end
create_table "ii", :force => true do |t|
t.integer "project_id"
t.string "author_login"
t.string "rep_identifier"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "sonar_version", :default => 0
t.string "path"
t.string "branch"
t.string "language"
t.string "sonar_name"
end
create_table "innodb_monitor", :id => false, :force => true do |t| create_table "innodb_monitor", :id => false, :force => true do |t|
t.integer "a" t.integer "a"
end end
@ -2103,21 +2116,17 @@ ActiveRecord::Schema.define(:version => 20170314085929) do
t.string "name" t.string "name"
t.text "description" t.text "description"
t.text "script" t.text "script"
t.boolean "is_public", :default => true t.boolean "is_public", :default => true
t.integer "parent_id" t.integer "parent_id"
t.integer "user_id" t.integer "user_id"
t.integer "gpid" t.integer "gpid"
t.integer "forked_count", :default => 0 t.integer "forked_count", :default => 0
t.integer "visits", :default => 0 t.integer "visits", :default => 0
t.datetime "created_at", :null => false t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false t.datetime "updated_at", :null => false
t.integer "changeset_num" t.integer "changeset_num"
t.integer "forked_form" t.integer "forked_form"
t.integer "status", :default => 0 t.integer "status", :default => 0
t.text "ready_knowledge"
t.text "task_pass"
t.text "answer"
t.integer "score"
end end
create_table "softapplications", :force => true do |t| create_table "softapplications", :force => true do |t|
@ -2412,7 +2421,7 @@ ActiveRecord::Schema.define(:version => 20170314085929) do
t.datetime "updated_at", :null => false t.datetime "updated_at", :null => false
t.integer "author_id" t.integer "author_id"
t.integer "status", :limit => 1, :default => 0 t.integer "status", :limit => 1, :default => 0
t.integer "position", :limit => 1 t.integer "position", :limit => 1, :default => 0
t.integer "result", :default => 0 t.integer "result", :default => 0
end end