实训配置更改

dev_bj
daiao 6 years ago
parent e4ec176fbd
commit 1b9f97f21f

@ -818,18 +818,18 @@ class ShixunsController < ApplicationController
ShixunServiceConfig.create!(:shixun_id => @shixun.id, :mirror_repository_id => mirror) ShixunServiceConfig.create!(:shixun_id => @shixun.id, :mirror_repository_id => mirror)
end end
end end
# 自动构建版本
# repository = Repository.new repository = Repository.new
# repository.shixun = @shixun repository.shixun = @shixun
# repository.type = 'Repository::Gitlab' repository.type = 'Repository::Gitlab'
# repository.identifier = @shixun.identifier.downcase repository.identifier = @shixun.identifier.downcase
# repository.project_id = -1 repository.project_id = -1
# repository.save! repository.save!
# s = Trustie::Gitlab::Sync.new s = Trustie::Gitlab::Sync.new
# gproject = s.create_shixun(@shixun, repository) gproject = s.create_shixun(@shixun, repository)
# raise "版本库创建失败" if @shixun.gpid.blank? # 若和gitlab没同步成功则抛出异常 raise "版本库创建失败" if @shixun.gpid.blank? # 若和gitlab没同步成功则抛出异常
# g = Gitlab.client g = Gitlab.client
# @shixun.update_column(:git_url, g.project(@shixun.gpid).path_with_namespace) @shixun.update_column(:git_url, g.project(@shixun.gpid).path_with_namespace)
# g = Gitlab.client # g = Gitlab.client
# hook_url = Setting.protocol + "://" + Setting.host_name + "/shixuns/#{@shixun.identifier}" + "/ghook" # hook_url = Setting.protocol + "://" + Setting.host_name + "/shixuns/#{@shixun.identifier}" + "/ghook"
# g.add_project_hook(@shixun.gpid, hook_url) # g.add_project_hook(@shixun.gpid, hook_url)

@ -37,19 +37,19 @@
</div> </div>
</div> </div>
</div> </div>
<!-- <div class="mb10 edu-back-white padding30-20">--> <div class="mb10 edu-back-white padding30-20">
<!-- <p class="color-grey-6 font-16 mb15">简介</p>--> <p class="color-grey-6 font-16 mb15">简介</p>
<!-- <div class="df mb20">--> <div class="df mb20">
<!-- <div class="flex1 mr20">--> <div class="flex1 mr20">
<!-- <div id="shixun_introduction" class="fl">--> <div id="shixun_introduction" class="fl">
<!-- <textarea name="shixun[description]"><%#= @introduction_sample || @shixun.description %></textarea>--> <textarea name="shixun[description]"><%= @introduction_sample || @shixun.description %></textarea>
<!-- </div>--> </div>
<!-- <p id="e_tip_desc" class="edu-txt-right color-grey-cd font-12"></p>--> <p id="e_tip_desc" class="edu-txt-right color-grey-cd font-12"></p>
<!-- <p id="e_tips_desc" class="edu-txt-right color-grey-cd font-12"></p>--> <p id="e_tips_desc" class="edu-txt-right color-grey-cd font-12"></p>
<!-- </div>--> </div>
<!-- <div style="width: 57px;">&nbsp;</div>--> <div style="width: 57px;">&nbsp;</div>
<!-- </div>--> </div>
<!-- </div>--> </div>
<div class="mb10 edu-back-white padding30-20"> <div class="mb10 edu-back-white padding30-20">
<p class="color-grey-6 font-16 mb15">技术平台</p> <p class="color-grey-6 font-16 mb15">技术平台</p>
<div class="clearfix mb20"> <div class="clearfix mb20">

@ -33,19 +33,19 @@
</div> </div>
</div> </div>
<!-- <div class="mb10 edu-back-white padding40-20">--> <div class="mb10 edu-back-white padding40-20">
<!-- <p class="color-grey-6 font-16 mb30">简介</p>--> <p class="color-grey-6 font-16 mb30">简介</p>
<!-- <div class="df mb20">--> <div class="df mb20">
<!-- <div class="flex1 mr20">--> <div class="flex1 mr20">
<!-- <div id="setting_introduction" class="fl">--> <div id="setting_introduction" class="fl">
<!-- <textarea name="shixun[description]"><%#= @shixun.description %></textarea>--> <textarea name="shixun[description]"><%= @shixun.description %></textarea>
<!-- </div>--> </div>
<!-- <p id="e_tip_in" class="edu-txt-right color-grey-cd font-12"></p>--> <p id="e_tip_in" class="edu-txt-right color-grey-cd font-12"></p>
<!-- <p id="e_tips_in" class="edu-txt-right color-grey-cd font-12"></p>--> <p id="e_tips_in" class="edu-txt-right color-grey-cd font-12"></p>
<!-- </div>--> </div>
<!-- <div style="width: 57px;">&nbsp;</div>--> <div style="width: 57px;">&nbsp;</div>
<!-- </div>--> </div>
<!-- </div>--> </div>
<div class="mb10 edu-back-white padding40-20"> <div class="mb10 edu-back-white padding40-20">
<div class="clearfix mb20"> <div class="clearfix mb20">

Loading…
Cancel
Save