Commit Graph

101 Commits

Author SHA1 Message Date
bf0331dc72 Resolve "DashboardController#activity.json is slow due to SQL" 2017-11-06 16:52:56 +00:00
aac1de46c9 Use a specialized class for querying events
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.
2017-08-10 17:45:49 +02:00
1e5506d016 Remove some deprecated methods
To avoid the use of slow queries, remove some deprecated methods and encourage
the use of ProjectFinder to find projects.
2017-05-30 23:24:17 +02:00
e45e540d1d Consistently display last push event widget 2017-05-25 15:21:30 -05:00
aeb9db6753 Present group and dashboard MR list without grouping by project 2017-01-27 20:20:18 -02:00
97424ea544 Restrict starred projects to viewable ones
`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.
2016-05-10 18:13:52 +01:00
7dc16346bb Fix an issue causing the Dashboard/Milestones page to be blank 2016-03-23 12:02:15 +01:00
733ae58798 Dedupe labels in labels selector in Dashboard pages
Also moved useless helper methods and directly to the
DashboardController.
2016-03-18 21:49:56 +01:00
0eecc21485 Updated controller with before_action
Fixed other issues based on feedback
2016-03-18 15:18:06 +00:00
d847db79cb Fixes issue on dashboard issues
They would try to load JSON from a project even though it isn't a single project
2016-03-18 15:18:06 +00:00
128a6411d2 Don't pluck project IDs for events
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.
2016-01-26 10:51:53 +01:00
3cebe9e780 Refactor duplciate code for groups_controller.rb and slack_service/note_message.rb
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-17 11:03:18 +01:00
c79d801bf5 Fix a bug when milestone/label filter was empty for dashboard issues page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-16 14:07:38 +01:00
5d785457db Clean up overlap between dashboard and explore.
- 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.
2015-09-08 14:49:20 +01:00
5bbe6c4d54 Split starred projects list and activity in same way like we did with your projects
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-09-02 19:17:04 +02:00
8f68c38746 Dashboard activity as separate page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-08-25 14:13:04 +02:00
003e1d39af projects doesn't seem to be a valid action in this controller 2015-05-16 23:04:45 +10:00
26ad250989 Add a page title to every page. 2015-04-30 19:12:15 +02:00
5a4ebfb47a Fixed the Rails/ActionFilter cop
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-04-20 15:39:37 +02:00
f0cbbd70bb Use same constant for amount of items per page 2015-03-12 15:37:00 -07:00
0414b2ae98 Remove projects page from dashboard 2015-03-10 16:03:37 -07:00
83f7e98d9a Add project filter by visibility and tag to explore page 2015-03-10 15:59:14 -07:00
7fd4dc1e11 Remove group rendering from dashboard page 2015-03-10 13:17:16 -07:00
65105ff3bb Improve projects list
* Add search filtering for group projects
* Show all user projects on dashboard
* Refactor projects list into one view
* Hide big list of projects with 'Show all' button
2015-03-04 17:22:55 -08:00
643afcbe00 Reduce amount of sql queries on dashboard projects page 2015-03-02 14:02:09 -08:00
63f11a68c5 Fix event loading with associations 2015-02-18 09:38:46 -08:00
a8a328b151 DB performance improvements to GitLab 2015-02-18 00:16:42 -08:00
bbca6a0abd Refactor sorting in project 2015-02-05 19:15:05 -08:00
016981c009 Refactor issuable list pages
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-12-24 11:04:33 +02:00
47634e392f Refactor issues and merge requests lists
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-12-23 18:49:39 +02:00
6fb9badcae Replace project labels with tags to prevent name conflict with GitLab labels
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-07-29 18:23:18 +03:00
548f070f0e Show link to public projects for new users. 2014-03-17 13:02:04 +01:00
645e8d4705 Move services for collecting items to Finders
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-02-25 19:15:08 +02:00
0f47367492 Fix mr preload assoc
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-02-25 18:15:11 +02:00
a1b9b1d83f Use rails preload for Dashboard issues, mr
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-02-25 17:42:22 +02:00
2f69213e3f Allow access to groups with public projects.
Fixed Group avatars to only display when user has read
permissions to at least one project in the group.
2014-02-20 09:26:38 -06:00
56f989e53e Fix wrong issues appears at Dashboard#issues page
Filtering service used klass instead of passed items.
Because of this you see list of all issues intead of authorized ones.
This commit fixes it so people see only issues they are authorized to
see.

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-02-10 15:04:52 +02:00
skv
a3f645ef51 Remove deprecated finders 2014-01-19 23:39:56 +04:00
6153aa1360 Use FilteringService for Dashboard, Group pages
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-01-15 16:16:45 +02:00
611c5f1d7c Sort dropdown for Dashboard#projects page
Be default it sorts by name now
Respect filters like scope, label, visibility when do sort or another
filter

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-12-29 12:58:00 +02:00
1e64333c5f Refactor FilterContext
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-12-25 09:45:53 +02:00
5953582b65 Show Assigned/Authored/All filter for dashboard issues and mr pages
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-12-24 14:53:52 +02:00
37383966ef Archiving old projects; archived projects aren't shown on dashboard
features for archive projects
abilities for archived project
other abilities for archive projects

only limit commits and merges for archived projects

ability changed to prohibited actions on archived projects

added spec and feature tests for archive projects

changed search bar not to include archived projects
2013-12-16 14:39:14 +01:00
3b20c89005 Add visibility filter to Dashboard#projects
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-12-05 20:26:21 +02:00
33aea41708 Drop rjs from Infinite scrolling
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-11-28 11:38:20 +02:00
5e843a1769 Explain on dashboard that limit amount of projects displayed 2013-09-26 19:46:31 +03:00
b320884149 List groups on Dashboard#projects page 2013-08-29 21:45:19 +03:00
17af835387 Add event filter for group and project show pages 2013-08-26 16:30:03 +03:00
3b660be6ee REmove duplicating search on dashboard issues/mr 2013-07-12 21:49:03 +03:00
63a67bb4ab Remove second search. More compact list. Additional filter 2013-06-19 17:48:43 +03:00