Commit Graph
12811 Commits
Author SHA1 Message Date
James Lopez efde96e9cd started refactored the dynamic rules to be defined in a yml file 2016-04-06 18:12:41 +02:00
James Lopez e05bc61144 fix project snippets json issue 2016-03-14 12:58:01 +01:00
James Lopez ba1fcf3619 added commits and merge request diffs to export 2016-03-14 12:29:46 +01:00
James Lopez 5fbcfab63f Merge branches 'feature/project-export' and 'master' of gitlab.com:gitlab-org/gitlab-ce into feature/project-export 2016-03-14 11:26:34 +01:00
Douwe Maan c07ef544d1 Merge branch 'upcoming' into 'master'
Implements upcoming filter in milstones

![Imgur](http://i.imgur.com/Oc2LZrF.png)

@DouweM @JobV I think this is what you wanted :) Lemme know if it there is something that need changing
Had alot of fun doing it!

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/14102

See merge request !3148
2016-03-13 18:18:15 +00:00
tiagonbotelho d3b7633da4 fixes small issues 2016-03-13 12:19:27 +00:00
Stan Hu 74d7de8196 Revert "Revert "Merge branch 'support-go-subpackages' into 'master' ""
This reverts commit 5a586f364c
2016-03-12 21:05:23 +00:00
tiagonbotelho 0291473b98 fixes issues 2016-03-12 18:08:01 +00:00
tiagonbotelho 7530827eca fixes issues for mr acceptance 2016-03-12 18:08:01 +00:00
tiagonbotelho b9d13c11de implements upcoming filter in milstones 2016-03-12 18:08:01 +00:00
Douwe Maan 5a586f364c Revert "Merge branch 'support-go-subpackages' into 'master' "
This reverts merge request !3191
2016-03-12 17:42:51 +00:00
Douwe Maan 826bc72c12 Merge branch 'support-go-subpackages' into 'master'
Support Golang subpackage fetching

Closes #13805

See merge request !3191
2016-03-12 17:38:08 +00:00
Dmitriy Zaporozhets a3b626bf25 Merge branch 'projects-finder-ee-compatible' into 'master'
Removed User#project_relations

This is to make things more compatible with EE so merging is easier.

cc @dzaporozhets 

See merge request !3192
2016-03-12 16:50:51 +00:00
Stan Hu 2563213ccf Remove existing go_import.html.haml implementation 2016-03-12 07:49:16 -08:00
Yorick Peterse 3b76b73ab1 Removed User#project_relations
GitLab EE adds an extra relation that selects a "project_id" column
instead of an "id" column, making it very hard for this method to be
re-used in EE. Since using User#authorized_groups in
ProjectsFinder#all_groups apparently has no performance impact we can
just use it and keep everything compatible with EE.
2016-03-12 15:44:48 +01:00
Douwe Maan 8ee1c0ffe5 Merge branch 'rs-disallow-blank-line-code' into 'master'
Disallow blank (non-null) values for a Note's `line_code` attribute

It's unclear how these blank values got added, but GitLab.com had a few:

```
irb(main):002:0> Note.where("line_code IS NOT NULL AND line_code = ''").count
=> 439
```

We've added a migration to convert any existing records to use a NULL
value when blank, and updated Note to set blank values to nil before
validation.

See merge request !3118
2016-03-12 14:01:06 +00:00
Douwe Maan 34e8c56236 Merge branch 'fix/token-timing-attack' into 'master'
fix token issue - timing attack

Updates token comparisons to use a secure version instead of `==`

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/13617

See merge request !3062
2016-03-12 12:14:32 +00:00
Douwe Maan 2b9b07891c Merge branch 'nico-de-ceulaer/gitlab-ce-13865-handle-other-emails-for-avatar-lookup'
# Conflicts:
#	app/helpers/application_helper.rb
2016-03-12 13:12:40 +01:00
Jacob Schatz 491d0ae1c3 Merge branch 'fix_responsive_layout_bug' into 'master'
Fix responsive bug top navigation

Hi,

I have found and fixed a minor layout bug (responsive)

This is the situation before the fix:
![before](/uploads/55bf61a64fb49a763c5f8381bf46d390/before.png)

