|
|
@@ -187,7 +187,10 @@ func CloudBrainCommitImage(ctx *context.Context, form auth.CommitImageCloudBrain |
|
|
|
var jobID = ctx.Params(":jobid") |
|
|
|
task, err := models.GetCloudbrainByJobID(jobID) |
|
|
|
if err != nil { |
|
|
|
ctx.ServerError("GetCloudbrainByJobID failed", err) |
|
|
|
ctx.JSON(200, map[string]string{ |
|
|
|
"result_code": "-1", |
|
|
|
"error_msg": "GetCloudbrainByJobID failed", |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
@@ -199,11 +202,17 @@ func CloudBrainCommitImage(ctx *context.Context, form auth.CommitImageCloudBrain |
|
|
|
}) |
|
|
|
if err != nil { |
|
|
|
log.Error("CommitImage(%s) failed:", task.JobName, err.Error()) |
|
|
|
ctx.ServerError("CommitImage failed", err) |
|
|
|
ctx.JSON(200, map[string]string{ |
|
|
|
"result_code": "-1", |
|
|
|
"error_msg": "CommitImage failed", |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
ctx.Redirect(setting.AppSubURL + ctx.Repo.RepoLink + "/cloudbrain") |
|
|
|
ctx.JSON(200, map[string]string{ |
|
|
|
"result_code": "0", |
|
|
|
"error_msg": "", |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
func CloudBrainStop(ctx *context.Context) { |
|
|
|