|
|
@@ -59,6 +59,10 @@ |
|
|
|
<div class="inline field"> |
|
|
|
<label class="label-fix-width" style="font-weight: normal;"></label> |
|
|
|
{{template "custom/task_wait_count" .}} |
|
|
|
<div style="display: flex;align-items: center;margin-left: 156px;margin-top: 0.5rem;"> |
|
|
|
<i class="ri-error-warning-line" style="color: #f2711c;margin-right: 0.5rem;"></i> |
|
|
|
<span style="color: #888;font-size: 12px;">{{.i18n.Tr "cloudbrain.new_debug_gpu_tooltips1" "/code" "/dataset" "/pretrainmodel" | Safe}}</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="inline min_title required field" style="margin-bottom: 0rem !important;"> |
|
|
|
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.task_name"}}</label> |
|
|
@@ -95,10 +99,7 @@ |
|
|
|
{{end}} |
|
|
|
</select> |
|
|
|
</div> |
|
|
|
{{template "custom/select_model" .}} |
|
|
|
<script> |
|
|
|
var IMAGES = {{ .images}}; |
|
|
|
</script> |
|
|
|
{{template "custom/select_model" .}} |
|
|
|
<div class="inline min_title required field"> |
|
|
|
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.mirror"}}</label> |
|
|
|
<select class="ui search dropdown cloudbrain_image width48" placeholder="{{.i18n.Tr "cloudbrain.choose_mirror"}}" style='width:385px' name="image_id"> |
|
|
@@ -131,7 +132,7 @@ |
|
|
|
</div> |
|
|
|
<div class="inline field"> |
|
|
|
<label class="label-fix-width" style="font-weight: normal;"></label> |
|
|
|
<button class="ui green button {{if eq .NotStopTaskCount 1}}disabled{{end}}"> |
|
|
|
<button class="ui create_train_job green button {{if eq .NotStopTaskCount 1}}disabled{{end}}"> |
|
|
|
{{.i18n.Tr "repo.cloudbrain.new"}} |
|
|
|
</button> |
|
|
|
<a class="ui button cancel" href="{{.RepoLink}}/debugjob?debugListType=all">{{.i18n.Tr "repo.cloudbrain.cancel"}}</a> |
|
|
@@ -144,81 +145,8 @@ |
|
|
|
</div> |
|
|
|
{{template "base/footer" .}} |
|
|
|
<script src="{{StaticUrlPrefix}}/js/specsuse.js?v={{MD5 AppVer}}" type="text/javascript"></script> |
|
|
|
<script> |
|
|
|
// 判断必填选项是否填写正确 |
|
|
|
let form = document.getElementById('form_id'); |
|
|
|
$('#messageInfo').css('display','none') |
|
|
|
var isValidate = false; |
|
|
|
function validate(){ |
|
|
|
$('.ui.form').form({ |
|
|
|
on: 'blur', |
|
|
|
fields: { |
|
|
|
display_job_name:{ |
|
|
|
identifier : 'display_job_name', |
|
|
|
rules: [ |
|
|
|
{ |
|
|
|
type: 'regExp[/^[a-z0-9][a-z0-9-_]{1,34}[a-z0-9-]$/]', |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
spec_id: { |
|
|
|
identifier: 'spec_id', |
|
|
|
rules: [{ type: 'empty' }] |
|
|
|
} |
|
|
|
}, |
|
|
|
onSuccess: function(){ |
|
|
|
isValidate = true; |
|
|
|
}, |
|
|
|
onFailure: function(e){ |
|
|
|
isValidate = false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
validate(); |
|
|
|
let createFlag = false |
|
|
|
form.onsubmit = function(e){ |
|
|
|
if(!isValidate) return false; |
|
|
|
if(createFlag) return false; |
|
|
|
let value_task = $("input[name='display_job_name']").val() |
|
|
|
let re = /^[a-z0-9][a-z0-9-_]{1,34}[a-z0-9-]$/ |
|
|
|
let flag = re.test(value_task) |
|
|
|
if(!flag){ |
|
|
|
$('#messageInfo').css('display','block') |
|
|
|
let str = '只能以小写字母或数字开头且只包含小写字母、数字、_和-,不能以_结尾,最长36个字符。' |
|
|
|
$('#messageInfo p').text(str) |
|
|
|
return false |
|
|
|
} |
|
|
|
let min_value_task = value_task.toLowerCase() |
|
|
|
$("input[name='display_job_name']").attr("value",min_value_task) |
|
|
|
document.getElementById("mask").style.display = "block" |
|
|
|
createFlag = true |
|
|
|
} |
|
|
|
// 页面加载完毕后遮罩层隐藏 |
|
|
|
document.onreadystatechange = function() { |
|
|
|
if (document.readyState === "complete") { |
|
|
|
document.getElementById("mask").style.display = "none" |
|
|
|
} |
|
|
|
} |
|
|
|
$(document).ready(function(){ |
|
|
|
$('input[name="image"]').val($('.cloudbrain_image').dropdown('get text')) |
|
|
|
$('.cloudbrain_image.ui.search.dropdown') |
|
|
|
.dropdown({ |
|
|
|
onChange: function(value, text, $selectedItem) { |
|
|
|
$('input[name="image"]').val(text) |
|
|
|
} |
|
|
|
}) |
|
|
|
$(document).keydown(function(event){ |
|
|
|
if(event.keyCode==13){ |
|
|
|
event.preventDefault(); |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
$(".question.circle.icon").hover(function () { |
|
|
|
$(this).popup("show"); |
|
|
|
}); |
|
|
|
|
|
|
|
<script src="{{StaticUrlPrefix}}/js/cloudbrainNew.js?v={{MD5 AppVer}}" type="text/javascript"></script> |
|
|
|
<script> |
|
|
|
;(function() { |
|
|
|
var SPECS = {{ .Specs }}; |
|
|
|
var showPoint = {{ .CloudBrainPaySwitch }}; |
|
|
|