|
|
|
@ -33,19 +33,19 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="mb10 edu-back-white padding40-20">
|
|
|
|
|
<p class="color-grey-6 font-16 mb30">简介</p>
|
|
|
|
|
<div class="df mb20">
|
|
|
|
|
<div class="flex1 mr20">
|
|
|
|
|
<div id="setting_introduction" class="fl">
|
|
|
|
|
<textarea name="shixun[description]"><%= @shixun.description %></textarea>
|
|
|
|
|
</div>
|
|
|
|
|
<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>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="width: 57px;"> </div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div class="mb10 edu-back-white padding40-20">-->
|
|
|
|
|
<!-- <p class="color-grey-6 font-16 mb30">简介</p>-->
|
|
|
|
|
<!-- <div class="df mb20">-->
|
|
|
|
|
<!-- <div class="flex1 mr20">-->
|
|
|
|
|
<!-- <div id="setting_introduction" class="fl">-->
|
|
|
|
|
<!-- <textarea name="shixun[description]"><%#= @shixun.description %></textarea>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- <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>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- <div style="width: 57px;"> </div>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
|
|
|
|
|
<div class="mb10 edu-back-white padding40-20">
|
|
|
|
|
<div class="clearfix mb20">
|
|
|
|
@ -294,8 +294,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% if User.current.admin? || User.current.business? %>
|
|
|
|
|
<div class=<%User.current.admin? || User.current.business? ? "edu-back-white padding40-20 mb20":"none" %> >
|
|
|
|
|
<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>
|
|
|
|
@ -303,8 +302,7 @@
|
|
|
|
|
<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[]" value="<%= config.cpu_limit %>" class="panel-box-sizing task-form-100 task-height-40"
|
|
|
|
|
>
|
|
|
|
|
<input type="text" <%= User.current.admin? ? "" : "readonly" %> name="cpu_limit[]" value="<%= config.cpu_limit %>" class="panel-box-sizing task-form-100 task-height-40"
|
|
|
|
|
placeholder="请输入类别名称"/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
@ -312,8 +310,7 @@
|
|
|
|
|
<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[]" value="<%= config.lower_cpu_limit %>" class="panel-box-sizing task-form-100 task-height-40"
|
|
|
|
|
>
|
|
|
|
|
<input type="text" name="lower_cpu_limit[]" <%= User.current.admin? ? "" : "readonly" %> value="<%= config.lower_cpu_limit %>" class="panel-box-sizing task-form-100 task-height-40"
|
|
|
|
|
placeholder="请输入类别名称"/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
@ -321,8 +318,7 @@
|
|
|
|
|
<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[]" value="<%= config.memory_limit %>" class="panel-box-sizing task-form-100 task-height-40"
|
|
|
|
|
>
|
|
|
|
|
<input type="text" name="memory_limit[]" <%= User.current.admin? ? "" : "readonly" %> value="<%= config.memory_limit %>" class="panel-box-sizing task-form-100 task-height-40"
|
|
|
|
|
placeholder="请输入类别名称"/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
@ -330,8 +326,7 @@
|
|
|
|
|
<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[]" value="<%= config.request_limit %>" class="panel-box-sizing task-form-100 task-height-40"
|
|
|
|
|
>
|
|
|
|
|
<input type="text" name="request_limit[]" <%= User.current.admin? ? "" : "readonly" %> value="<%= config.request_limit %>" class="panel-box-sizing task-form-100 task-height-40"
|
|
|
|
|
placeholder="请输入类别名称"/>
|
|
|
|
|
</div>
|
|
|
|
|
<label class="panel-form-label fl" style="width: 48%">温馨提示:纯编程类型实训建议使用默认值,对于大数据等建议使用最大内存的30%</label>
|
|
|
|
@ -351,7 +346,6 @@
|
|
|
|
|
<div id='result'></div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
<div class="clearfix mt30">
|
|
|
|
|
<a href="javascript:void(0)" class="defalutSubmitbtn fl mr20" onclick="submit_edit_shixun(<%= @shixun.id %>);">保存</a>
|
|
|
|
|
<%= link_to "取消", settings_shixun_path(@shixun), :class => "defalutCancelbtn fl" %>
|
|
|
|
@ -364,7 +358,9 @@
|
|
|
|
|
<script id="t:edit-setting-list" type="text/html">
|
|
|
|
|
|
|
|
|
|
<!if(list.length>0) { !>
|
|
|
|
|
<!for(var i=0;i<list.length;i++){!>
|
|
|
|
|
<!for(var i=0;i
|
|
|
|
|
<list.length
|
|
|
|
|
;i++){!>
|
|
|
|
|
|
|
|
|
|
<p class="color-grey-6 font-16 mt30" id="shixun_scenario_type_name">
|
|
|
|
|
<!=listname[i]!>
|
|
|
|
@ -373,8 +369,7 @@
|
|
|
|
|
<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[]" 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="请输入类别名称"/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
@ -382,8 +377,7 @@
|
|
|
|
|
<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[]" value="0.1" class="panel-box-sizing task-form-100 task-height-40"
|
|
|
|
|
>
|
|
|
|
|
<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>
|
|
|
|
@ -391,8 +385,7 @@
|
|
|
|
|
<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[]" value="1024" class="panel-box-sizing task-form-100 task-height-40"
|
|
|
|
|
>
|
|
|
|
|
<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>
|
|
|
|
@ -400,8 +393,7 @@
|
|
|
|
|
<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[]" value="10" class="panel-box-sizing task-form-100 task-height-40"
|
|
|
|
|
>
|
|
|
|
|
<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>
|
|
|
|
|