|
|
@@ -292,41 +292,41 @@ func getFileName(ctx *context.Context, beginTime time.Time, endTime time.Time, p |
|
|
|
|
|
|
|
func allProjectsPeroidHeader(ctx *context.Context) map[string]string { |
|
|
|
|
|
|
|
return map[string]string{"A1": ctx.Tr("admin.repos.id"), "B1": ctx.Tr("admin.repos.projectName"), "C1": ctx.Tr("repo.owner"), "D1": ctx.Tr("admin.repos.isPrivate"), "E1": ctx.Tr("admin.repos.isFork"), "F1": ctx.Tr("admin.repos.isMirror"), "G1": ctx.Tr("admin.repos.openi"), "H1": ctx.Tr("admin.repos.visit"), "I1": ctx.Tr("admin.repos.download"), "J1": ctx.Tr("admin.repos.pr"), "K1": ctx.Tr("admin.repos.commit"), |
|
|
|
"L1": ctx.Tr("admin.repos.watches"), "M1": ctx.Tr("admin.repos.stars"), "N1": ctx.Tr("admin.repos.forks"), "O1": ctx.Tr("admin.repos.issues"), "P1": ctx.Tr("admin.repos.closedIssues"), "Q1": ctx.Tr("admin.repos.contributor"), "R1": ctx.Tr("admin.repos.create")} |
|
|
|
return map[string]string{"A1": ctx.Tr("admin.repos.id"), "B1": ctx.Tr("admin.repos.projectName"), "C1": ctx.Tr("repo.owner"), "D1": ctx.Tr("admin.repos.isPrivate"), "E1": ctx.Tr("admin.repos.openi"), "F1": ctx.Tr("admin.repos.visit"), "G1": ctx.Tr("admin.repos.download"), "H1": ctx.Tr("admin.repos.pr"), "I1": ctx.Tr("admin.repos.commit"), |
|
|
|
"J1": ctx.Tr("admin.repos.watches"), "K1": ctx.Tr("admin.repos.stars"), "L1": ctx.Tr("admin.repos.forks"), "M1": ctx.Tr("admin.repos.issues"), "N1": ctx.Tr("admin.repos.closedIssues"), "O1": ctx.Tr("admin.repos.contributor"), "P1": ctx.Tr("admin.repos.isFork"), "Q1": ctx.Tr("admin.repos.isMirror"), "R1": ctx.Tr("admin.repos.create")} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
func allProjectsPeroidValues(row int, rs *models.RepoStatistic, ctx *context.Context) map[string]string { |
|
|
|
return map[string]string{getCellName("A", row): strconv.FormatInt(rs.RepoID, 10), getCellName("B", row): rs.DisplayName(), getCellName("C", row): rs.OwnerName, getCellName("D", row): getBoolDisplay(rs.IsPrivate, ctx), getCellName("E", row): getBoolDisplay(rs.IsFork, ctx), getCellName("F", row): getBoolDisplay(rs.IsMirror, ctx), getCellName("G", row): strconv.FormatFloat(rs.RadarTotal, 'f', 2, 64), |
|
|
|
getCellName("H", row): strconv.FormatInt(rs.NumVisits, 10), getCellName("I", row): strconv.FormatInt(rs.NumDownloads, 10), getCellName("J", row): strconv.FormatInt(rs.NumPulls, 10), getCellName("K", row): strconv.FormatInt(rs.NumCommits, 10), |
|
|
|
getCellName("L", row): strconv.FormatInt(rs.NumWatches, 10), getCellName("M", row): strconv.FormatInt(rs.NumStars, 10), getCellName("N", row): strconv.FormatInt(rs.NumForks, 10), getCellName("O", row): strconv.FormatInt(rs.NumIssues, 10), |
|
|
|
getCellName("P", row): strconv.FormatInt(rs.NumClosedIssues, 10), getCellName("Q", row): strconv.FormatInt(rs.NumContributor, 10), getCellName("R", row): time.Unix(int64(rs.RepoCreatedUnix), 0).Format(CREATE_TIME_FORMAT), |
|
|
|
return map[string]string{getCellName("A", row): strconv.FormatInt(rs.RepoID, 10), getCellName("B", row): rs.DisplayName(), getCellName("C", row): rs.OwnerName, getCellName("D", row): getBoolDisplay(rs.IsPrivate, ctx), getCellName("E", row): strconv.FormatFloat(rs.RadarTotal, 'f', 2, 64), |
|
|
|
getCellName("F", row): strconv.FormatInt(rs.NumVisits, 10), getCellName("G", row): strconv.FormatInt(rs.NumDownloads, 10), getCellName("H", row): strconv.FormatInt(rs.NumPulls, 10), getCellName("I", row): strconv.FormatInt(rs.NumCommits, 10), |
|
|
|
getCellName("J", row): strconv.FormatInt(rs.NumWatches, 10), getCellName("K", row): strconv.FormatInt(rs.NumStars, 10), getCellName("L", row): strconv.FormatInt(rs.NumForks, 10), getCellName("M", row): strconv.FormatInt(rs.NumIssues, 10), |
|
|
|
getCellName("N", row): strconv.FormatInt(rs.NumClosedIssues, 10), getCellName("O", row): strconv.FormatInt(rs.NumContributor, 10), getCellName("P", row): getBoolDisplay(rs.IsFork, ctx), getCellName("Q", row): getBoolDisplay(rs.IsMirror, ctx), getCellName("R", row): time.Unix(int64(rs.RepoCreatedUnix), 0).Format(CREATE_TIME_FORMAT), |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
func allProjectsOpenIHeader() map[string]string { |
|
|
|
|
|
|
|
return map[string]string{"A1": "ID", "B1": "项目名称", "C1": "拥有者", "D1": "私有", "E1": "迁移", "F1": "镜像", "G1": "OpenI指数", |
|
|
|
"H1": "影响力", "I1": "成熟度", "J1": "活跃度", "K1": "项目健康度", "L1": "团队健康度", "M1": "项目发展趋势", |
|
|
|
"N1": "关注数", "O1": "点赞数", "P1": "派生数", "Q1": "代码下载量", "R1": "评论数", "S1": "浏览量", "T1": "已解决任务数", "U1": "版本发布数量", "V1": "有效开发年龄", |
|
|
|
"W1": "数据集", "X1": "模型数", "Y1": "百科页面数量", "Z1": "提交数", "AA1": "任务数", "AB1": "PR数", "AC1": "版本发布数量", "AD1": "任务完成比例", "AE1": "贡献者数", "AF1": "关键贡献者数", |
|
|
|
"AG1": "新人增长量", "AH1": "代码规模增长量", "AI1": "任务增长量", "AJ1": "新人增长量", "AK1": "提交增长量", "AL1": "评论增长量", "AM1": "项目创建时间", |
|
|
|
return map[string]string{"A1": "ID", "B1": "项目名称", "C1": "拥有者", "D1": "私有", "E1": "OpenI指数", |
|
|
|
"F1": "影响力", "G1": "成熟度", "H1": "活跃度", "I1": "项目健康度", "J1": "团队健康度", "K1": "项目发展趋势", |
|
|
|
"L1": "关注数", "M1": "点赞数", "N1": "派生数", "O1": "代码下载量", "P1": "评论数", "Q1": "浏览量", "R1": "已解决任务数", "S1": "版本发布数量", "T1": "有效开发年龄", |
|
|
|
"U1": "数据集", "V1": "模型数", "W1": "百科页面数量", "X1": "提交数", "Y1": "任务数", "Z1": "PR数", "AA1": "版本发布数量", "AB1": "任务完成比例", "AC1": "贡献者数", "AD1": "关键贡献者数", |
|
|
|
"AE1": "新人增长量", "AF1": "代码规模增长量", "AG1": "任务增长量", "AH1": "新人增长量", "AI1": "提交增长量", "AJ1": "评论增长量", "AK1": "迁移", "AL1": "镜像", "AM1": "项目创建时间", |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
func allProjectsOpenIValues(row int, rs *models.RepoStatistic, ctx *context.Context) map[string]string { |
|
|
|
|
|
|
|
return map[string]string{getCellName("A", row): strconv.FormatInt(rs.RepoID, 10), getCellName("B", row): rs.DisplayName(), getCellName("C", row): rs.OwnerName, getCellName("D", row): getBoolDisplay(rs.IsPrivate, ctx), getCellName("E", row): getBoolDisplay(rs.IsFork, ctx), getCellName("F", row): getBoolDisplay(rs.IsMirror, ctx), getCellName("G", row): strconv.FormatFloat(rs.RadarTotal, 'f', 2, 64), |
|
|
|
getCellName("H", row): strconv.FormatFloat(rs.Impact, 'f', 2, 64), getCellName("I", row): strconv.FormatFloat(rs.Completeness, 'f', 2, 64), getCellName("J", row): strconv.FormatFloat(rs.Liveness, 'f', 2, 64), getCellName("K", row): strconv.FormatFloat(rs.ProjectHealth, 'f', 2, 64), getCellName("L", row): strconv.FormatFloat(rs.TeamHealth, 'f', 2, 64), getCellName("M", row): strconv.FormatFloat(rs.Growth, 'f', 2, 64), |
|
|
|
getCellName("N", row): strconv.FormatInt(rs.NumWatches, 10), getCellName("O", row): strconv.FormatInt(rs.NumStars, 10), getCellName("P", row): strconv.FormatInt(rs.NumForks, 10), getCellName("Q", row): strconv.FormatInt(rs.NumDownloads, 10), |
|
|
|
return map[string]string{getCellName("A", row): strconv.FormatInt(rs.RepoID, 10), getCellName("B", row): rs.DisplayName(), getCellName("C", row): rs.OwnerName, getCellName("D", row): getBoolDisplay(rs.IsPrivate, ctx), getCellName("E", row): strconv.FormatFloat(rs.RadarTotal, 'f', 2, 64), |
|
|
|
getCellName("F", row): strconv.FormatFloat(rs.Impact, 'f', 2, 64), getCellName("G", row): strconv.FormatFloat(rs.Completeness, 'f', 2, 64), getCellName("H", row): strconv.FormatFloat(rs.Liveness, 'f', 2, 64), getCellName("I", row): strconv.FormatFloat(rs.ProjectHealth, 'f', 2, 64), getCellName("J", row): strconv.FormatFloat(rs.TeamHealth, 'f', 2, 64), getCellName("K", row): strconv.FormatFloat(rs.Growth, 'f', 2, 64), |
|
|
|
getCellName("L", row): strconv.FormatInt(rs.NumWatches, 10), getCellName("M", row): strconv.FormatInt(rs.NumStars, 10), getCellName("N", row): strconv.FormatInt(rs.NumForks, 10), getCellName("O", row): strconv.FormatInt(rs.NumDownloads, 10), |
|
|
|
|
|
|
|
getCellName("R", row): strconv.FormatInt(rs.NumComments, 10), getCellName("S", row): strconv.FormatInt(rs.NumVisits, 10), getCellName("T", row): strconv.FormatInt(rs.NumClosedIssues, 10), getCellName("U", row): strconv.FormatInt(rs.NumVersions, 10), |
|
|
|
getCellName("V", row): strconv.FormatInt(rs.NumDevMonths, 10), getCellName("W", row): strconv.FormatInt(rs.DatasetSize, 10), getCellName("X", row): strconv.FormatInt(rs.NumModels, 10), getCellName("Y", row): strconv.FormatInt(rs.NumWikiViews, 10), |
|
|
|
getCellName("Z", row): strconv.FormatInt(rs.NumCommits, 10), getCellName("AA", row): strconv.FormatInt(rs.NumIssues, 10), getCellName("AB", row): strconv.FormatInt(rs.NumPulls, 10), getCellName("AC", row): strconv.FormatInt(rs.NumVersions, 10), |
|
|
|
getCellName("AD", row): strconv.FormatFloat(float64(rs.IssueFixedRate), 'f', 2, 64), getCellName("AE", row): strconv.FormatInt(rs.NumContributor, 10), getCellName("AF", row): strconv.FormatInt(rs.NumKeyContributor, 10), getCellName("AG", row): strconv.FormatInt(rs.NumContributorsGrowth, 10), |
|
|
|
getCellName("AH", row): strconv.FormatInt(rs.NumCommitLinesGrowth, 10), getCellName("AI", row): strconv.FormatInt(rs.NumIssuesGrowth, 10), getCellName("AJ", row): strconv.FormatInt(rs.NumContributorsGrowth, 10), getCellName("AK", row): strconv.FormatInt(rs.NumCommitsGrowth, 10), getCellName("AL", row): strconv.FormatInt(rs.NumCommentsGrowth, 10), getCellName("AM", row): time.Unix(int64(rs.RepoCreatedUnix), 0).Format(CREATE_TIME_FORMAT), |
|
|
|
getCellName("P", row): strconv.FormatInt(rs.NumComments, 10), getCellName("Q", row): strconv.FormatInt(rs.NumVisits, 10), getCellName("R", row): strconv.FormatInt(rs.NumClosedIssues, 10), getCellName("S", row): strconv.FormatInt(rs.NumVersions, 10), |
|
|
|
getCellName("T", row): strconv.FormatInt(rs.NumDevMonths, 10), getCellName("U", row): strconv.FormatInt(rs.DatasetSize, 10), getCellName("V", row): strconv.FormatInt(rs.NumModels, 10), getCellName("W", row): strconv.FormatInt(rs.NumWikiViews, 10), |
|
|
|
getCellName("X", row): strconv.FormatInt(rs.NumCommits, 10), getCellName("Y", row): strconv.FormatInt(rs.NumIssues, 10), getCellName("Z", row): strconv.FormatInt(rs.NumPulls, 10), getCellName("AA", row): strconv.FormatInt(rs.NumVersions, 10), |
|
|
|
getCellName("AB", row): strconv.FormatFloat(float64(rs.IssueFixedRate), 'f', 2, 64), getCellName("AC", row): strconv.FormatInt(rs.NumContributor, 10), getCellName("AD", row): strconv.FormatInt(rs.NumKeyContributor, 10), getCellName("AE", row): strconv.FormatInt(rs.NumContributorsGrowth, 10), |
|
|
|
getCellName("AF", row): strconv.FormatInt(rs.NumCommitLinesGrowth, 10), getCellName("AG", row): strconv.FormatInt(rs.NumIssuesGrowth, 10), getCellName("AH", row): strconv.FormatInt(rs.NumContributorsGrowth, 10), getCellName("AI", row): strconv.FormatInt(rs.NumCommitsGrowth, 10), getCellName("AJ", row): strconv.FormatInt(rs.NumCommentsGrowth, 10), getCellName("AK", row): getBoolDisplay(rs.IsFork, ctx), getCellName("AL", row): getBoolDisplay(rs.IsMirror, ctx), getCellName("AM", row): time.Unix(int64(rs.RepoCreatedUnix), 0).Format(CREATE_TIME_FORMAT), |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|