Browse Source

模型转换界面交互。

Signed-off-by: zouap <zouap@pcl.ac.cn>
pull/2480/head
zouap 3 years ago
parent
commit
21d8c047bf
2 changed files with 5 additions and 2 deletions
  1. +4
    -1
      routers/repo/ai_model_manage.go
  2. +1
    -1
      templates/repo/modelmanage/convertIndex.tmpl

+ 4
- 1
routers/repo/ai_model_manage.go View File

@@ -148,7 +148,7 @@ func SaveNewNameModel(ctx *context.Context) {
} }


func SaveModelConvert(ctx *context.Context) { func SaveModelConvert(ctx *context.Context) {
log.Info("save model start.")
log.Info("save model convert start.")
if !ctx.Repo.CanWrite(models.UnitTypeModelManage) { if !ctx.Repo.CanWrite(models.UnitTypeModelManage) {
ctx.JSON(403, ctx.Tr("repo.model_noright")) ctx.JSON(403, ctx.Tr("repo.model_noright"))
return return
@@ -178,6 +178,9 @@ func SaveModelConvert(ctx *context.Context) {
UserId: ctx.User.ID, UserId: ctx.User.ID,
} }
models.SaveModelConvert(modelConvert) models.SaveModelConvert(modelConvert)

ShowModelConvertInfo(ctx)

} }


func SaveModel(ctx *context.Context) { func SaveModel(ctx *context.Context) {


+ 1
- 1
templates/repo/modelmanage/convertIndex.tmpl View File

@@ -93,7 +93,7 @@
<span style="font-size: 12px;" id="duration-{{.ID}}">{{.TrainJobDuration}}</span> <span style="font-size: 12px;" id="duration-{{.ID}}">{{.TrainJobDuration}}</span>
</div> </div>
<div class="one wide column text center padding0"> <div class="one wide column text center padding0">
<a href="{{AppSubUrl}}/{{.UserName}}" title="{{.UserName}}"><img class="ui avatar image" src="{{.RelAvatarLink}}"></a>
<a href="{{AppSubUrl}}/{{.UserName}}" title="{{.UserName}}"><img class="ui avatar image" src="{{.UserRelAvatarLink}}"></a>
</div> </div>
<div class="three wide column text center padding0"> <div class="three wide column text center padding0">
<div class="ui compact buttons" > <div class="ui compact buttons" >


Loading…
Cancel
Save