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