| @@ -11,6 +11,7 @@ import ( | |||||
| "net/url" | "net/url" | ||||
| "path" | "path" | ||||
| "strings" | "strings" | ||||
| "time" | |||||
| "code.gitea.io/gitea/models" | "code.gitea.io/gitea/models" | ||||
| "code.gitea.io/gitea/modules/cache" | "code.gitea.io/gitea/modules/cache" | ||||
| @@ -517,6 +518,7 @@ func RepoAssignment() macaron.Handler { | |||||
| return | return | ||||
| } | } | ||||
| startTime := time.Now() | |||||
| tags, err := ctx.Repo.GitRepo.GetTags() | tags, err := ctx.Repo.GitRepo.GetTags() | ||||
| if err != nil { | if err != nil { | ||||
| ctx.ServerError("GetTags", err) | ctx.ServerError("GetTags", err) | ||||
| @@ -524,11 +526,17 @@ func RepoAssignment() macaron.Handler { | |||||
| } | } | ||||
| ctx.Data["Tags"] = tags | ctx.Data["Tags"] = tags | ||||
| duration := time.Since(startTime) | |||||
| log.Info("GetTags cost: %v seconds", duration.Seconds()) | |||||
| brs, _, err := ctx.Repo.GitRepo.GetBranches(0, 0) | brs, _, err := ctx.Repo.GitRepo.GetBranches(0, 0) | ||||
| if err != nil { | if err != nil { | ||||
| ctx.ServerError("GetBranches", err) | ctx.ServerError("GetBranches", err) | ||||
| return | return | ||||
| } | } | ||||
| duration = time.Since(startTime) | |||||
| log.Info("GetBranches cost: %v seconds", duration.Seconds()) | |||||
| ctx.Data["Branches"] = brs | ctx.Data["Branches"] = brs | ||||
| ctx.Data["BranchesCount"] = len(brs) | ctx.Data["BranchesCount"] = len(brs) | ||||
| @@ -95,9 +95,7 @@ func (m *MinioStorage) DeleteDir(dir string) error { | |||||
| } | } | ||||
| }() | }() | ||||
| for rErr := range m.client.RemoveObjects(m.bucket, objectsCh) { | |||||
| log.Error("Error detected during deletion: ", rErr) | |||||
| } | |||||
| m.client.RemoveObjects(m.bucket, objectsCh) | |||||
| return nil | return nil | ||||
| } | } | ||||
| @@ -13,6 +13,7 @@ import ( | |||||
| "net/http" | "net/http" | ||||
| "strconv" | "strconv" | ||||
| "strings" | "strings" | ||||
| "time" | |||||
| "code.gitea.io/gitea/models" | "code.gitea.io/gitea/models" | ||||
| "code.gitea.io/gitea/modules/auth" | "code.gitea.io/gitea/modules/auth" | ||||
| @@ -336,6 +337,7 @@ func issues(ctx *context.Context, milestoneID int64, isPullOption util.OptionalB | |||||
| // Issues render issues page | // Issues render issues page | ||||
| func Issues(ctx *context.Context) { | func Issues(ctx *context.Context) { | ||||
| startTime := time.Now() | |||||
| isPullList := ctx.Params(":type") == "pulls" | isPullList := ctx.Params(":type") == "pulls" | ||||
| if isPullList { | if isPullList { | ||||
| MustAllowPulls(ctx) | MustAllowPulls(ctx) | ||||
| @@ -366,6 +368,9 @@ func Issues(ctx *context.Context) { | |||||
| ctx.Data["CanWriteIssuesOrPulls"] = ctx.Repo.CanWriteIssuesOrPulls(isPullList) | ctx.Data["CanWriteIssuesOrPulls"] = ctx.Repo.CanWriteIssuesOrPulls(isPullList) | ||||
| duration := time.Since(startTime) | |||||
| log.Info("Issues cost: %v seconds", duration.Seconds()) | |||||
| ctx.HTML(200, tplIssues) | ctx.HTML(200, tplIssues) | ||||
| } | } | ||||
| @@ -51,7 +51,7 @@ | |||||
| </div> | </div> | ||||
| {{if not .IsBeingCreated}} | {{if not .IsBeingCreated}} | ||||
| <div class="repo-buttons"> | <div class="repo-buttons"> | ||||
| <form method="post" action="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}"> | |||||
| <form method="post" style="margin: 0;" action="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}"> | |||||
| {{$.CsrfTokenHtml}} | {{$.CsrfTokenHtml}} | ||||
| <div class="ui labeled button" tabindex="0"> | <div class="ui labeled button" tabindex="0"> | ||||
| <button type="submit" class="ui compact basic button"> | <button type="submit" class="ui compact basic button"> | ||||
| @@ -62,7 +62,7 @@ | |||||
| </a> | </a> | ||||
| </div> | </div> | ||||
| </form> | </form> | ||||
| <form method="post" action="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star?redirect_to={{$.Link}}"> | |||||
| <form method="post" style="margin: 0;" action="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star?redirect_to={{$.Link}}"> | |||||
| {{$.CsrfTokenHtml}} | {{$.CsrfTokenHtml}} | ||||
| <div class="ui labeled button" tabindex="0"> | <div class="ui labeled button" tabindex="0"> | ||||
| <button type="submit" class="ui compact basic button"> | <button type="submit" class="ui compact basic button"> | ||||
| @@ -181,4 +181,4 @@ | |||||
| </div> | </div> | ||||
| <script src="https://cdn.jsdelivr.net/npm/jquery@3.2.1/dist/jquery.min.js"></script> | |||||
| <script src="{{StaticUrlPrefix}}/js/jquery.js?v={{MD5 AppVer}}"></script> | |||||
| @@ -232,7 +232,7 @@ footer .column{margin-bottom:0!important; padding-bottom:0!important;} | |||||
| .i-bg-used{background-position: -514px -52px;} | .i-bg-used{background-position: -514px -52px;} | ||||
| .icon-bind{background-position: -550px -52px;} | .icon-bind{background-position: -550px -52px;} | ||||
| .icon-unbind{background-position: -568px -52px;} | .icon-unbind{background-position: -568px -52px;} | ||||
| .CREATING, .STOPPING, .DELETING, .STARTING, .WAITING ,.INIT,.KILLING{display:inline-block;background-image:url('/img/loading.gif');background-repeat:no-repeat;width:16px;height:16px;background-size:16px 16px;margin-right:5px;} | |||||
| .CREATING, .STOPPING, .DELETING, .STARTING, i.WAITING ,.INIT,.KILLING{display:inline-block;background-image:url('/img/loading.gif');background-repeat:no-repeat;width:16px;height:16px;background-size:16px 16px;margin-right:5px;} | |||||
| i.COMPLETED,i.SUCCEEDED{display:inline-block;width:18px;height:18px;background:url("/img/icons.svg");background-position: -496px -52px;background-position: -441px -52px;} | i.COMPLETED,i.SUCCEEDED{display:inline-block;width:18px;height:18px;background:url("/img/icons.svg");background-position: -496px -52px;background-position: -441px -52px;} | ||||
| .text_over{ | .text_over{ | ||||