|
|
@ -295,10 +295,14 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<div class="edu-back-white padding40-20 mb20">
|
|
|
|
<div class="edu-back-white padding40-20 mb20">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p class="color-grey-6 font-16 mb30">服务配置</p>
|
|
|
|
<p class="color-grey-6 font-16 mb30">服务配置</p>
|
|
|
|
<% @shixun.shixun_service_configs.each do |config| %>
|
|
|
|
<% @shixun.shixun_service_configs.each do |config| %>
|
|
|
|
|
|
|
|
<div id="<%= config.mirror_repository.try(:id) %>" >
|
|
|
|
<p class="color-grey-6 font-16 mt30" id="shixun_scenario_type_name"><%= config.mirror_repository.try(:type_name) %></p>
|
|
|
|
<p class="color-grey-6 font-16 mt30" id="shixun_scenario_type_name"><%= config.mirror_repository.try(:type_name) %></p>
|
|
|
|
<input type="hidden" name="mirror_id[]" id="shixun_scenario_type_name_id" value="<%= config.mirror_repository.try(:id) %>'">
|
|
|
|
<input type="hidden" name="mirror_id[]" id="shixun_scenario_type_name_id" value="<%= config.mirror_repository.try(:id) %>">
|
|
|
|
<div class="clearfix mb5">
|
|
|
|
<div class="clearfix mb5">
|
|
|
|
<label class="panel-form-label fl">CPU(核):</label>
|
|
|
|
<label class="panel-form-label fl">CPU(核):</label>
|
|
|
|
<div class="pr fl with80 status_con">
|
|
|
|
<div class="pr fl with80 status_con">
|
|
|
@ -332,7 +336,7 @@
|
|
|
|
<label class="panel-form-label fl" style="width: 48%">温馨提示:纯编程类型实训建议使用默认值,对于大数据等建议使用最大内存的30%</label>
|
|
|
|
<label class="panel-form-label fl" style="width: 48%">温馨提示:纯编程类型实训建议使用默认值,对于大数据等建议使用最大内存的30%</label>
|
|
|
|
<div class="cl"></div>
|
|
|
|
<div class="cl"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <div class="clearfix mb5">-->
|
|
|
|
<!-- <div class="clearfix mb5">-->
|
|
|
|
<!-- <label class="panel-form-label fl">磁盘限制(K):</label>-->
|
|
|
|
<!-- <label class="panel-form-label fl">磁盘限制(K):</label>-->
|
|
|
@ -361,45 +365,45 @@
|
|
|
|
<!for(var i=0;i
|
|
|
|
<!for(var i=0;i
|
|
|
|
<list.length
|
|
|
|
<list.length
|
|
|
|
;i++){!>
|
|
|
|
;i++){!>
|
|
|
|
|
|
|
|
<div id=<!=list[i]!>>
|
|
|
|
<p class="color-grey-6 font-16 mt30" id="shixun_scenario_type_name">
|
|
|
|
<p class="color-grey-6 font-16 mt30" id="shixun_scenario_type_name">
|
|
|
|
<!=listname[i]!>
|
|
|
|
<!=listname[i]!>
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
<input type="hidden" name="mirror_id[]" value=>
|
|
|
|
<input type="hidden" name="mirror_id[]" value=<!=list[i]!>>
|
|
|
|
<div class="clearfix mb5">
|
|
|
|
<div class="clearfix mb5">
|
|
|
|
<label class="panel-form-label fl">CPU(核):</label>
|
|
|
|
<label class="panel-form-label fl">CPU(核):</label>
|
|
|
|
<div class="pr fl with80 status_con">
|
|
|
|
<div class="pr fl with80 status_con">
|
|
|
|
<input type="text" name="cpu_limit[]" <%= User.current.admin? ? "" : "readonly" %> value="1" class="panel-box-sizing task-form-100 task-height-40"
|
|
|
|
<input type="text" name="cpu_limit[]" <%= User.current.admin? ? "" : "readonly" %> value="1" class="panel-box-sizing task-form-100 task-height-40"
|
|
|
|
placeholder="请输入类别名称"/>
|
|
|
|
placeholder="请输入类别名称"/>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="cl"></div>
|
|
|
|
<div class="clearfix mb5">
|
|
|
|
</div>
|
|
|
|
<label class="panel-form-label fl">最低CPU(核):</label>
|
|
|
|
<div class="clearfix mb5">
|
|
|
|
<div class="pr fl with80 status_con">
|
|
|
|
<label class="panel-form-label fl">最低CPU(核):</label>
|
|
|
|
<input type="text" name="lower_cpu_limit[]" <%= User.current.admin? ? "" : "readonly" %> value="0.1" class="panel-box-sizing task-form-100 task-height-40"
|
|
|
|
<div class="pr fl with80 status_con">
|
|
|
|
placeholder="请输入类别名称"/>
|
|
|
|
<input type="text" name="lower_cpu_limit[]" <%= User.current.admin? ? "" : "readonly" %> value="0.1" class="panel-box-sizing task-form-100 task-height-40"
|
|
|
|
</div>
|
|
|
|
placeholder="请输入类别名称"/>
|
|
|
|
<div class="cl"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="cl"></div>
|
|
|
|
<div class="clearfix mb5">
|
|
|
|
</div>
|
|
|
|
<label class="panel-form-label fl">内存限制(M):</label>
|
|
|
|
<div class="clearfix mb5">
|
|
|
|
<div class="pr fl with80 status_con">
|
|
|
|
<label class="panel-form-label fl">内存限制(M):</label>
|
|
|
|
<input type="text" name="memory_limit[]" <%= User.current.admin? ? "" : "readonly" %> value="1024" class="panel-box-sizing task-form-100 task-height-40"
|
|
|
|
<div class="pr fl with80 status_con">
|
|
|
|
placeholder="请输入类别名称"/>
|
|
|
|
<input type="text" name="memory_limit[]" <%= User.current.admin? ? "" : "readonly" %> value="1024" class="panel-box-sizing task-form-100 task-height-40"
|
|
|
|
</div>
|
|
|
|
placeholder="请输入类别名称"/>
|
|
|
|
<div class="cl"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="cl"></div>
|
|
|
|
<div class="clearfix mb5">
|
|
|
|
</div>
|
|
|
|
<label class="panel-form-label fl">内存要求(M):</label>
|
|
|
|
<div class="clearfix mb5">
|
|
|
|
<div class="pr fl with20 status_con">
|
|
|
|
<label class="panel-form-label fl">内存要求(M):</label>
|
|
|
|
<input type="text" name="request_limit[]" <%= User.current.admin? ? "" : "readonly" %> value="10" class="panel-box-sizing task-form-100 task-height-40"
|
|
|
|
<div class="pr fl with20 status_con">
|
|
|
|
placeholder="请输入类别名称"/>
|
|
|
|
<input type="text" name="request_limit[]" <%= User.current.admin? ? "" : "readonly" %> value="10" class="panel-box-sizing task-form-100 task-height-40"
|
|
|
|
</div>
|
|
|
|
placeholder="请输入类别名称"/>
|
|
|
|
<label class="panel-form-label fl" style="width: 48%">温馨提示:纯编程类型实训建议使用默认值,对于大数据等建议使用最大内存的30%</label>
|
|
|
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<label class="panel-form-label fl" style="width: 48%">温馨提示:纯编程类型实训建议使用默认值,对于大数据等建议使用最大内存的30%</label>
|
|
|
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!}!>
|
|
|
|
<!}!>
|
|
|
|
<!}else{!><!}!>
|
|
|
|
<!}else{!><!}!>
|
|
|
|
|
|
|
|
|
|
|
@ -520,13 +524,20 @@
|
|
|
|
var arr = "";
|
|
|
|
var arr = "";
|
|
|
|
var arrs = [];
|
|
|
|
var arrs = [];
|
|
|
|
var idarr = [];
|
|
|
|
var idarr = [];
|
|
|
|
|
|
|
|
var noidarr=[];
|
|
|
|
for (var i = 0; i < all.find("input").length; i++) {
|
|
|
|
for (var i = 0; i < all.find("input").length; i++) {
|
|
|
|
if (all.find("input").eq(i).is(':checked')) {
|
|
|
|
if (all.find("input").eq(i).is(':checked')) {
|
|
|
|
arr += ";" + (all.find("input").eq(i).attr("value"));
|
|
|
|
arr += ";" + (all.find("input").eq(i).attr("value"));
|
|
|
|
arrs.push(all.find("input").eq(i).attr("value"))
|
|
|
|
arrs.push(all.find("input").eq(i).attr("value"))
|
|
|
|
idarr.push(all.find("input").eq(i).parents("p").attr("data-shixun-value"));
|
|
|
|
idarr.push(all.find("input").eq(i).parents("p").attr("data-shixun-value"));
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
noidarr.push(all.find("input").eq(i).parents("p").attr("data-shixun-value"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for(var i=0; i<noidarr.length; i++){
|
|
|
|
|
|
|
|
$("#"+noidarr[i]).remove();
|
|
|
|
|
|
|
|
}
|
|
|
|
var data = {
|
|
|
|
var data = {
|
|
|
|
"listname": arrs,
|
|
|
|
"listname": arrs,
|
|
|
|
"list": idarr,
|
|
|
|
"list": idarr,
|
|
|
|