From 68ad7800f0378876e28931f51d0b0905eb7b811b Mon Sep 17 00:00:00 2001 From: zouap Date: Mon, 11 Oct 2021 16:06:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- models/models.go | 1 - models/user_business_analysis.go | 5 +++-- public/self/labelTaskPage.js | 6 ++++-- routers/repo/attachment.go | 2 -- routers/repo/user_data_analysis.go | 2 +- templates/repo/datasets/label/index.tmpl | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/models/models.go b/models/models.go index d842c968a..3927dfbf0 100755 --- a/models/models.go +++ b/models/models.go @@ -133,7 +133,6 @@ func init() { new(FileChunk), new(BlockChain), new(RecommendOrg), - new(UserBusinessAnalysis), ) tablesStatistic = append(tablesStatistic, diff --git a/models/user_business_analysis.go b/models/user_business_analysis.go index b7e93fcf3..9da0694a5 100644 --- a/models/user_business_analysis.go +++ b/models/user_business_analysis.go @@ -63,7 +63,7 @@ type UserBusinessAnalysis struct { } func CountData(wikiCountMap map[string]int) { - log.Info("start to count data") + log.Info("start to count other user info data") sess := x.NewSession() defer sess.Close() sess.Select("`user`.*").Table("user") @@ -82,7 +82,6 @@ func CountData(wikiCountMap map[string]int) { end_unix := endTime.Unix() CountDate := time.Date(currentTimeNow.Year(), currentTimeNow.Month(), currentTimeNow.Day(), 0, 1, 0, 0, currentTimeNow.Location()) - //codeMergeCountMap := queryAction(start_unix,end_unix,11) CodeMergeCountMap := queryAction(start_unix, end_unix, 11) CommitCountMap := queryAction(start_unix, end_unix, 5) @@ -96,6 +95,8 @@ func CountData(wikiCountMap map[string]int) { CommitCodeSizeMap, err := GetAllUserKPIStats() if err != nil { log.Info("query commit code errr.") + } else { + log.Info("query commit code size, len=" + fmt.Sprint(len(CommitCodeSizeMap))) } CommitDatasetSizeMap := queryDatasetSize(start_unix, end_unix) SolveIssueCountMap := querySolveIssue(start_unix, end_unix) diff --git a/public/self/labelTaskPage.js b/public/self/labelTaskPage.js index 0e0d802c7..a160c3961 100644 --- a/public/self/labelTaskPage.js +++ b/public/self/labelTaskPage.js @@ -500,7 +500,9 @@ function getTaskSataus(task_status,task_status_desc){ return "关联的数据集已经被删除。" } else if(task_status == 20){ - return "自动标注进行中" + return "自动标注进行中:" + task_status_desc; + }else if(task_status == 21){ + return task_status_desc; } return ""; } @@ -517,7 +519,7 @@ function getVerify(task_status,id,task_type){ } function getLabel(task_status,id,task_type,task_flow_type){ - if(task_status == 0 && (userType == 1 || userType == 0)){ + if((task_status == 0 || task_status == 21) && (userType == 1 || userType == 0)){ return "" + getLabelDesc(task_flow_type) + "标注
"; }else{ return ""; diff --git a/routers/repo/attachment.go b/routers/repo/attachment.go index f71e3520e..a8b2c8fbe 100755 --- a/routers/repo/attachment.go +++ b/routers/repo/attachment.go @@ -146,8 +146,6 @@ func DeleteAttachment(ctx *context.Context) { DeleteAllUnzipFile(attach, "") - TimeingCountData() - _, err = models.DeleteFileChunkById(attach.UUID) if err != nil { ctx.Error(500, fmt.Sprintf("DeleteFileChunkById: %v", err)) diff --git a/routers/repo/user_data_analysis.go b/routers/repo/user_data_analysis.go index 3c9006cc2..13850af7a 100644 --- a/routers/repo/user_data_analysis.go +++ b/routers/repo/user_data_analysis.go @@ -50,6 +50,6 @@ func TimeingCountData() { } } } - + //other user info data models.CountData(wikiMap) } diff --git a/templates/repo/datasets/label/index.tmpl b/templates/repo/datasets/label/index.tmpl index 3e24c0314..262c92905 100644 --- a/templates/repo/datasets/label/index.tmpl +++ b/templates/repo/datasets/label/index.tmpl @@ -47,7 +47,7 @@
- +