Merge remote-tracking branch 'origin/dev_aliyun' into dev_aliyun

dev_forum
杨树明 5 years ago
commit 0427e82d8b

@ -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,8 @@
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_column(:login, use.login.strip)
end
end
end

@ -678,60 +678,63 @@ class LoginRegisterComponent extends Component {
} }
//失去焦点判断 //失去焦点判断
inputOnBlur = (e, id) => { inputOnBlur = (e, id) => {
// this.isCorrectname(e.target.value, id); // debugger
// this.Emailphonenumberverification(e.target.value, id); // // this.isCorrectname(e.target.value, id);
if (e.target.value.length === 0) { // // this.Emailphonenumberverification(e.target.value, id);
this.setState({ // if (e.target.value.length === 0) {
Phonenumberisnotco: undefined, // this.setState({
Phonenumberisnotcobool: false, // Phonenumberisnotco: undefined,
}) // Phonenumberisnotcobool: false,
return; // })
} // return;
// var telephone = $("#telephoneAdd.tianjia_phone").val(); // }
var regph = /^[1][3,4,5,6,7,8][0-9]{9}$/; // // var telephone = $("#telephoneAdd.tianjia_phone").val();
// var email = $("#add_email.tianjia_email").val(); // var regph = /^[1][3,4,5,6,7,8][0-9]{9}$/;
var regemail = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/; // // var email = $("#add_email.tianjia_email").val();
// var regemail = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
// [1]手机号开头必须是1 [3,4,5,6,7,8] 第二位是3-8中的一个 [0-9]{9} 后边9位可以是0-9的任意数字。 //
var stringdata = undefined; // // [1]手机号开头必须是1 [3,4,5,6,7,8] 第二位是3-8中的一个 [0-9]{9} 后边9位可以是0-9的任意数字。
if (!regph.test(e.target.value)) { // var stringdata = undefined;
stringdata = "手机号格式不正确"; // if (!regph.test(e.target.value)) {
this.setState({ // stringdata = "手机号格式不正确";
Phonenumberisnotco: stringdata, // this.setState({
Phonenumberisnotcobool: true, // Phonenumberisnotco: stringdata,
dragOk:false, // Phonenumberisnotcobool: true,
Whethertoverify:this.state.Whethertoverify===true?false:true, // dragOk:false,
}) // Whethertoverify:this.state.Whethertoverify===true?false:true,
} else { // })
this.setState({ // } else {
Phonenumberisnotco: undefined, // console.log("706");
Phonenumberisnotcobool: false, // this.setState({
}) // Phonenumberisnotco: undefined,
return // Phonenumberisnotcobool: false,
} // })
// return
if (!regemail.test(e.target.value)) { // }
if ((e.target.value.indexOf("@") != -1) === true) { //
stringdata = "邮箱格式不正确"; // if (!regemail.test(e.target.value)) {
} else { // if ((e.target.value.indexOf("@") != -1) === true) {
stringdata = "手机号格式不正确"; // stringdata = "邮箱格式不正确";
// } else {
} // stringdata = "手机号格式不正确";
this.setState({ //
Phonenumberisnotco: stringdata, // }
Phonenumberisnotcobool: true, // this.setState({
dragOk:false, // Phonenumberisnotco: stringdata,
Whethertoverify:this.state.Whethertoverify===true?false:true, // Phonenumberisnotcobool: true,
}) // dragOk:false,
return // Whethertoverify:this.state.Whethertoverify===true?false:true,
} else { // })
this.setState({ // return
Phonenumberisnotco: undefined, // } else {
Phonenumberisnotcobool: false, // console.log("729");
}) // this.setState({
this.Emailphonenumberverification(e.target.value, 1); // Phonenumberisnotco: undefined,
return // Phonenumberisnotcobool: false,
} // })
// this.Emailphonenumberverification(e.target.value, 1);
// return
// }
this.Emailphonenumberverification(e.target.value, 1); this.Emailphonenumberverification(e.target.value, 1);
} }
inputOnBlurzhuche = (e, id) => { inputOnBlurzhuche = (e, id) => {

Loading…
Cancel
Save