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

dev_cs
cxt 5 years ago
commit 98e44d8950

@ -947,7 +947,7 @@ class GamesController < ApplicationController
raise("实训云平台繁忙繁忙等级99")
end
@vnc_url =
if request.subdomain == "pre-newweb"
if request.subdomain == "pre-newweb" || request.subdomain == "test-newweb"
# 无域名版本
"http://#{service_host}:#{res['port']}/vnc_lite.html?password=headless"
else

@ -978,7 +978,7 @@ private
raise("实训名称不能为空") if params[:shixun][:name].blank?
params.require(:shixun).permit(:name, :trainee, :webssh, :can_copy, :use_scope, :vnc, :test_set_permission,
:task_pass, :multi_webssh, :opening_time, :mirror_script_id, :code_hidden,
:hide_code, :forbid_copy, :vnc_evaluate)
:hide_code, :forbid_copy, :vnc_evaluate, :code_edit_permission)
end
def shixun_info_params

@ -30,6 +30,7 @@ json.shixun do
json.scope_partment @shixun.schools.map(&:name) # 公开范围
json.opening_time @shixun.opening_time
json.forbid_copy @shixun.forbid_copy
json.code_edit_permission @shixun.code_edit_permission # tpi学员是否有编辑所有代码的权限
# 私密仓库
json.is_secret_repository @shixun.shixun_secret_repository.present?

@ -0,0 +1,6 @@
class AddCodeEditPermissionForShixun < ActiveRecord::Migration[5.2]
def change
add_column :shixuns, :code_edit_permission, :boolean, default: false
end
end

@ -2355,10 +2355,10 @@ export default class TPMsettings extends Component {
return(
<div key={key}>
<div id="5">
<p className="color-grey-6 font-16 mt30 mb20" id="shixun_scenario_type_name">
<div className="color-grey-6 font-16 mt30 mb20" id="shixun_scenario_type_name">
<span className={"fl"}>{item.name}</span>
{/*<span className={"fr mr40"} onClick={()=>this.Deselectlittle(item.mirror_repository_id)}><i className="fa fa-times-circle color-grey-c font-16 fl"></i></span>*/}
</p>
</div>
<div className="clearfix mb5">
<label className="panel-form-label fl">CPU()</label>
<div className="pr fl with80 status_con">

Loading…
Cancel
Save