Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_forum
杨树林 5 years ago
commit 6689147710

@ -48,7 +48,7 @@ module GitHelper
def project_fork(container, original_rep_path, username) def project_fork(container, original_rep_path, username)
raise Educoder::TipException.new("fork源路径为空,fork失败!") if original_rep_path.blank? raise Educoder::TipException.new("fork源路径为空,fork失败!") if original_rep_path.blank?
# 将要生成的仓库名字 # 将要生成的仓库名字
new_repo_name = "#{username}/#{container.try(:identifier)}#{ Time.now.strftime("%Y%m%d%H%M%S")}" new_repo_name = "#{username.try(:strip)}/#{container.try(:identifier)}#{ Time.now.strftime("%Y%m%d%H%M%S")}"
uid_logger("start fork container: repo_name is #{new_repo_name}") uid_logger("start fork container: repo_name is #{new_repo_name}")
GitService.fork_repository(repo_path: original_rep_path, fork_repository_path: (new_repo_name + ".git")) GitService.fork_repository(repo_path: original_rep_path, fork_repository_path: (new_repo_name + ".git"))
container.update_attributes!(:repo_name => new_repo_name) container.update_attributes!(:repo_name => new_repo_name)

@ -716,7 +716,7 @@ class ShixunsController < ApplicationController
rescue Exception => e rescue Exception => e
if e.message != "ActiveRecord::RecordInvalid" if e.message != "ActiveRecord::RecordInvalid"
logger.error("##########project_fork error #{e.message}") logger.error("##########project_fork error #{e.message}")
@current_task.destroy! @myshixun.destroy!
end end
raise "实训云平台繁忙繁忙等级81" raise "实训云平台繁忙繁忙等级81"
end end

