From a447e22d3a9193c416e7467134e8613649c5e8ad Mon Sep 17 00:00:00 2001 From: zouap Date: Thu, 24 Feb 2022 16:55:03 +0800 Subject: [PATCH 01/13] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- templates/repo/cloudbrain/benchmark/new.tmpl | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/repo/cloudbrain/benchmark/new.tmpl b/templates/repo/cloudbrain/benchmark/new.tmpl index 5904ec094..79cf5a4e4 100755 --- a/templates/repo/cloudbrain/benchmark/new.tmpl +++ b/templates/repo/cloudbrain/benchmark/new.tmpl @@ -198,6 +198,7 @@ html += ``; } } + console.log(html); document.getElementById("benchmark_child_types_id").innerHTML=html; }) } From eb7cd59416053c5310cc7d86b7208bf668c058b4 Mon Sep 17 00:00:00 2001 From: zouap Date: Thu, 24 Feb 2022 17:01:24 +0800 Subject: [PATCH 02/13] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- templates/repo/cloudbrain/benchmark/new.tmpl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/repo/cloudbrain/benchmark/new.tmpl b/templates/repo/cloudbrain/benchmark/new.tmpl index 79cf5a4e4..20aebd480 100755 --- a/templates/repo/cloudbrain/benchmark/new.tmpl +++ b/templates/repo/cloudbrain/benchmark/new.tmpl @@ -114,6 +114,7 @@ @@ -199,7 +200,7 @@ } } console.log(html); - document.getElementById("benchmark_child_types_id").innerHTML=html; + //document.getElementById("benchmark_child_types_id").innerHTML=html; }) } From c091afdd1ec51ec9106f6d2b641f5fc73af73a9b Mon Sep 17 00:00:00 2001 From: zouap Date: Thu, 24 Feb 2022 17:03:38 +0800 Subject: [PATCH 03/13] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- templates/repo/cloudbrain/benchmark/new.tmpl | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/repo/cloudbrain/benchmark/new.tmpl b/templates/repo/cloudbrain/benchmark/new.tmpl index 20aebd480..0193eb2ba 100755 --- a/templates/repo/cloudbrain/benchmark/new.tmpl +++ b/templates/repo/cloudbrain/benchmark/new.tmpl @@ -115,6 +115,7 @@ From 77a746acffbb0b546aad219616ac58ff520cd7e2 Mon Sep 17 00:00:00 2001 From: zouap Date: Thu, 24 Feb 2022 17:10:13 +0800 Subject: [PATCH 04/13] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- templates/repo/cloudbrain/benchmark/new.tmpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/repo/cloudbrain/benchmark/new.tmpl b/templates/repo/cloudbrain/benchmark/new.tmpl index 0193eb2ba..c9139519e 100755 --- a/templates/repo/cloudbrain/benchmark/new.tmpl +++ b/templates/repo/cloudbrain/benchmark/new.tmpl @@ -111,7 +111,7 @@
- +
- + - @@ -201,7 +201,7 @@ } } console.log(html); - document.getElementById("benchmark_child_types_id").innerHTML=html; + //document.getElementById("benchmark_child_types_id").innerHTML=html; }) } From 2fb2f834d9f8ccb20a275c04ea22f4c75ac33828 Mon Sep 17 00:00:00 2001 From: zouap Date: Thu, 24 Feb 2022 17:14:55 +0800 Subject: [PATCH 06/13] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- templates/repo/cloudbrain/benchmark/new.tmpl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/repo/cloudbrain/benchmark/new.tmpl b/templates/repo/cloudbrain/benchmark/new.tmpl index e0784ec11..0bf7fd4a6 100755 --- a/templates/repo/cloudbrain/benchmark/new.tmpl +++ b/templates/repo/cloudbrain/benchmark/new.tmpl @@ -110,10 +110,11 @@ {{end}}
+
- From 9d390f4918bc0469552437e1bebaa78bf3b2c8c8 Mon Sep 17 00:00:00 2001 From: zouap Date: Thu, 24 Feb 2022 17:21:14 +0800 Subject: [PATCH 07/13] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- templates/repo/cloudbrain/benchmark/new.tmpl | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/templates/repo/cloudbrain/benchmark/new.tmpl b/templates/repo/cloudbrain/benchmark/new.tmpl index 0bf7fd4a6..6f88717a9 100755 --- a/templates/repo/cloudbrain/benchmark/new.tmpl +++ b/templates/repo/cloudbrain/benchmark/new.tmpl @@ -114,9 +114,7 @@
-
@@ -185,7 +183,7 @@ .tab(); $('#benchmark_types_id').change(function(){ - //setChildType(); + setChildType(); }) function setChildType(){ @@ -201,8 +199,7 @@ html += ``; } } - console.log(html); - //document.getElementById("benchmark_child_types_id").innerHTML=html; + document.getElementById("benchmark_child_types_id").innerHTML=html; }) } From e8614a170c7fbf5d4738f1875957b4e34edfd5c8 Mon Sep 17 00:00:00 2001 From: zouap Date: Thu, 24 Feb 2022 17:22:46 +0800 Subject: [PATCH 08/13] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- templates/repo/cloudbrain/benchmark/new.tmpl | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/repo/cloudbrain/benchmark/new.tmpl b/templates/repo/cloudbrain/benchmark/new.tmpl index 6f88717a9..5904ec094 100755 --- a/templates/repo/cloudbrain/benchmark/new.tmpl +++ b/templates/repo/cloudbrain/benchmark/new.tmpl @@ -110,7 +110,6 @@ {{end}} -
From f61ab3bb2bc8b9e171fe787134de8402681f2c24 Mon Sep 17 00:00:00 2001 From: chenyifan01 Date: Fri, 25 Feb 2022 16:13:53 +0800 Subject: [PATCH 09/13] fix bug --- routers/routes/routes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/routes/routes.go b/routers/routes/routes.go index 9dc69828c..a8db1062c 100755 --- a/routers/routes/routes.go +++ b/routers/routes/routes.go @@ -1060,7 +1060,7 @@ func RegisterRoutes(m *macaron.Macaron) { */ m.Group("/:jobid", func() { m.Get("", reqRepoCloudBrainReader, repo.NotebookShow) - m.Get("/debug", cloudbrain.AdminOrJobCreaterRight, repo.NotebookDebug2) + m.Get("/debug", reqWechatBind, cloudbrain.AdminOrJobCreaterRight, repo.NotebookDebug2) m.Post("/:action", reqRepoCloudBrainWriter, repo.NotebookManage) m.Post("/del", cloudbrain.AdminOrOwnerOrJobCreaterRight, repo.NotebookDel) }) From 01df0f4241c982bdee2a43771d4e33a10f1243ba Mon Sep 17 00:00:00 2001 From: chenyifan01 Date: Fri, 25 Feb 2022 16:16:16 +0800 Subject: [PATCH 10/13] fix bug --- routers/routes/routes.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routers/routes/routes.go b/routers/routes/routes.go index a8db1062c..7fa06fa3b 100755 --- a/routers/routes/routes.go +++ b/routers/routes/routes.go @@ -993,7 +993,7 @@ func RegisterRoutes(m *macaron.Macaron) { m.Get("", reqRepoCloudBrainReader, repo.CloudBrainShow) }) m.Group("/:jobid", func() { - m.Get("/debug", reqWechatBind, cloudbrain.AdminOrJobCreaterRight, repo.CloudBrainDebug) + m.Get("/debug", cloudbrain.AdminOrJobCreaterRight, repo.CloudBrainDebug) 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) @@ -1060,7 +1060,7 @@ func RegisterRoutes(m *macaron.Macaron) { */ m.Group("/:jobid", func() { m.Get("", reqRepoCloudBrainReader, repo.NotebookShow) - m.Get("/debug", reqWechatBind, cloudbrain.AdminOrJobCreaterRight, repo.NotebookDebug2) + m.Get("/debug", cloudbrain.AdminOrJobCreaterRight, repo.NotebookDebug2) m.Post("/:action", reqRepoCloudBrainWriter, repo.NotebookManage) m.Post("/del", cloudbrain.AdminOrOwnerOrJobCreaterRight, repo.NotebookDel) }) From 04a32dc0a9adb8243ce4c971b6ee09156106dff5 Mon Sep 17 00:00:00 2001 From: zouap Date: Fri, 25 Feb 2022 16:22:45 +0800 Subject: [PATCH 11/13] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E4=B8=AD=E6=9A=82=E6=97=B6=E4=B8=8D=E5=A2=9E=E5=8A=A0=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9B=86=E4=B8=8A=E4=BC=A0=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- services/socketwrap/clientManager.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/socketwrap/clientManager.go b/services/socketwrap/clientManager.go index 3ba35f8ff..98b0e0aa9 100644 --- a/services/socketwrap/clientManager.go +++ b/services/socketwrap/clientManager.go @@ -10,7 +10,7 @@ import ( "github.com/elliotchance/orderedmap" ) -var opTypes = []int{1, 2, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 22, 23, 24, 25, 26, 27, 28, 29, 30} +var opTypes = []int{1, 2, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 22, 23, 25, 26, 27, 28, 29, 30} type ClientsManager struct { Clients *orderedmap.OrderedMap From f006d0957224f88ee9e176dd5a4595b97a19bbf9 Mon Sep 17 00:00:00 2001 From: zouap Date: Fri, 25 Feb 2022 16:40:34 +0800 Subject: [PATCH 12/13] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- public/home/home.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/public/home/home.js b/public/home/home.js index 8f7d6a626..06c0546ca 100644 --- a/public/home/home.js +++ b/public/home/home.js @@ -95,9 +95,9 @@ socket.onmessage = function (e) { for(var i = 0; i < messageQueue.length; i++){ var record = messageQueue[i]; - var recordPrefix = getMsg(record); var actionName = getAction(record.OpType,isZh); - + console.log("receive action type=" + record.OpType + " name=" + actionName); + var recordPrefix = getMsg(record); if(record.OpType == "6" || record.OpType == "10" || record.OpType == "12" || record.OpType == "13"){ html += recordPrefix + actionName; html += " " + getIssueText(record) + "" @@ -170,9 +170,15 @@ function getTaskLink(record){ function getMsg(record){ var html =""; html += "
"; - html += " \"\"" + var name = ""; + if(record.ActUser != null){ + name = record.ActUser.Name; + }else{ + console.log("act user is null."); + } + html += " \"\"" html += "
" - html += " " + record.ActUser.Name + "" + html += " " + name + "" return html; } From 19d06a5d109cbf954b2da1c9bce855c6a18dc0e9 Mon Sep 17 00:00:00 2001 From: zouap Date: Fri, 25 Feb 2022 16:43:17 +0800 Subject: [PATCH 13/13] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- public/home/home.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/home/home.js b/public/home/home.js index 06c0546ca..78b9d517c 100644 --- a/public/home/home.js +++ b/public/home/home.js @@ -94,9 +94,11 @@ socket.onmessage = function (e) { var currentTime = new Date().getTime(); for(var i = 0; i < messageQueue.length; i++){ var record = messageQueue[i]; - var actionName = getAction(record.OpType,isZh); - console.log("receive action type=" + record.OpType + " name=" + actionName); + if(record.ActUser == null){ + console.log("receive action type=" + record.OpType + " name=" + actionName + " but user is null."); + continue; + } var recordPrefix = getMsg(record); if(record.OpType == "6" || record.OpType == "10" || record.OpType == "12" || record.OpType == "13"){ html += recordPrefix + actionName;