|
|
@@ -156,13 +156,9 @@ |
|
|
|
<h4 class="unite title ui header ">{{.i18n.Tr "repo.modelarts.train_job.basic_info"}}:</h4> |
|
|
|
<div class="required unite min_title inline field"> |
|
|
|
<label>{{.i18n.Tr "repo.modelarts.train_job.job_name"}}</label> |
|
|
|
<input style="width: 80%;" name="job_name" id="trainjob_job_name" placeholder={{.i18n.Tr "repo.modelarts.train_job.job_name"}} value="{{.job_name}}" tabindex="3" autofocus required maxlength="255"> |
|
|
|
<input style="width: 60%;" name="job_name" id="trainjob_job_name" placeholder={{.i18n.Tr "repo.modelarts.train_job.job_name"}} value="{{.job_name}}" tabindex="3" autofocus required maxlength="255"> |
|
|
|
</div> |
|
|
|
<!--<div class="inline field"> |
|
|
|
<label>{{.i18n.Tr "repo.modelarts.train_job.version"}}</label> |
|
|
|
<span>第一版本</span> |
|
|
|
</div> |
|
|
|
--> |
|
|
|
|
|
|
|
<div class="unite min_title inline field"> |
|
|
|
<label for="description">{{.i18n.Tr "repo.modelarts.train_job.description"}} </label> |
|
|
|
<textarea style="width: 80%;" id="description" name="description" rows="3" maxlength="255" placeholder={{.i18n.Tr "repo.modelarts.train_job.new_place"}} onchange="this.value=this.value.substring(0, 255)" onkeydown="this.value=this.value.substring(0, 255)" onkeyup="this.value=this.value.substring(0, 256)"></textarea> |
|
|
@@ -182,7 +178,7 @@ |
|
|
|
<div class="required unite min_title inline fields" style="width: 90%;"> |
|
|
|
<label>{{.i18n.Tr "repo.modelarts.train_job.AI_driver"}} </label> |
|
|
|
<div class="field" style="flex: 1.5;"> |
|
|
|
<select class="ui search dropdown width" id="trainjob_engines" > |
|
|
|
<select class="ui dropdown width" id="trainjob_engines" > |
|
|
|
{{range .engines}} |
|
|
|
<option value="{{.Value}}">{{.Value}}</option> |
|
|
|
{{end}} |
|
|
@@ -190,7 +186,7 @@ |
|
|
|
|
|
|
|
</div> |
|
|
|
<div class="field" style="flex: 2;"> |
|
|
|
<select class="ui search dropdown width" id="trainjob_engine_versions" style='width: 100%;' name="engine_id"> |
|
|
|
<select class="ui dropdown width" id="trainjob_engine_versions" style='width: 100%;' name="engine_id"> |
|
|
|
{{range .engine_versions}} |
|
|
|
<option name="engine_id" value="{{.ID}}">{{.Value}}</option> |
|
|
|
{{end}} |
|
|
@@ -246,16 +242,17 @@ |
|
|
|
</div> |
|
|
|
<div class="required unite min_title inline field"> |
|
|
|
<label>{{.i18n.Tr "repo.modelarts.train_job.dataset"}}</label> |
|
|
|
<select class="ui search dropdown width80" id="trainjob_datasets" name="attachment"> |
|
|
|
<select class="ui dropdown width80" id="trainjob_datasets" name="attachment" placeholder="选择数据集"> |
|
|
|
{{if $.uuid}} |
|
|
|
<option name="attachment" value="{{$.uuid}}">{{$.datasetName}}</option> |
|
|
|
{{end}} |
|
|
|
{{range .attachments}} |
|
|
|
<option value="">选择数据集</option> |
|
|
|
<option name="attachment" value="{{.UUID}}">{{.Attachment.Name}}</option> |
|
|
|
{{end}} |
|
|
|
</select> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="inline unite min_title field"> |
|
|
|
<label>{{.i18n.Tr "repo.modelarts.train_job.run_parameter"}}</label> |
|
|
|
<!-- <i class="plus square outline icon"></i> --> |
|
|
@@ -270,7 +267,7 @@ |
|
|
|
<!-- <h4 class="ui dividing header">{{.i18n.Tr "repo.modelarts.train_job.resource_setting"}}</h4> --> |
|
|
|
<div class="required field " style="display: none;"> |
|
|
|
<label>{{.i18n.Tr "repo.modelarts.train_job.resource_pool"}}</label> |
|
|
|
<select class="ui search dropdown" id="trainjob_resource_pool" style='width:385px' name="pool_id"> |
|
|
|
<select class="ui dropdown" id="trainjob_resource_pool" style='width:385px' name="pool_id"> |
|
|
|
{{range .resource_pools}} |
|
|
|
<option value="{{.ID}}">{{.Value}}</option> |
|
|
|
{{end}} |
|
|
@@ -295,7 +292,7 @@ |
|
|
|
|
|
|
|
<div class="required unite min_title inline field"> |
|
|
|
<label>{{.i18n.Tr "repo.modelarts.train_job.standard"}}</label> |
|
|
|
<select class="ui search dropdown width81" id="trainjob-flavor" style='width:385px' name="flavor"> |
|
|
|
<select class="ui dropdown width81" id="trainjob-flavor" style='width:385px' name="flavor"> |
|
|
|
{{range .flavor_infos}} |
|
|
|
<option name="flavor" value="{{.Code}}">{{.Value}}</option> |
|
|
|
{{end}} |
|
|
@@ -478,9 +475,10 @@ |
|
|
|
$('.ui.parameter.modal') |
|
|
|
.modal('hide'); |
|
|
|
}) |
|
|
|
$('select.dropdown') |
|
|
|
.dropdown(); |
|
|
|
|
|
|
|
function validate(){ |
|
|
|
$('.ui.form') |
|
|
|
$('.ui.form') |
|
|
|
.form({ |
|
|
|
on: 'blur', |
|
|
|
inline:true, |
|
|
@@ -494,6 +492,25 @@ |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
job_name:{ |
|
|
|
identifier : 'job_name', |
|
|
|
rules: [ |
|
|
|
{ |
|
|
|
type: 'regExp[/^[a-zA-Z0-9-_]{1,35}$/]', |
|
|
|
prompt : '只包含大小写字母、数字、_和-,最长36个字符。' |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
attachment:{ |
|
|
|
identifier : 'attachment', |
|
|
|
rules: [ |
|
|
|
{ |
|
|
|
type: 'empty', |
|
|
|
prompt : '选择一个数据集' |
|
|
|
} |
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
work_server_number: { |
|
|
|
identifier : 'work_server_number', |
|
|
|
rules: [ |
|
|
@@ -504,6 +521,42 @@ |
|
|
|
] |
|
|
|
} |
|
|
|
}, |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function validate(){ |
|
|
|
$('.ui.form') |
|
|
|
.form({ |
|
|
|
on: 'blur', |
|
|
|
fields: { |
|
|
|
boot_file: { |
|
|
|
identifier : 'boot_file', |
|
|
|
rules: [ |
|
|
|
{ |
|
|
|
type: 'regExp[/.+\.py$/g]', |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
job_name:{ |
|
|
|
identifier : 'job_name', |
|
|
|
rules: [ |
|
|
|
{ |
|
|
|
type: 'regExp[/^[a-zA-Z0-9-_]{1,35}$/]', |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
attachment:{ |
|
|
|
identifier : 'attachment', |
|
|
|
rules: [ |
|
|
|
{ |
|
|
|
type: 'empty', |
|
|
|
} |
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
onSuccess: function(){ |
|
|
|
// $('.ui.page.dimmer').dimmer('show') |
|
|
|
document.getElementById("mask").style.display = "block" |
|
|
|