实训还原配置:

dev_bj
daiao 6 years ago
parent 8740915626
commit b40f1844fb

@ -1063,7 +1063,7 @@ class ShixunsController < ApplicationController
end end
# 超级管理员才能保存 中间层服务器pod信息的配置 # 超级管理员才能保存 中间层服务器pod信息的配置
if User.current.admin? if User.current.admin? || User.current.business?
@shixun.shixun_service_configs.each_with_index do |config, index| @shixun.shixun_service_configs.each_with_index do |config, index|
config.update_attributes(:cpu_limit => params[:cpu_limit][index], config.update_attributes(:cpu_limit => params[:cpu_limit][index],
:lower_cpu_limit => params[:lower_cpu_limit][index], :lower_cpu_limit => params[:lower_cpu_limit][index],

@ -282,6 +282,7 @@ module ApplicationHelper
:type => mirror.try(:main_type) == "1" ? "main" : "sub"} :type => mirror.try(:main_type) == "1" ? "main" : "sub"}
end end
end end
Rails.logger.info("#########container: #{container.to_json}")
return container.to_json return container.to_json
end end

@ -17,7 +17,6 @@ class GamesService
myshixun = Myshixun.min.find(game.myshixun_id) myshixun = Myshixun.min.find(game.myshixun_id)
shixun = Shixun.min.find(myshixun.shixun_id) shixun = Shixun.min.find(myshixun.shixun_id)
Rails.logger.info("#########container: #{shixun_container_limit(shixun)}")
unless ((myshixun.user_id == current_user.id || current_user.business? || current_user.id == shixun.try(:user_id) || unless ((myshixun.user_id == current_user.id || current_user.business? || current_user.id == shixun.try(:user_id) ||
current_user.is_certification_teacher) && (shixun.operable?)) || current_user.admin? current_user.is_certification_teacher) && (shixun.operable?)) || current_user.admin?
Rails.logger.info("######403???") Rails.logger.info("######403???")

@ -39,16 +39,16 @@
</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>

@ -35,16 +35,16 @@
<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">

Loading…
Cancel
Save