summaryrefslogtreecommitdiffstats
path: root/templates
Commit message (Collapse)AuthorAgeFilesLines
* Fix global packages enabled avaiable (#19276)Lunny Xiao2022-03-312-0/+4
| | | Fix #19275
* Add Goroutine stack inspector to admin/monitor (#19207)zeripath2022-03-314-1/+106
| | | | | | | | | | | | | | | | | | | Continues on from #19202. Following the addition of pprof labels we can now more easily understand the relationship between a goroutine and the requests that spawn them. This PR takes advantage of the labels and adds a few others, then provides a mechanism for the monitoring page to query the pprof goroutine profile. The binary profile that results from this profile is immediately piped in to the google library for parsing this and then stack traces are formed for the goroutines. If the goroutine is within a context or has been created from a goroutine within a process context it will acquire the process description labels for that process. The goroutines are mapped with there associate pids and any that do not have an associated pid are placed in a group at the bottom as unbound. In this way we should be able to more easily examine goroutines that have been stuck. A manager command `gitea manager processes` is also provided that can export the processes (with or without stacktraces) to the command line. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add Package Registry (#16510)KN4CK3R2022-03-3037-0/+1262
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added package store settings. * Added models. * Added generic package registry. * Added tests. * Added NuGet package registry. * Moved service index to api file. * Added NPM package registry. * Added Maven package registry. * Added PyPI package registry. * Summary is deprecated. * Changed npm name. * Sanitize project url. * Allow only scoped packages. * Added user interface. * Changed method name. * Added missing migration file. * Set page info. * Added documentation. * Added documentation links. * Fixed wrong error message. * Lint template files. * Fixed merge errors. * Fixed unit test storage path. * Switch to json module. * Added suggestions. * Added package webhook. * Add package api. * Fixed swagger file. * Fixed enum and comments. * Fixed NuGet pagination. * Print test names. * Added api tests. * Fixed access level. * Fix User unmarshal. * Added RubyGems package registry. * Fix lint. * Implemented io.Writer. * Added support for sha256/sha512 checksum files. * Improved maven-metadata.xml support. * Added support for symbol package uploads. * Added tests. * Added overview docs. * Added npm dependencies and keywords. * Added no-packages information. * Display file size. * Display asset count. * Fixed filter alignment. * Added package icons. * Formatted instructions. * Allow anonymous package downloads. * Fixed comments. * Fixed postgres test. * Moved file. * Moved models to models/packages. * Use correct error response format per client. * Use simpler search form. * Fixed IsProd. * Restructured data model. * Prevent empty filename. * Fix swagger. * Implemented user/org registry. * Implemented UI. * Use GetUserByIDCtx. * Use table for dependencies. * make svg * Added support for unscoped npm packages. * Add support for npm dist tags. * Added tests for npm tags. * Unlink packages if repository gets deleted. * Prevent user/org delete if a packages exist. * Use package unlink in repository service. * Added support for composer packages. * Restructured package docs. * Added missing tests. * Fixed generic content page. * Fixed docs. * Fixed swagger. * Added missing type. * Fixed ambiguous column. * Organize content store by sha256 hash. * Added admin package management. * Added support for sorting. * Add support for multiple identical versions/files. * Added missing repository unlink. * Added file properties. * make fmt * lint * Added Conan package registry. * Updated docs. * Unify package names. * Added swagger enum. * Use longer TEXT column type. * Removed version composite key. * Merged package and container registry. * Removed index. * Use dedicated package router. * Moved files to new location. * Updated docs. * Fixed JOIN order. * Fixed GROUP BY statement. * Fixed GROUP BY #2. * Added symbol server support. * Added more tests. * Set NOT NULL. * Added setting to disable package registries. * Moved auth into service. * refactor * Use ctx everywhere. * Added package cleanup task. * Changed packages path. * Added container registry. * Refactoring * Updated comparison. * Fix swagger. * Fixed table order. * Use token auth for npm routes. * Enabled ReverseProxy auth. * Added packages link for orgs. * Fixed anonymous org access. * Enable copy button for setup instructions. * Merge error * Added suggestions. * Fixed merge. * Handle "generic". * Added link for TODO. * Added suggestions. * Changed temporary buffer filename. * Added suggestions. * Apply suggestions from code review Co-authored-by: Thomas Boerger <thomas@webhippie.de> * Update docs/content/doc/packages/nuget.en-us.md Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Thomas Boerger <thomas@webhippie.de>
* Show messages for users if the ROOT_URL is wrong, show JavaScript errors ↵wxiaoguang2022-03-303-43/+53
| | | | | | | | | | | | | | (#18971) * ROOT_URL issues: some users did wrong to there app.ini config, then: * The assets can not be loaded (AppSubUrl != "" and users try to access http://host:3000/) *The ROOT_URL is wrong, then many URLs in Gitea are broken. Now Gitea show enough information to users. * JavaScript error issues, there are many users affected by JavaScript errors, some are caused by frontend bugs, some are caused by broken customized templates. If these JS errors can be found at first time, then maintainers do not need to ask about how bug occurs again and again. * Some people like to modify the `head.tmpl`, so we separate the script part to `head_script.tmpl`, then it's much safer. * use specialized CSS class "js-global-error", end users still have a chance to hide error messages by customized CSS styles.
* More commit info from API (#19252)John Olheiser2022-03-291-0/+28
| | | | | Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Move project files into models/project sub package (#17704)Lunny Xiao2022-03-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Move project files into models/project sub package * Fix test * Fix test * Fix test * Fix build * Fix test * Fix template bug * Fix bug * Fix lint * Fix test * Fix import * Improve codes Co-authored-by: 6543 <6543@obermui.de>
* Refactor repo clone button and repo clone links, fix JS error on empty repo ↵wxiaoguang2022-03-295-49/+36
| | | | | | | | | | | | | | | | | page (#19208) The last PR about clone buttons introduced an JS error when visiting an empty repo page: * https://github.com/go-gitea/gitea/pull/19028 * `Uncaught ReferenceError: isSSH is not defined`, because the variables are scoped and doesn't share between sub templates. This: 1. Simplify `templates/repo/clone_buttons.tmpl` and make code clear 2. Move most JS code into `initRepoCloneLink` 3. Remove unused `CloneLink.Git` 4. Remove `ctx.Data["DisableSSH"] / ctx.Data["ExposeAnonSSH"] / ctx.Data["DisableHTTP"]`, and only set them when is is needed (eg: deploy keys / ssh keys) 5. Introduce `Data["CloneButton*"]` to provide data for clone buttons and links 6. Introduce `Data["RepoCloneLink"]` for the repo clone link (not the wiki) 7. Remove most `ctx.Data["PageIsWiki"]` because it has been set in the `/wiki` middleware 8. Remove incorrect `quickstart` class in `migrating.tmpl`
* Show last cron messages on monitor page (#19223)zeripath2022-03-292-34/+36
| | | | | | | As discussed on #19221 we should store the results of the last task message on the crontask and show them on the monitor page. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Set the default branch for repositories generated from templates (#19136)Abheek Dhawan2022-03-271-0/+5
| | | | | | | | | | | | * Set the default branch for repositories generated from templates * Allows default branch to be set through the API for repos generated from templates * Update swagger API template * Only set default branch to the one from the template if not specified * Use specified default branch if it exists while generating git commits Fix #19082 Co-authored-by: John Olheiser <john.olheiser@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
* Add `ContextUser` to http request context (#18798)KN4CK3R2022-03-261-33/+33
| | | | | This PR adds a middleware which sets a ContextUser (like GetUserByParams before) in a single place which can be used by other methods. For routes which represent a repo or org the respective middlewares set the field too. Also fix a bug in modules/context/org.go during refactoring.
* Set OpenGraph title to DisplayName in profile pages (#19206)Nulo2022-03-251-1/+1
| | | Co-authored-by: Lauris BH <lauris@nix.lv>
* Try to prevent autolinking of displaynames by email readers (#19169)zeripath2022-03-234-8/+12
| | | | | | | | | | | | | | Unfortunately many email readers will (helpfully) detect url or url-like names and automatically create links to them, even in HTML emails. This is not ideal when usernames can have dots in them. This PR tries to prevent this behaviour by sticking ZWJ characters between dots and also set the meta tag to prevent format detection. Not every email template has been changed in this way - just the activation emails but it may be that we should be setting the above meta tag in all of our emails too. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update HTTP status codes to modern codes (#18063)KN4CK3R2022-03-231-1/+1
| | | | | | * 2xx/3xx/4xx/5xx -> http.Status... * http.StatusFound -> http.StatusTemporaryRedirect * http.StatusMovedPermanently -> http.StatusPermanentRedirect
* Remove the Go version in UI, add a link on Gitea Version to show config ↵wxiaoguang2022-03-231-2/+14
| | | | | | | | | details (Go/Git version) (#19173) This PR mainly helps maintainers to save time from asking the issue reporters to get the correct version. There are so many reporters that have difficulty to get the correct Gitea version. Some of they just report Go version. The Go version doesn't help debug except in very limited circumstances. Instead, there is a new link on the Gitea version, the link is for the admin/config page which shows all version information, including Gitea, Go, Git, it could help more.
* Use the new/choose link for New Issue on project page (#19172)zeripath2022-03-222-3/+3
| | | | | | | | | Extend issues/new/choose to pass the project id and change New Issue link on project page to use new/choose Fix #19170 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Do not send activation email if manual confirm is set (#19119)zeripath2022-03-181-0/+2
| | | | | | | | | | If the mailer is configured then even if Manual confirm is set an activation email is still being sent because `handleUserCreated` is not checking for this case. Fix #17263 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Remove italics for `due_date_not_set` (#19113)MeIchthys2022-03-171-1/+1
| | | To be more consistent with other `repo.issues.x` formatting, we can remove the italics from `dute_date_not_set`.
* RSS/Atom support for Repos (#19055)65432022-03-131-0/+4
| | | | | | | * support for repos * refactor * advertise the feeds via meta tags * allow feed suffix and feed header * optimize performance
* Prevent 500 when there is an error during new auth source post (#19041)zeripath2022-03-102-3/+3
| | | | | Fix #19036 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Ensure isSSH is set whenever DISABLE_HTTP_GIT is set (#19028)wxiaoguang2022-03-091-12/+19
| | | When DISABLE_HTTP_GIT is set we should always show the SSH button
* Add button for issue deletion (#19032)Otto Richter (fnetX)2022-03-091-0/+21
| | | | Co-authored-by: Norwin <noerw@users.noreply.github.com> Co-authored-by: 6543 <6543@obermui.de>
* Feature: show issue assignee on project board (#15232)Roger Luo2022-03-091-6/+17
| | | | * Show assignees in project boards.
* Set `rel="nofollow noindex"` on new issue links (#19023)zeripath2022-03-071-1/+1
| | | | | Fix #19018 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix update hint bug (#18996)Lunny Xiao2022-03-041-1/+1
|
* Add config option to disable "Update branch by rebase" (#18745)Jimmy Praet2022-03-042-0/+11
|
* Fix lfs management setting (#18946)Lunny Xiao2022-03-011-4/+4
| | | Fix #18782
* [API] Allow removing issues (#18879)Otto Richter (fnetX)2022-03-011-0/+42
| | | | | | | | Add new feature to delete issues and pulls via API Co-authored-by: fnetx <git@fralix.ovh> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Gusted <williamzijl7@hotmail.com> Co-authored-by: 6543 <6543@obermui.de>
* Fix `<strong>` html in translation (#18929)Gusted2022-02-271-2/+2
|
* Fix team management UI (#18886)Lunny Xiao2022-02-252-3/+3
| | | Co-authored-by: 6543 <6543@obermui.de>
* Update assignees check to include any writing team and change org sidebar ↵zeripath2022-02-231-22/+46
| | | | | | | | | | | | (#18680) Following the merging of #17811 teams can now have differing write and readonly permissions, however the assignee list will not include teams which have mixed perms. Further the org sidebar is no longer helpful as it can't describe these mixed permissions situations. Fix #18572 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix ldap edit bug (#18856)Lunny Xiao2022-02-221-1/+1
| | | Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Show fullname on issue edits and gpg/ssh signing info (#18827)Wim2022-02-201-2/+2
| | | | | Show missing full names when configured to do so Co-authored-by: zeripath <art27@cantab.net>
* Put buttons back in org dashboard (#18817)Lunny Xiao2022-02-191-0/+9
| | | Fix #18523
* Fix template bug of LFS lock (#18784)Lunny Xiao2022-02-161-1/+1
|
* Fix a broken link in `commits_list_small.tmpl` (#18763)wxiaoguang2022-02-141-1/+1
|
* Fix broken cancel button link on patch page (#18718)Lunny Xiao2022-02-141-1/+1
| | | | | | | | | | * Fix broken cacnel button link on patch page * remove treepath="patch" elsewhere too Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net>
* Add number in queue status to monitor page (#18712)zeripath2022-02-122-0/+4
| | | | | | | | | Add number in queue status to the monitor page so that administrators can assess how much work is left to be done in the queues. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix release typo (#18728)Lunny Xiao2022-02-111-1/+1
|
* Display template path of current page in dev mode (#18717)Lunny Xiao2022-02-121-1/+1
| | | | | | | | | | | | * Display template path of current page in dev mode * improve code * Update templates/base/footer_content.tmpl Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: silverwind <me@silverwind.io>
* Separate the details links of commit-statuses in headers (#18661)zeripath2022-02-111-3/+3
|
* Add LDAP group sync to Teams, fixes #1395 (#16299)Sven Seeberg2022-02-112-24/+47
| | | | | | | | | | * Add setting for a JSON that maps LDAP groups to Org Teams. * Add log when removing or adding team members. * Sync is being run on login and periodically. * Existing group filter settings are reused. * Adding and removing team members. * Sync not existing LDAP group. * Login with broken group map JSON.
* Prevent double encoding of branch names in delete branch (#18714)zeripath2022-02-113-4/+4
| | | | | | | | | | | | | | | | | | | | * Prevent double encoding of branch names in delete branch There is a double encoding issue in branch template whereby the branch name ends up double encoded. Fix #18709 Signed-off-by: Andrew Thornton <art27@cantab.net> * and tag name Signed-off-by: Andrew Thornton <art27@cantab.net> * And fix #18704 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix bug for version update hint (#18701)Lunny Xiao2022-02-101-1/+1
| | | Co-authored-by: silverwind <me@silverwind.io>
* Add apply-patch, basic revert and cherry-pick functionality (#17902)zeripath2022-02-096-24/+289
| | | | | | | | | | | | | | | This code adds a simple endpoint to apply patches to repositories and branches on gitea. This is then used along with the conflicting checking code in #18004 to provide a basic implementation of cherry-pick revert. Now because the buttons necessary for cherry-pick and revert have required us to create a dropdown next to the Browse Source button I've also implemented Create Branch and Create Tag operations. Fix #3880 Fix #17986 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Added auto-save whitespace behavior if it changed manually (#15566)Viktor Suprun2022-02-081-2/+2
|
* Refactor i18n, use Locale to provide i18n/translation related functions (#18648)wxiaoguang2022-02-0826-40/+40
| | | | | | | | * remove unnecessary web context data fields, and unify the i18n/translation related functions to `Locale` * in development, show an error if a translation key is missing * remove the unnecessary loops `for _, lang := range translation.AllLangs()` for every request, which improves the performance slightly * use `ctx.Locale.Language()` instead of `ctx.Data["Lang"].(string)` * add more comments about how the Locale/LangType fields are used
* fix commits_list_small.tmpl (#18641)a10121127962022-02-061-2/+2
| | | Signed-off-by: a1012112796 <1012112796@qq.com>
* comments on migrated issues/prs must link to the comment ID (#18630)singuliere2022-02-061-1/+1
| | | | | | Instead of the issue ID which is not a valid anchor. Signed-off-by: singuliere <singuliere@autistici.org>
* Ensure that blob-excerpt links work for wiki (#18587)zeripath2022-02-053-12/+12
| | | | | | | | It appears that the blob-excerpt links do not work on the wiki - likely since their introduction. This PR adds support for the wiki on these links. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add dropdown icon to template loading dropdown (#18564)fnetX (aka fralix)2022-02-031-6/+1
| | | | | | Fixes #15679 and the dupe of it: Fixes #16364. Also removes a comment that links to a gogs forum thread.