Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.1.3
zouap 3 years ago
parent
commit
9e2b65aa20
1 changed files with 12 additions and 92 deletions
  1. +12
    -92
      templates/repo/cloudbrain/benchmark/new.tmpl

+ 12
- 92
templates/repo/cloudbrain/benchmark/new.tmpl View File

@@ -99,10 +99,8 @@
</div>
<label style="font-weight: normal;">{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_child_type"}}&nbsp;&nbsp;&nbsp;</label>
<div class="field" style="flex: 2;" id="engine_name">
<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}}
<select class="ui dropdown width" id="benchmark_child_types_id" style='width: 100%;' name="benchmark_child_types">
</select>

</div>
@@ -110,7 +108,7 @@
</div>

<div class="required unite min_title inline field">
<label>{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_mirror"}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
<label>{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_mirror"}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
<input type="text" list="cloudbrain_image" placeholder="选择镜像" name="image" required autofocus maxlength="254">
<i class="times circle outline icon icons" style="visibility: hidden;" onclick="clearValue()"></i>
<datalist class="ui search" id="cloudbrain_image" style='width:385px;' name="image">
@@ -160,97 +158,19 @@
$('.menu .item')
.tab();

let sever_num = $('#trainjob_work_server_num')
$('.add').click(function(){
sever_num.val(parseInt(sever_num.val())+1)
if(sever_num.val()>=26){
sever_num.val(parseInt(sever_num.val())-1)
}
})
$('.min').click(function(){
sever_num.val(parseInt(sever_num.val())-1)
if(sever_num.val()<=0){
sever_num.val(parseInt(sever_num.val())+1)
$('#benchmark_types_id').change(function(){
var html = "<option value=\"1\">无</option>" ;
if ($(this).val() == '2') {
html = "<option value=\"1\">vehicle reid</option>" ;
html += "<option value=\"2\">image-based person reid</option>" ;
html += "<option value=\"3\">person search</option>" ;
html += "<option value=\"4\">video-based person reid</option>" ;
}
document.getElementById("benchmark_child_types_id").innerHTML=html;
})

$(".dynamic.field").on("click",".trash.icon", function() {
var index = $(this).parent().parent().index()
$(this).parent().parent().remove()
var len = $(".dynamic.field .two.fields").length
$(".dynamic.field .two.fields").each(function(){
var cur_index = $(this).index()
$(this).attr('id', 'para' + cur_index)
})
});

$('.ui.parameter.green.button').click(function(){
var parameters = [];
$('table tr').each(function() {
$(this).find('td:eq(1)').each(function(){
parameters.push($(this).text());
})
$(this).find('input').each(function(){
parameters.push($(this).text())
})
});
console.log(parameters)
$('.ui.parameter.modal')
.modal('hide');
for(var i = 2; i < parameters.length; i++){
switch(i) {
// 数据集uuid待完成
// case (2):
// console.log(1)
// break;
// $("#trainjob_datasets").val(parameters[i]);
// console.log($("#trainjob_datasets").val())
case (3):
$("input[name='boot_file']").val(parameters[i]);
break;
case (4):
break;
// 数据集pool_id待完成
// case (5):
// $("select[name='pool_id']").val(parameters[i]);
// break;
case (6):
$("input[name='work_server_number']").val(parameters[i]);
break;
}
}
})

$('.ui.save.checkbox').click(function(){
$(this).checkbox({
onChange: function(){
if ($('.ui.save.checkbox').checkbox('is checked')){
$('#save_para').removeClass("disabled")
}else{
$('#save_para').addClass("disabled")
}
}
});
})

$('.question.circle.icon').hover(function(){
$(this).popup('show')
});

$(".item.active.parameter_config").click(function(){
$('.ui.parameter.modal')
.modal('setting', 'closable', false)
.modal('show');
})

$('.ui.deny.button').click(function(){
$('.ui.parameter.modal')
.modal('hide');
})
$('select.dropdown')
.dropdown();



Loading…
Cancel
Save