|
|
@@ -83,7 +83,7 @@ |
|
|
|
</div> |
|
|
|
<div class="unite min_title inline field"> |
|
|
|
<label style="font-weight: normal;" for="description">{{.i18n.Tr "repo.modelarts.train_job.description"}} </label> |
|
|
|
<textarea style="width: 80%;" id="description" name="description" rows="3" maxlength="254" 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, 255)"></textarea> |
|
|
|
<textarea style="width: 80%;" id="description" name="description" rows="3" maxlength="254" value="{{.description}}" 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, 255)"></textarea> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="required unite min_title inline field"> |
|
|
@@ -102,11 +102,16 @@ |
|
|
|
<span> </span> |
|
|
|
<select class="ui fluid selection search dropdown" id="benchmark_types_id" name="benchmark_types_id" > |
|
|
|
{{range .benchmark_types}} |
|
|
|
<option value="{{.Id}}">{{.First}}</option> |
|
|
|
{{if eq .Id .benchmarkTypeID}} |
|
|
|
<option value="{{.Id}}" selected="true">{{.First}}</option> |
|
|
|
{{else}} |
|
|
|
<option value="{{.Id}}">{{.First}}</option> |
|
|
|
{{end}} |
|
|
|
{{end}} |
|
|
|
</select> |
|
|
|
</div> |
|
|
|
<div class="eight wide field" id="engine_name"> |
|
|
|
<input type="hidden" id="benchmark_child_types_id_hidden" name="benchmark_child_types_id_hidden" value="{{.benchmark_child_types_id_hidden}}"> |
|
|
|
<label style="font-weight: normal;white-space: nowrap;">{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_child_type"}}</label> |
|
|
|
<select class="ui fluid selection dropdown nowrap" id="benchmark_child_types_id" style='width: 100%;' name="benchmark_child_types_id"> |
|
|
|
</select> |
|
|
@@ -182,12 +187,17 @@ |
|
|
|
|
|
|
|
function setChildType(){ |
|
|
|
let type_id = $('#benchmark_types_id').val(); |
|
|
|
let child_selected_id = $('#benchmark_child_types_id_hidden').val(); |
|
|
|
$.get(`${repolink}/cloudbrain/benchmark/get_child_types?benchmark_type_id=${type_id}`, (data) => { |
|
|
|
console.log(JSON.stringify(data)) |
|
|
|
const n_length = data['child_types'].length |
|
|
|
let html='' |
|
|
|
for (let i=0;i<n_length;i++){ |
|
|
|
html += `<option value="${data['child_types'][i].id}">${data['child_types'][i].value}</option>`; |
|
|
|
if(child_selected_id == data['child_types'][i].id){ |
|
|
|
html += `<option value="${data['child_types'][i].id}" selected="true">${data['child_types'][i].value}</option>`; |
|
|
|
}else{ |
|
|
|
html += `<option value="${data['child_types'][i].id}">${data['child_types'][i].value}</option>`; |
|
|
|
} |
|
|
|
} |
|
|
|
document.getElementById("benchmark_child_types_id").innerHTML=html; |
|
|
|
}) |
|
|
|