And this is the situation after the fix:
![after](/uploads/33ba091156d404e52c41f134121c59f0/after.png)

See merge request !3190
2016-03-11 22:58:14 +00:00
Robert Speicher 01f6db4f64 Disallow blank (non-null) values for a Note's line_code attribute
It's unclear how these blank values got added, but GitLab.com had a few:

```
irb(main):002:0> Note.where("line_code IS NOT NULL AND line_code = ''").count
=> 439
```

We've added a migration to convert any existing records to use a NULL
value when blank, and updated Note to set blank values to nil before
validation.
2016-03-11 17:46:50 -05:00
Dennis van de Hoef e932a4164f Fix responsive bug top navigation 2016-03-11 22:34:51 +01:00
Yorick PeterseandRobert Speicher 4f3fa519c6 Use a UNION in MergeRequest.in_projects
The OR condition for source_project_id/target_project_id leads to a
query plan that performs rather poorly on PostgreSQL due to the use of
sub-queries. Because Rails offers no easy alternative for this
particular problem we're forced to using a UNION for both conditions.
The resulting query performs much faster than just using an OR.
2016-03-11 15:26:32 -05:00
Yorick PeterseandRobert Speicher ee75c49313 Make Namespace.search case-insensitive
This ensures searching namespaces works exactly the same as searching
for any other resource.
2016-03-11 15:25:24 -05:00
Yorick PeterseandRobert Speicher d7d5937531 Removed arel_table receiver from search methods
We can just use "arel_table" in these cases instead of
"SomeClass.arel_table".
2016-03-11 15:25:23 -05:00
Yorick PeterseandRobert Speicher 9e00a23716 Clean up ProjectsFinder for getting user projects
We don't need the extra layer of nesting of UNION queries here (as
User#authorized_projects already returns a UNION'd query).
2016-03-11 15:25:23 -05:00
Yorick PeterseandRobert Speicher ec349dc1b6 Refactor Gitlab::ProjectSearchResults
Previously this class would be given a project ID which was then used to
retrieve the corresponding Project object. However, in all cases the
Project object was already known as it was used to grab the ID to pass
to ProjectSearchResults. By just passing a Project instead we remove the
need for an extra query as well as the need for some other complexity
in this class.
2016-03-11 15:25:22 -05:00
Yorick PeterseandRobert Speicher 42fde69d39 Refactor Gitlab::SnippetSearchResults
This removes the need for plucking snippet IDs into memory.
2016-03-11 15:25:22 -05:00
Yorick PeterseandRobert Speicher 013542965c Refactor Gitlab::SearchResults
Instead of plucking IDs this class now uses ActiveRecord::Relation
objects. Plucking IDs is problematic as searching for projects can lead
to a huge amount of IDs being loaded into memory only to be used as an
argument for another query (instead of just using a sub-query).
2016-03-11 15:25:22 -05:00
Yorick PeterseandRobert Speicher 2cf7f3f410 Use ILIKE/LIKE for searching milestones 2016-03-11 15:25:22 -05:00
Yorick PeterseandRobert Speicher 87e7c3e132 Use ILIKE/LIKE for Issuable.search and full_search 2016-03-11 15:25:21 -05:00
Yorick PeterseandRobert Speicher 2076bdb62e Use ILIKE/LIKE for searching CI runners 2016-03-11 15:25:21 -05:00
Yorick PeterseandRobert Speicher ce5e831bcf Use ILIKE/LIKE for searching groups 2016-03-11 15:25:21 -05:00
Yorick PeterseandRobert Speicher 800aa29695 Use ILIKE/LIKE for searching users 2016-03-11 15:25:21 -05:00
Yorick PeterseandRobert Speicher 508b6b46fe Use ILIKE/LIKE for searching notes 2016-03-11 15:25:21 -05:00
Yorick PeterseandRobert Speicher 1f5284e5dd Use ILIKE/LIKE for searching snippets
Previously this used a regular LIKE which is case-sensitive on
PostgreSQL. This ensures that for both PostgreSQL and MySQL the
searching is case-insensitive similar to searching for projects.
2016-03-11 15:25:21 -05:00
Yorick PeterseandRobert Speicher db615d0a79 Use ILIKE in Project.search_by_title
Similar to the changes made to Project.search the method
Project.search_by_title now also uses Arel so it can automatically use
ILIKE/LIKE instead of the lower() function.
2016-03-11 15:25:21 -05:00
Yorick PeterseandRobert Speicher 135659a751 Use ILIKE/LIKE + UNION in Project.search
This chance is broken up in two steps:

