|
|
|
@@ -332,20 +332,49 @@ |
|
|
|
$('input[name="_csrf"]').val(csrf) |
|
|
|
var modelData; |
|
|
|
|
|
|
|
function inputshapeNotValid(value){ |
|
|
|
if(value == null || value ==""){ |
|
|
|
return true; |
|
|
|
} |
|
|
|
var tmps = value.split(","); |
|
|
|
if(tmps.length ==4){ |
|
|
|
return false; |
|
|
|
}else{ |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
$('#submitId').click(function(){ |
|
|
|
let data={}; |
|
|
|
data['_csrf']=csrf |
|
|
|
data['name']= $('#model_convert_name').val() |
|
|
|
|
|
|
|
if(data['name']==""){ |
|
|
|
$("#task_name").addClass("error") |
|
|
|
return false |
|
|
|
}else{ |
|
|
|
$("#task_name").removeClass("error") |
|
|
|
} |
|
|
|
|
|
|
|
data['desc']= $('#Description').val() |
|
|
|
data['modelId'] = $('#ModelVersion').val() |
|
|
|
data['SrcEngine'] = $('#SrcEngine').val(); |
|
|
|
data['inputshape']= $('#inputshape').val(); |
|
|
|
|
|
|
|
if(inputshapeNotValid(data['inputshape'])){ |
|
|
|
$("#task_name").addClass("error") |
|
|
|
return false |
|
|
|
}else{ |
|
|
|
$("#task_name").removeClass("error") |
|
|
|
} |
|
|
|
|
|
|
|
data['inputdataformat']= $('#inputdataformat').val(); |
|
|
|
data['DestFormat'] = $('#DestFormat').val(); |
|
|
|
data['NetOutputFormat']= $('#NetOutputFormat').val(); |
|
|
|
data['ModelFile'] = $('#ModelFile').val(); |
|
|
|
console.log("name=" + data['name'] + " desc=" + data['desc'] + " modelId=" + data['modelId'] + " SrcEngine=" + data['SrcEngine'] + " ModelFile=" + data['ModelFile']); |
|
|
|
console.log("inputshape=" + data['inputshape'] + " inputdataformat=" + data['inputdataformat'] + " DestFormat=" + data['DestFormat'] + " NetOutputFormat=" + data['NetOutputFormat']); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$.post(`${repolink}/modelmanage/create_model_convert`,data,(result) => { |
|
|
|
console.log("result=" + result); |
|
|
|
$('.ui.modal.second').modal('hide'); |
|
|
|
|