|
|
|
@@ -79,13 +79,13 @@ func GetAiSafetyTaskByJob(job *models.Cloudbrain) { |
|
|
|
} |
|
|
|
|
|
|
|
func GetAiSafetyTaskTmpl(ctx *context.Context) { |
|
|
|
ctx.Data["id"] = ctx.Params(":jobid") |
|
|
|
ctx.Data["id"] = ctx.Params(":id") |
|
|
|
ctx.Data["PageIsCloudBrain"] = true |
|
|
|
ctx.HTML(200, tplModelSafetyTestShow) |
|
|
|
} |
|
|
|
|
|
|
|
func GetAiSafetyTask(ctx *context.Context) { |
|
|
|
var ID = ctx.Params(":jobid") |
|
|
|
var ID = ctx.Params(":id") |
|
|
|
job, err := models.GetCloudbrainByIDWithDeleted(ID) |
|
|
|
if err != nil { |
|
|
|
log.Error("GetCloudbrainByJobID failed:" + err.Error()) |
|
|
|
@@ -117,7 +117,7 @@ func GetAiSafetyTask(ctx *context.Context) { |
|
|
|
|
|
|
|
func StopAiSafetyTask(ctx *context.Context) { |
|
|
|
log.Info("start to stop the task.") |
|
|
|
var ID = ctx.Params(":jobid") |
|
|
|
var ID = ctx.Params(":id") |
|
|
|
task, err := models.GetCloudbrainByIDWithDeleted(ID) |
|
|
|
result := make(map[string]interface{}) |
|
|
|
result["result_code"] = "-1" |
|
|
|
@@ -201,7 +201,7 @@ func StopAiSafetyTask(ctx *context.Context) { |
|
|
|
} |
|
|
|
|
|
|
|
func DelAiSafetyTask(ctx *context.Context) { |
|
|
|
var ID = ctx.Params(":jobid") |
|
|
|
var ID = ctx.Params(":id") |
|
|
|
task, err := models.GetCloudbrainByIDWithDeleted(ID) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|