|
|
|
@@ -62,10 +62,10 @@ import ( |
|
|
|
"net/http" |
|
|
|
"strings" |
|
|
|
|
|
|
|
"code.gitea.io/gitea/routers/authentication" |
|
|
|
|
|
|
|
"code.gitea.io/gitea/models" |
|
|
|
"code.gitea.io/gitea/modules/auth" |
|
|
|
|
|
|
|
"code.gitea.io/gitea/modules/cloudbrain" |
|
|
|
"code.gitea.io/gitea/modules/context" |
|
|
|
"code.gitea.io/gitea/modules/log" |
|
|
|
"code.gitea.io/gitea/modules/setting" |
|
|
|
@@ -77,6 +77,7 @@ import ( |
|
|
|
"code.gitea.io/gitea/routers/api/v1/repo" |
|
|
|
_ "code.gitea.io/gitea/routers/api/v1/swagger" // for swagger generation |
|
|
|
"code.gitea.io/gitea/routers/api/v1/user" |
|
|
|
"code.gitea.io/gitea/routers/authentication" |
|
|
|
repo_ext "code.gitea.io/gitea/routers/repo" |
|
|
|
|
|
|
|
"gitea.com/macaron/binding" |
|
|
|
@@ -884,7 +885,9 @@ func RegisterRoutes(m *macaron.Macaron) { |
|
|
|
m.Get("/:id/log", repo.CloudbrainGetLog) |
|
|
|
m.Group("/train-job", func() { |
|
|
|
m.Group("/:jobid", func() { |
|
|
|
m.Get("", repo.GetModelArtsTrainJobVersion) |
|
|
|
m.Get("/model_list", repo.CloudBrainModelList) |
|
|
|
m.Post("/stop_version", cloudbrain.AdminOrOwnerOrJobCreaterRightForTrain, repo_ext.CloudBrainStop) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, reqRepoReader(models.UnitTypeCloudBrain)) |
|
|
|
|