0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-26 17:34:11 -05:00
forgejo/routers/api/v1
Gusted 076eaad743
Improve dashboard's repo list performance (#18963)
* Improve dashboard's repo list performance

- Avoid a lot of database lookups for all the repo's, by adding a
undocumented "minimal" mode for this specific task, which returns the
data that's only needed by this list which doesn't require any database
lookups.
- Makes fetching these list faster.
- Less CPU overhead when a user visits home page.

* Refactor javascript code + fix Fork icon

- Use async in the function so we can use `await`.
- Remove `archivedFilter` check for count, as it doesn't make sense to
  show the count of repos when you can't even see them(as they are
  filited away).

* Add `count_only`

* Remove uncessary code

* Improve comment

Co-authored-by: delvh <dev.lh@web.de>

* Update web_src/js/components/DashboardRepoList.js

Co-authored-by: delvh <dev.lh@web.de>

* Update web_src/js/components/DashboardRepoList.js

Co-authored-by: delvh <dev.lh@web.de>

* By default apply minimal mode

* Remove `minimal` paramater

* Refactor count header

* Simplify init

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>

Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
2022-04-26 16:34:30 -04:00
..
admin Add Package Registry (#16510) 2022-03-30 16:42:47 +08:00
misc Remove dependent on session auth for api/v1 routers (#19321) 2022-04-08 06:22:10 +02:00
notify Never use /api/v1 from Gitea UI Pages (#19318) 2022-04-07 20:59:56 +02:00
org Fix panic in team repos API (#19431) 2022-04-20 18:43:26 +08:00
packages Add Helm Chart registry (#19406) 2022-04-19 12:55:35 -04:00
repo Improve dashboard's repo list performance (#18963) 2022-04-26 16:34:30 -04:00
settings Make mirror feature more configurable (#16957) 2021-09-07 17:49:36 +02:00
swagger Add Package Registry (#16510) 2022-03-30 16:42:47 +08:00
user Fix DELETE request for non-existent public key (#19443) 2022-04-21 03:08:30 +02:00
utils Never use /api/v1 from Gitea UI Pages (#19318) 2022-04-07 20:59:56 +02:00
api.go RepoAssignment ensure to close before overwrite (#19449) 2022-04-21 17:17:57 +02:00
auth.go Let web and API routes have different auth methods group (#19168) 2022-03-28 12:46:28 +08:00
auth_windows.go Let web and API routes have different auth methods group (#19168) 2022-03-28 12:46:28 +08:00