|
|
@ -91,6 +91,12 @@ func Graph(ctx *context.Context) { |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
allCommitsCount, err := ctx.Repo.GitRepo.GetAllCommitsCount() |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
ctx.ServerError("GetAllCommitsCount", err) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
page := ctx.QueryInt("page") |
|
|
|
page := ctx.QueryInt("page") |
|
|
|
|
|
|
|
|
|
|
|
graph, err := models.GetCommitGraph(ctx.Repo.GitRepo, page) |
|
|
|
graph, err := models.GetCommitGraph(ctx.Repo.GitRepo, page) |
|
|
@ -105,7 +111,7 @@ func Graph(ctx *context.Context) { |
|
|
|
ctx.Data["CommitCount"] = commitsCount |
|
|
|
ctx.Data["CommitCount"] = commitsCount |
|
|
|
ctx.Data["Branch"] = ctx.Repo.BranchName |
|
|
|
ctx.Data["Branch"] = ctx.Repo.BranchName |
|
|
|
ctx.Data["RequireGitGraph"] = true |
|
|
|
ctx.Data["RequireGitGraph"] = true |
|
|
|
ctx.Data["Page"] = context.NewPagination(int(commitsCount), setting.UI.GraphMaxCommitNum, page, 5) |
|
|
|
ctx.Data["Page"] = context.NewPagination(int(allCommitsCount), setting.UI.GraphMaxCommitNum, page, 5) |
|
|
|
ctx.HTML(200, tplGraph) |
|
|
|
ctx.HTML(200, tplGraph) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|