Browse Source

模型转换界面交互。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.7.1
zouap 3 years ago
parent
commit
ef1d4b61e8
2 changed files with 7 additions and 19 deletions
  1. +3
    -2
      routers/repo/ai_model_manage.go
  2. +4
    -17
      templates/repo/modelmanage/convertIndex.tmpl

+ 3
- 2
routers/repo/ai_model_manage.go View File

@@ -178,8 +178,9 @@ func SaveModelConvert(ctx *context.Context) {
UserId: ctx.User.ID,
}
models.SaveModelConvert(modelConvert)

ctx.Redirect(setting.AppSubURL + ctx.Repo.RepoLink + "/modelmanage/convert_model")
ctx.JSON(200, map[string]string{
"result_code": "0",
})
}

func SaveModel(ctx *context.Context) {


+ 4
- 17
templates/repo/modelmanage/convertIndex.tmpl View File

@@ -282,25 +282,12 @@
console.log("name=" + data['name'] + " desc=" + data['desc'] + " modelId=" + data['modelId'] + " SrcEngine=" + data['SrcEngine']);
console.log("inputshape=" + data['inputshape'] + " inputdataformat=" + data['inputdataformat'] + " DestFormat=" + data['DestFormat'] + " NetOutputFormat=" + data['NetOutputFormat']);
$('.ui.modal.second').modal('hide');
//$('.ui.form').submit();
/*
let url_href = `${repolink}/modelmanage/create_model_convert`;
$.ajax({
url:url_href,
type:'POST',
data:data,
success:function(res){
console.log("result=" + res);
},
error: function(xhr){
console.log("error=" + xhr);
},
complete:function(xhr){
console.log("completed=" + xhr);
}
})*/
$.post(`${repolink}/modelmanage/create_model_convert`,data,(result) => {
console.log("result=" + result);
if(result.result_code ==0){
window.location.reload();
}
})
})



Loading…
Cancel
Save