Browse Source

fix bug

tags/v1.21.12.1
liuzx 4 years ago
parent
commit
de20c7491f
2 changed files with 4 additions and 4 deletions
  1. +3
    -3
      routers/repo/modelarts.go
  2. +1
    -1
      templates/repo/modelarts/trainjob/show.tmpl

+ 3
- 3
routers/repo/modelarts.go View File

@@ -1324,12 +1324,12 @@ func canUserCreateTrainJobVersion(ctx *context.Context, userID int64) (bool, err
log.Error("user unlogin!")
return false, nil
}
if userID != ctx.User.ID || !ctx.User.IsAdmin {
if userID == ctx.User.ID || ctx.User.IsAdmin {
return true, nil
} else {
log.Error("Only user itself and admin can new trainjob!")
// ctx.ServerError("Only user itself and admin can new trainjob!", nil)
return false, nil
} else {
return true, nil
}
}



+ 1
- 1
templates/repo/modelarts/trainjob/show.tmpl View File

@@ -715,7 +715,7 @@ td, th {
let scrollHeight = container.scrollHeight
let clientHeight = container.clientHeight
if(scrollTop + clientHeight == scrollHeight && scrollHeight>clientHeight){
if(parseInt(scrollTop) + clientHeight == scrollHeight && scrollHeight>clientHeight){
let end_line = $(`#log${version_name} input[name=end_line]`).val()
$.get(`/api/v1/repos/${userName}/${repoPath}/modelarts/train-job/${jobID}/log?version_name=${version_name}&base_line=${end_line}&lines=50&order=desc`, (data) => {
if (data.Lines == 0){


Loading…
Cancel
Save