|
|
|
@@ -244,7 +244,6 @@ func CloudBrainCreate(ctx *context.Context, form auth.CreateCloudBrainForm) { |
|
|
|
ctx.RenderWithErr(err.Error(), tplCloudBrainNew, &form) |
|
|
|
return |
|
|
|
} |
|
|
|
// ctx.Redirect(setting.AppSubURL + ctx.Repo.RepoLink + "/cloudbrain") |
|
|
|
ctx.Redirect(setting.AppSubURL + ctx.Repo.RepoLink + "/debugjob") |
|
|
|
} |
|
|
|
|
|
|
|
@@ -352,7 +351,6 @@ func CloudBrainCommitImage(ctx *context.Context, form auth.CommitImageCloudBrain |
|
|
|
|
|
|
|
func CloudBrainStop(ctx *context.Context) { |
|
|
|
var jobID = ctx.Params(":jobid") |
|
|
|
debugListType := ctx.Query("debugListType") |
|
|
|
task, err := models.GetCloudbrainByJobID(jobID) |
|
|
|
if err != nil { |
|
|
|
ctx.ServerError("GetCloudbrainByJobID failed", err) |
|
|
|
@@ -378,12 +376,7 @@ func CloudBrainStop(ctx *context.Context) { |
|
|
|
ctx.ServerError("UpdateJob failed", err) |
|
|
|
return |
|
|
|
} |
|
|
|
if debugListType == modelarts.AllResource { |
|
|
|
ctx.Redirect(setting.AppSubURL + ctx.Repo.RepoLink + "/debugjob") |
|
|
|
} else { |
|
|
|
ctx.Redirect(setting.AppSubURL + ctx.Repo.RepoLink + "/cloudbrain") |
|
|
|
} |
|
|
|
|
|
|
|
ctx.Redirect(setting.AppSubURL + ctx.Repo.RepoLink + "/debugjob") |
|
|
|
} |
|
|
|
|
|
|
|
func StopJobsByUserID(userID int64) { |
|
|
|
@@ -468,7 +461,6 @@ func logErrorAndUpdateJobStatus(err error, taskInfo *models.Cloudbrain) { |
|
|
|
|
|
|
|
func CloudBrainDel(ctx *context.Context) { |
|
|
|
var jobID = ctx.Params(":jobid") |
|
|
|
debugListType := ctx.Query("debugListType") |
|
|
|
task, err := models.GetCloudbrainByJobID(jobID) |
|
|
|
if err != nil { |
|
|
|
ctx.ServerError("GetCloudbrainByJobID failed", err) |
|
|
|
@@ -486,11 +478,7 @@ func CloudBrainDel(ctx *context.Context) { |
|
|
|
ctx.ServerError("DeleteJob failed", err) |
|
|
|
return |
|
|
|
} |
|
|
|
if debugListType == modelarts.AllResource { |
|
|
|
ctx.Redirect(setting.AppSubURL + ctx.Repo.RepoLink + "/debugjob") |
|
|
|
} else { |
|
|
|
ctx.Redirect(setting.AppSubURL + ctx.Repo.RepoLink + "/cloudbrain") |
|
|
|
} |
|
|
|
ctx.Redirect(setting.AppSubURL + ctx.Repo.RepoLink + "/debugjob") |
|
|
|
} |
|
|
|
|
|
|
|
func CloudBrainShowModels(ctx *context.Context) { |
|
|
|
|