1. Use ILIKE on PostgreSQL and LIKE on MySQL, instead of using
   "WHERE lower(x) LIKE lower(y)" as ILIKE is significantly faster than
   using lower(). In many cases the use of lower() will force a slow
   sequence scan.

2. Instead of using 1 query that searches both projects and namespaces
   using a JOIN we're using 2 separate queries that are UNION'd
   together. Using a JOIN would force a slow sequence scan, using a
   UNION avoids this.

This method now uses Arel as Arel automatically uses ILIKE on PostgreSQL
and LIKE on MySQL, removing the need to handle this manually.
2016-03-11 15:25:21 -05:00
Robert Speicher ee14ac68a5 Merge branch 'group-activity-separate-tab' into 'master'
Move group activity feed to separate page for consistency with dashboard
and project pages

Fixes #14161. Part of #13480 

See merge request !3157
2016-03-11 19:58:10 +00:00
Jacob Schatz 3ed8a8e52c Merge branch 'search-results-filter-dropdown' into 'master'
Improved search results filter dropdown

## Current

Currently filter dropdowns on search results page can be **very** long and off the page

![Screen_Shot_2016-03-11_at_15.25.24](/uploads/3418b0a6f4f8a0a8bd2441b53502c574/Screen_Shot_2016-03-11_at_15.25.24.png)

## New

Changed over to the new dropdown

![Screen_Shot_2016-03-11_at_15.29.06](/uploads/2d3a4a9b3e50f3e0fc1748a026cd5905/Screen_Shot_2016-03-11_at_15.29.06.png)

See merge request !3183
2016-03-11 17:13:09 +00:00
Phil Hughes 9f8661987d Increased dropdown max height 2016-03-11 16:30:58 +00:00
Jacob Schatz 6968ea32e2 Merge branch 'award-emoji-design-update' into 'master'
Updated UI of award emoji

Closes #13878 

See merge request !3028
2016-03-11 16:06:18 +00:00
James Lopez 66d3f98582 add id to project member user json 2016-03-11 17:06:12 +01:00
Phil Hughes 6c69868cfc Improved search results filter dropdown 2016-03-11 15:29:29 +00:00
Jacob Schatz 29ac9f64ea Merge branch 'fix-issue-toggle-button-mobile' into 'master'
Fixes issue with issue sidebar toggle button not working

Closes #14195

See merge request !3165
2016-03-11 13:09:54 +00:00
Jacob Schatz cec88d81bb Merge branch 'account-settings' into 'master'
Account settings

Closes #13854

![](https://gitlab.com/gitlab-org/gitlab-ce/uploads/4802a7b4f74f17d25a611ed1a2200445/account-settings.png)

See merge request !3039
2016-03-11 13:08:40 +00:00
Jacob Schatz d343c7a159 Merge branch 'comment-discard-button' into 'master'
Added discard button to comment form

Also changed the labels on the buttons to better match the action they are completing.

Closes #8057

See merge request !3085
2016-03-11 13:07:43 +00:00
Dmitriy Zaporozhets 1f08363650 Merge branch 'comment-error' into 'master'
Add error for ajax:error when submitting comments

Fixes #13814
![Screen_Shot_2016-02-25_at_1.54.56_PM](/uploads/d70d706d306079df1b00d70f09affb63/Screen_Shot_2016-02-25_at_1.54.56_PM.png)
cc @dblessing 

See merge request !2976
2016-03-11 13:00:59 +00:00
Jacob Schatz 0c5b92cbd7 Merge branch 'build-scroll-controls-position' into 'master'
Affix the build scroll controls

Closes #4709

See merge request !3109
2016-03-11 11:19:27 +00:00
James Lopez eb2b9e3efc fix project members json to include user 2016-03-11 11:23:59 +01:00
Phil Hughes 6690d8e25b Correctly uses a variable with the text 2016-03-11 10:03:35 +00:00