summaryrefslogtreecommitdiff
path: root/app/controllers/dashboard/projects_controller.rb
Commit message (Collapse)AuthorAgeFilesLines
* Resolve "DashboardController#activity.json is slow due to SQL"Francisco Javier López2017-11-061-0/+2
|
* Eager load namespace owners for project dashboardsdashboards-projects-controllerYorick Peterse2017-09-111-1/+1
| | | | | This solves an N+1 query problem where we'd run multiple queries when getting the namespace owners of the displayed projects.
* Use a specialized class for querying eventsYorick Peterse2017-08-101-3/+5
| | | | | | | | | | | | | | | This changes various controllers to use the new EventCollection class for retrieving events. This class uses a JOIN LATERAL query on PostgreSQL to retrieve queries in a more efficient way, while falling back to a simpler / less efficient query for MySQL. The EventCollection class also includes a limit on the number of events to display to prevent malicious users from cycling through all events, as doing so could put a lot of pressure on the database. JOIN LATERAL is only supported on PostgreSQL starting with version 9.3.0 and as such this optimisation is only used when using PostgreSQL 9.3 or newer.
* Eager load project creators for project dashboardsdashboard-projects-controller-query-performanceYorick Peterse2017-08-071-2/+4
| | | | | This solves an N+1 query problem where for every project we'd query the creator separately just to figure out what avatar to display.
* Enable Style/DotPosition Rubocop :cop:Grzegorz Bizon2017-06-211-4/+4
|
* Refactor atom builder by using xml.atom layoutTieu-Philippe KHIM2017-06-121-1/+1
|
* Consistently display last push event widgetDouwe Maan2017-05-251-2/+1
|
* ProjectsFinder should handle more optionsJacopo2017-04-061-12/+15
| | | | | | | | | | | | | | | | | | | Extended ProjectFinder in order to handle the following options: - current_user - which user use - project_ids_relation: int[] - project ids to use - params: - trending: boolean - non_public: boolean - starred: boolean - sort: string - visibility_level: int - tags: string[] - personal: boolean - search: string - non_archived: boolean GroupProjectsFinder now inherits from ProjectsFinder. Changed the code in order to use the new available options.
* Eager load route for project & namespaceBob Van Landuyt2017-03-161-1/+1
|
* Use preload for Event#target since it's a polymorphic association27395-reduce-group-activity-sql-queriesRémy Coutable2017-02-131-12/+11
| | | | | | Also, don't use limit in subquery, MySQL don't like that. Signed-off-by: Rémy Coutable <remy@rymai.me>
* Remove unnecessary queries for .atom and .json in ↵Oswaldo Ferreira2017-02-031-3/+1
| | | | Dashboard::ProjectsController#index
* Restrict starred projects to viewable onesSean McGivern2016-05-101-1/+1
| | | | | | | | | | | | | | | `User#starred_projects` doesn't perform any visibility checks. This has a couple of problems: 1. It assumes a user can always view all of their starred projects in perpetuity (project not changed to private, access revoked, etc.). 2. It assumes that we'll only ever allow a user to star a project they can view. This is currently the case, but bugs happen. Add `User#viewable_starred_projects` to filter the starred projects by those the user either has explicit access to, or are public or internal. Then use that in all places where we list the user's starred projects.
* Use the configured Kaminari "per page" defaultrs-use-kaminari-defaultRobert Speicher2016-03-191-2/+2
|
* Allow filtered dashboard/explore results to be paged. Fixes #14104fix-filtered-paginationJosh Frye2016-03-091-2/+2
|
* Add option to show archived projects on dahsboardDmitriy Zaporozhets2016-03-041-16/+8
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Revert "Revert "Sort starred projects on dashboard based on last activity by ↵sort-starred-projectsDmitriy Zaporozhets2016-03-031-1/+1
| | | | | | default"" This reverts commit 617bb1096deb1fb5dea66d04b9bbd7da0dfb57ba.
* Revert "Sort starred projects on dashboard based on last activity by default"Dmitriy Zaporozhets2016-03-031-1/+1
| | | | This reverts commit 70d6455284717f938016b1e1b569e0d0dadb11fc.
* Sort starred projects on dashboard based on last activity by defaultDmitriy Zaporozhets2016-03-031-1/+1
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Don't show "Welcome to GitLab" when the search didn't return any projectsRémy Coutable2016-03-021-2/+2
|
* MR feedbackJosh Frye2016-02-091-2/+2
|
* Extract events rendering to own action.Josh Frye2016-02-091-2/+2
|
* Fix double pagingJosh Frye2016-02-051-1/+1
|
* Various filter fixesJosh Frye2016-02-041-3/+11
|
* Paginate + ajax filter dashboard projectsJosh Frye2016-02-041-0/+12
|
* Page project list on dashboardJosh Frye2016-02-041-0/+2
|
* Add sort dropdown to dashboard projects pagedashboard-sort-dropdownDmitriy Zaporozhets2016-02-031-0/+1
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Don't pluck project IDs for eventsYorick Peterse2016-01-261-1/+1
| | | | | By instead using a sub-query we save ourselves the overhead of loading any data into memory only to pass it on to another query.
* Add last push widget to starred projects dashboardDrew Blessing2015-10-011-0/+1
|
* Clean up overlap between dashboard and explore.Douwe Maan2015-09-081-0/+15
| | | | | - Split up SnippetsController into separate dashboard and explore sections. - Use consistent page titles, header titles and sidebars between dashboard and explore sections when signed in or not.
* Add a page title to every page.Douwe Maan2015-04-301-1/+1
|
* Fixed the Rails/ActionFilter copJeroen van Baarsen2015-04-201-1/+1
| | | | Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
* Add starred projects page to dashboardDmitriy Zaporozhets2015-03-091-0/+27