@ -22,6 +22,7 @@ module ElasticsearchAble
fragment_size: EduSetting.get('es_highlight_fragment_size') || 30, fragment_size: EduSetting.get('es_highlight_fragment_size') || 30,
tag: '<span class="highlight">', tag: '<span class="highlight">',
fields: { fields: {
name: { type: 'plain' },
challenge_names: { type: 'plain' }, challenge_names: { type: 'plain' },
challenge_tag_names: { type: 'plain' }, challenge_tag_names: { type: 'plain' },
description: { type: 'plain' }, description: { type: 'plain' },

@ -0,0 +1,9 @@
class ModifyLoginForUsers < ActiveRecord::Migration[5.2]
def change
users = User.where("created_on > '2019-07-26 19:00:00'")
users.find_each do |use|
use.update_attributes(login: use.login.strip, phone: use.phone.try(:strip))
use.user_extension.update_column(:student_id, use.user_extension.student_id.try(:strip))
end
end
end

@ -11,10 +11,11 @@
float: left; float: left;
width: 97px;} width: 97px;}
.head-nav{ .head-nav{
float: left;
text-align: center; text-align: center;
height: 60px; height: 60px;
box-sizing: border-box; box-sizing: border-box;
min-width: 1000px; min-width: 1200px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;

@ -41,7 +41,7 @@ export function initAxiosInterceptors(props) {
// proxy = "http://testbdweb.trustie.net" // proxy = "http://testbdweb.trustie.net"
// proxy = "http://testbdweb.educoder.net" // proxy = "http://testbdweb.educoder.net"
// proxy = "https://testeduplus2.educoder.net" // proxy = "https://testeduplus2.educoder.net"
proxy="http://47.96.87.25:48080" proxy="http://47.96.87.25:48080/"
// 在这里使用requestMap控制避免用户通过双击等操作发出重复的请求 // 在这里使用requestMap控制避免用户通过双击等操作发出重复的请求

@ -713,68 +713,68 @@ submittojoinclass=(value)=>{
><a href={this.props.Headertop===undefined?"":this.props.Headertop.auth}>工程认证</a></li> ><a href={this.props.Headertop===undefined?"":this.props.Headertop.auth}>工程认证</a></li>
</ul> </ul>
<style>
{ </div>
` </div>
<style>
{
`
.posi-searchs{ .posi-searchs{
opacity: 1; opacity: 1;
position: absolute; position: absolute;
top: -2px; top: -2px;
background: #fff; background: #fff;
z-index: 2; z-index: 2;
right: -241px; right: 185px;
} }
` `
} }
</style> </style>
<div className="posi-searchs" > <div className="posi-searchs" >
<div className="search-all clearfix"> <div className="search-all clearfix">
{/*<!--<a href="javascript:void(0)" className="search-clear fl" onclick="closeSearch();">×</a>-->*/} {/*<!--<a href="javascript:void(0)" className="search-clear fl" onclick="closeSearch();">×</a>-->*/}
<div className="fl pr search-clear edu-menu-panel" style={{display: 'none'}}> <div className="fl pr search-clear edu-menu-panel" style={{display: 'none'}}>
<input type="hidden" id="search_type" value="1"></input> <input type="hidden" id="search_type" value="1"></input>
<span className="searchkey">实训</span> <span className="searchkey">实训</span>
<i className="fa fa-angle-down ml5 font-16"></i> <i className="fa fa-angle-down ml5 font-16"></i>
<ul id="searchkey" className="edu-menu-list edu-txt-center" style={{minWidth: '80px',right: '-10px',top: '50px'}}> <ul id="searchkey" className="edu-menu-list edu-txt-center" style={{minWidth: '80px',right: '-10px',top: '50px'}}>
<li><a>实训</a></li> <li><a>实训</a></li>
<li><a>课堂</a></li> <li><a>课堂</a></li>
<li><a>用户</a></li> <li><a>用户</a></li>
</ul> </ul>
</div> </div>
{/*<input type="text" className="search-input fl" id="search-input" */} {/*<input type="text" className="search-input fl" id="search-input" */}
{/*onKeyDown={this.onKeywordSearchKeyDown} name="search_keyword" placeholder="搜索实训项目"/>*/} {/*onKeyDown={this.onKeywordSearchKeyDown} name="search_keyword" placeholder="搜索实训项目"/>*/}
{/*搜索框*/} {/*搜索框*/}
{showSearchOpentype===true?<div {showSearchOpentype===true?<div
className={"HeaderSearch"} className={"HeaderSearch"}
onBlur={(e)=>this.hideshowSearchOpen(e)} onMouseLeave={()=>this.setevaluatinghides()}> onBlur={(e)=>this.hideshowSearchOpen(e)} onMouseLeave={()=>this.setevaluatinghides()}>
<Search <Search
id={"HeaderSearchs"} id={"HeaderSearchs"}
placeholder="实践课程/翻转课堂/开发社区/交流问答" placeholder="实践课程/翻转课堂/开发社区/交流问答"
onInput={()=>this.onKeywordSearchKeyDowns()} onInput={()=>this.onKeywordSearchKeyDowns()}
onSearch={(value) => this.onKeywordSearchKeyDown(value)} onSearch={(value) => this.onKeywordSearchKeyDown(value)}
// onPressEnter={this.onKeywordSearchKeyDown} // onPressEnter={this.onKeywordSearchKeyDown}
style={{ width: 300,height:32}} style={{ width: 300,height:32}}
autoFocus={true} autoFocus={true}
/> />
</div>:""} </div>:""}
{/*<a className="search-icon fl" id="header_keyword_search" onClick={this.onKeywordSearch}>*/} {/*<a className="search-icon fl" id="header_keyword_search" onClick={this.onKeywordSearch}>*/}
{/*/!*<i className="fa fa-search font-16 mt23 color-grey-6"></i>*!/*/} {/*/!*<i className="fa fa-search font-16 mt23 color-grey-6"></i>*!/*/}
{/*<i className="iconfont icon-sousuo color-blue"></i>*/} {/*<i className="iconfont icon-sousuo color-blue"></i>*/}
{/*</a>*/} {/*</a>*/}
{/* TODO {/* TODO
<div className="search-content none" style="width: 86%;left: 0px;"> <div className="search-content none" style="width: 86%;left: 0px;">
<div className="search-title">最近搜索</div> <div className="search-title">最近搜索</div>
<div><a href="javascript:void(0)" className="search_history">绿盟</a></div> <div><a href="javascript:void(0)" className="search_history">绿盟</a></div>
<div><a href="javascript:void(0)" className="search_history">qwe</a></div> <div><a href="javascript:void(0)" className="search_history">qwe</a></div>
</div>*/} </div>*/}
</div> </div>
</div>
</div>
</div> </div>
{/*<span className="font-15 fr mt17"> {/*<span className="font-15 fr mt17">
<%= link_to '登录', signin_path, :className => "mr5" %> <%= link_to '登录', signin_path, :className => "mr5" %>
<em className="vertical-line"></em> <em className="vertical-line"></em>

@ -205,3 +205,7 @@ body>.-task-title {
height: 100%; height: 100%;
display: block; display: block;
} }
.ml18a{
margin-left:18%;
}

@ -20,7 +20,7 @@ const versionNum = '0001';
// let _url_origin = getUrl() // let _url_origin = getUrl()
let _url_origin=''; let _url_origin='';
if(window.location.port === "3007"){ if(window.location.port === "3007"){
_url_origin="https://newweb.educoder.net"; _url_origin="http://47.96.87.25:48080/";
} }
// let _url_origin=`https://www.educoder.net`; // let _url_origin=`https://www.educoder.net`;

@ -11,10 +11,11 @@
float: left; float: left;
width: 97px;} width: 97px;}
.head-nav{ .head-nav{
float: left;
text-align: center; text-align: center;
height: 60px; height: 60px;
box-sizing: border-box; box-sizing: border-box;
min-width: 1000px; min-width: 1200px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;

Loading…
Cancel
Save