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

# Conflicts:
#	app/views/shixuns/_settings_edit.html.erb
dev_bj
杨树明 6 years ago
commit 41698baf08

@ -273,6 +273,10 @@ class Shixun < ActiveRecord::Base
return name
end
def child_mirror_ids
self.mirror_repositories.where(:main_type => 0).pluck(:id)
end
def mirror_name
self.mirror_repositories.map(&:type_name).blank? ? "" : self.mirror_repositories.map(&:type_name)
end

@ -71,7 +71,7 @@
<div class="down-select" id="shixun_small_language_option" style="padding: 2px 0px">
<% @small_type.try(:each) do |type| %>
<p data-shixun-value="<%= type.id %>">
<input type="checkbox" class="magic-checkbox" id="mirror_<%= type.id %>" value="<%= type.type_name %>" />
<input type="checkbox" class="magic-checkbox" id="mirror_<%= type.id %>" value="<%= type.type_name %>" <%= @shixun.child_mirror_ids.include?(type.id) ? "checked" : ""%>/>
<label style="top:0px" for="mirror_<%= type.id %>"><%= type.type_name %></label>
</p>
<% end %>
@ -294,7 +294,7 @@
</div>
</div>
<% end %>
<div class="edu-back-white padding40-20 mb20" id="lists_mirro">
<div class="edu-back-white padding40-20 mb20">
<p class="color-grey-6 font-16 mb30">服务配置</p>
<% @shixun.shixun_service_configs.each do |config| %>
<p class="color-grey-6 font-16 mt30" id="shixun_scenario_type_name"><%= config.mirror_repository.try(:type_name) %></p>
@ -354,17 +354,18 @@
</div>
<script id="t:edit-setting-list" type="text/html">
<!if(list.length>0) { !>
<!for(var i=0;i
<list.length
;i++){!>
<p name=<!=listname[i]!>>
<p class="color-grey-6 font-16 mt30" id="shixun_scenario_type_name">
<!=listname[i]!>
</p>
<input type="hidden" name="mirror_id[]" value=<!=list[i]!>>
<input type="hidden" name="mirror_id[]" value=>
<div class="clearfix mb5">
<label class="panel-form-label fl">CPU(核)</label>
<div class="pr fl with80 status_con">
@ -398,8 +399,6 @@
<label class="panel-form-label fl" style="width: 48%">温馨提示纯编程类型实训建议使用默认值对于大数据等建议使用最大内存的30%</label>
<div class="cl"></div>
</div>
</p>
<!}!>
<!}else{!><!}!>
@ -513,8 +512,6 @@
});
$("[select-more] .down-select p input").bind("click", function () {
debugger
var bt = baidu.template;
bt.LEFT_DELIMITER = '<!';
bt.RIGHT_DELIMITER = '!>';

Loading…
Cancel
Save