|
|
@@ -964,11 +964,11 @@ func RegisterRoutes(m *macaron.Macaron) { |
|
|
|
m.Group("/cloudbrain", func() { |
|
|
|
m.Group("/:jobid", func() { |
|
|
|
m.Get("", reqRepoCloudBrainReader, repo.CloudBrainShow) |
|
|
|
m.Get("/debug", reqRepoCloudBrainWriter, repo.CloudBrainDebug) |
|
|
|
m.Get("/debug", cloudbrain.AdminOrJobCreaterRight, repo.CloudBrainDebug) |
|
|
|
m.Post("/commit_image", cloudbrain.AdminOrOwnerOrJobCreaterRight, bindIgnErr(auth.CommitImageCloudBrainForm{}), repo.CloudBrainCommitImage) |
|
|
|
m.Post("/stop", cloudbrain.AdminOrOwnerOrJobCreaterRight, repo.CloudBrainStop) |
|
|
|
m.Post("/del", cloudbrain.AdminOrOwnerOrJobCreaterRight, repo.CloudBrainDel) |
|
|
|
m.Post("/restart", cloudbrain.AdminOrOwnerOrJobCreaterRight, repo.CloudBrainRestart) |
|
|
|
m.Post("/restart", reqRepoCloudBrainWriter, repo.CloudBrainRestart) |
|
|
|
m.Get("/rate", reqRepoCloudBrainReader, repo.GetRate) |
|
|
|
m.Get("/models", reqRepoCloudBrainReader, repo.CloudBrainShowModels) |
|
|
|
m.Get("/download_model", cloudbrain.AdminOrOwnerOrJobCreaterRight, repo.CloudBrainDownloadModel) |
|
|
@@ -1003,8 +1003,8 @@ func RegisterRoutes(m *macaron.Macaron) { |
|
|
|
m.Group("/notebook", func() { |
|
|
|
m.Group("/:jobid", func() { |
|
|
|
m.Get("", reqRepoCloudBrainReader, repo.NotebookShow) |
|
|
|
m.Get("/debug", reqRepoCloudBrainWriter, repo.NotebookDebug) |
|
|
|
m.Post("/:action", cloudbrain.AdminOrOwnerOrJobCreaterRight, repo.NotebookManage) |
|
|
|
m.Get("/debug", cloudbrain.AdminOrJobCreaterRight, repo.NotebookDebug) |
|
|
|
m.Post("/:action", reqRepoCloudBrainWriter, repo.NotebookManage) |
|
|
|
m.Post("/del", cloudbrain.AdminOrOwnerOrJobCreaterRight, repo.NotebookDel) |
|
|
|
}) |
|
|
|
m.Get("/create", reqRepoCloudBrainWriter, repo.NotebookNew) |
|
|
|