From 827de27e6d40ef7ba426b1d37928db3a0fc1c264 Mon Sep 17 00:00:00 2001 From: ychao_1983 Date: Mon, 27 Dec 2021 10:51:32 +0800 Subject: [PATCH 01/14] fix-1193 --- routers/routes/routes.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/routers/routes/routes.go b/routers/routes/routes.go index 95931c723..481b0eacb 100755 --- a/routers/routes/routes.go +++ b/routers/routes/routes.go @@ -969,13 +969,13 @@ func RegisterRoutes(m *macaron.Macaron) { m.Group("/:jobid", func() { m.Get("", reqRepoCloudBrainReader, repo.CloudBrainShow) m.Get("/debug", cloudbrain.AdminOrJobCreaterRight, repo.CloudBrainDebug) - m.Post("/commit_image", cloudbrain.AdminOrOwnerOrJobCreaterRight, bindIgnErr(auth.CommitImageCloudBrainForm{}), repo.CloudBrainCommitImage) + m.Post("/commit_image", cloudbrain.AdminOrJobCreaterRight, bindIgnErr(auth.CommitImageCloudBrainForm{}), repo.CloudBrainCommitImage) m.Post("/stop", cloudbrain.AdminOrOwnerOrJobCreaterRight, repo.CloudBrainStop) m.Post("/del", cloudbrain.AdminOrOwnerOrJobCreaterRight, repo.CloudBrainDel) - m.Post("/restart", reqRepoCloudBrainWriter, repo.CloudBrainRestart) + m.Post("/restart", cloudbrain.AdminOrJobCreaterRight, repo.CloudBrainRestart) m.Get("/rate", reqRepoCloudBrainReader, repo.GetRate) m.Get("/models", reqRepoCloudBrainReader, repo.CloudBrainShowModels) - m.Get("/download_model", cloudbrain.AdminOrOwnerOrJobCreaterRight, repo.CloudBrainDownloadModel) + m.Get("/download_model", cloudbrain.AdminOrJobCreaterRight, repo.CloudBrainDownloadModel) }) m.Get("/create", reqRepoCloudBrainWriter, repo.CloudBrainNew) m.Post("/create", reqRepoCloudBrainWriter, bindIgnErr(auth.CreateCloudBrainForm{}), repo.CloudBrainCreate) @@ -1021,7 +1021,7 @@ func RegisterRoutes(m *macaron.Macaron) { m.Get("", reqRepoCloudBrainReader, repo.TrainJobShow) m.Post("/stop", cloudbrain.AdminOrOwnerOrJobCreaterRight, repo.TrainJobStop) m.Post("/del", cloudbrain.AdminOrOwnerOrJobCreaterRight, repo.TrainJobDel) - m.Get("/model_download", cloudbrain.AdminOrOwnerOrJobCreaterRight, repo.ModelDownload) + m.Get("/model_download", cloudbrain.AdminOrJobCreaterRight, repo.ModelDownload) m.Get("/create_version", cloudbrain.AdminOrJobCreaterRight, repo.TrainJobNewVersion) m.Post("/create_version", cloudbrain.AdminOrJobCreaterRight, bindIgnErr(auth.CreateModelArtsTrainJobForm{}), repo.TrainJobCreateVersion) }) From f4ab9207ba4d8d64f1414eed2a31f3acd9712c3e Mon Sep 17 00:00:00 2001 From: lewis <747342561@qq.com> Date: Tue, 28 Dec 2021 11:09:05 +0800 Subject: [PATCH 02/14] return debug list --- routers/repo/modelarts.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/routers/repo/modelarts.go b/routers/repo/modelarts.go index 31b0b196b..801c4a753 100755 --- a/routers/repo/modelarts.go +++ b/routers/repo/modelarts.go @@ -49,12 +49,9 @@ func DebugJobIndex(ctx *context.Context) { page = 1 } debugType := modelarts.DebugType - jobType := string(models.JobTypeDebug) if debugListType == models.GPUResource { debugType = models.TypeCloudBrainOne - jobType = "" - } - if debugListType == models.NPUResource { + } else if debugListType == models.NPUResource { debugType = models.TypeCloudBrainTwo } @@ -65,7 +62,6 @@ func DebugJobIndex(ctx *context.Context) { }, RepoID: repo.ID, Type: debugType, - JobType: jobType, }) if err != nil { ctx.ServerError("Get debugjob faild:", err) From 5bd4272197ba2ff8fe28cb7e062b27d77af895b1 Mon Sep 17 00:00:00 2001 From: wangjr Date: Tue, 28 Dec 2021 11:18:15 +0800 Subject: [PATCH 03/14] #-1217 --- templates/org/select_pro.tmpl | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/templates/org/select_pro.tmpl b/templates/org/select_pro.tmpl index 56af489fd..42a21d398 100755 --- a/templates/org/select_pro.tmpl +++ b/templates/org/select_pro.tmpl @@ -28,6 +28,7 @@ } .descript_height{ color: #101010 !important; + margin: 10px 0; height: 40px !important; word-break:break-all; line-height: 20px; @@ -47,6 +48,7 @@ /deep/ ui.checkbox input[type=checkbox]::after{ border: 1px solid #0366D6 !important; } +
@@ -70,24 +72,27 @@
-
+
{{.Description}}
- -
+ +
{{if .Topics }} -
+
{{range .Topics}} - {{if ne . "" }}
{{.}}
{{end}} - {{end}} + {{if ne . "" }}
{{.}}
{{end}} + {{end}}
{{end}} -
- +
+ + +
+
{{end}} @@ -133,7 +135,7 @@

-
+
+
+ {{if and (ne .Status "WAITING") (ne .JobType "DEBUG") }} + + 评分 + + {{end}} +
From 3d0afdc432d9f57e3e350110a60e934f3e1aab5b Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Tue, 28 Dec 2021 11:38:46 +0800 Subject: [PATCH 05/14] fix issue --- templates/repo/debugjob/index.tmpl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/repo/debugjob/index.tmpl b/templates/repo/debugjob/index.tmpl index 5acc8e2ec..7799c48d2 100755 --- a/templates/repo/debugjob/index.tmpl +++ b/templates/repo/debugjob/index.tmpl @@ -403,8 +403,8 @@ {{end}}
- {{if and (ne .Status "WAITING") (ne .JobType "DEBUG") }} - + {{if and (ne .Status "WAITING") (ne .JobType "DEBUG") (eq .Cloudbrain.Type 0)}} + 评分 {{end}} @@ -488,6 +488,7 @@