Signed-off-by: zouap <zouap@pcl.ac.cn>pull/2977/head
@@ -1301,6 +1301,7 @@ modelconvert.taskurlname=Model transformation task | |||||
log_scroll_start=Scroll to top | log_scroll_start=Scroll to top | ||||
log_scroll_end=Scroll to bottom | log_scroll_end=Scroll to bottom | ||||
modelconvert.tasknameempty=Please enter a task name. | modelconvert.tasknameempty=Please enter a task name. | ||||
modelconvert.modelfileempty=Please choose a model file. | |||||
modelconvert.inputshapeerror=Format input error, please input such as: 1,1,32,32, corresponding to the input data format. | modelconvert.inputshapeerror=Format input error, please input such as: 1,1,32,32, corresponding to the input data format. | ||||
modelconvert.manage.create_error1=A model transformation task with the same name already exists. | modelconvert.manage.create_error1=A model transformation task with the same name already exists. | ||||
@@ -1317,6 +1317,7 @@ log_scroll_start=滚动到顶部 | |||||
log_scroll_end=滚动到底部 | log_scroll_end=滚动到底部 | ||||
modelconvert.tasknameempty=请输入任务名称。 | modelconvert.tasknameempty=请输入任务名称。 | ||||
modelconvert.inputshapeerror=格式输入错误,请输入如:1,1,32,32,与输入数据格式对应。 | modelconvert.inputshapeerror=格式输入错误,请输入如:1,1,32,32,与输入数据格式对应。 | ||||
modelconvert.modelfileempty=请选择模型文件。 | |||||
modelconvert.manage.create_error1=相同的名称模型转换任务已经存在。 | modelconvert.manage.create_error1=相同的名称模型转换任务已经存在。 | ||||
modelconvert.manage.create_error2=只能创建一个正在运行的模型转换任务。 | modelconvert.manage.create_error2=只能创建一个正在运行的模型转换任务。 | ||||
@@ -241,7 +241,7 @@ | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="unite min_title inline fields required"> | |||||
<div class="unite min_title inline fields required" id="ModelFile_Div"> | |||||
<div class="three wide field right aligned"> | <div class="three wide field right aligned"> | ||||
<label for="choice_file">{{$.i18n.Tr "repo.model.manage.modelfile"}}</label> | <label for="choice_file">{{$.i18n.Tr "repo.model.manage.modelfile"}}</label> | ||||
</div> | </div> | ||||
@@ -382,7 +382,14 @@ | |||||
data['DestFormat'] = $('#DestFormat').val(); | data['DestFormat'] = $('#DestFormat').val(); | ||||
data['NetOutputFormat']= $('#NetOutputFormat').val(); | data['NetOutputFormat']= $('#NetOutputFormat').val(); | ||||
data['ModelFile'] = $('#ModelFile').val(); | data['ModelFile'] = $('#ModelFile').val(); | ||||
if(data['ModelFile']==""){ | |||||
$('.ui.error.message').text("{{.i18n.Tr "repo.modelconvert.modelfileempty"}}") | |||||
$('.ui.error.message').css('display','block') | |||||
$("#ModelFile_Div").addClass("error") | |||||
return false | |||||
}else{ | |||||
$("#ModelFile_Div").removeClass("error") | |||||
} | |||||
$.post(`${repolink}/modelmanage/create_model_convert`,data,(result) => { | $.post(`${repolink}/modelmanage/create_model_convert`,data,(result) => { | ||||
console.log("result=" + result); | console.log("result=" + result); | ||||
if(result.result_code ==0){ | if(result.result_code ==0){ | ||||