Commit Graph
9781 Commits
Author SHA1 Message Date
Dmitriy ZaporozhetsandRobert Speicher c956ecd9cc Merge branch 'outdated-discussion-padding' into 'master'
Fix padding of outdated discussion item.

Old:

![Screen_Shot_2015-10-16_at_09.29.17](https://gitlab.com/gitlab-org/gitlab-ce/uploads/d715debebe54d27c2eed7c22843e886c/Screen_Shot_2015-10-16_at_09.29.17.png)

New:

![Screen_Shot_2015-10-16_at_09.29.23](https://gitlab.com/gitlab-org/gitlab-ce/uploads/7c0c033adade92cb16406c027cb4c010/Screen_Shot_2015-10-16_at_09.29.23.png)

It still looks the same when the discussion is expanded.

See merge request !1614
2015-10-17 17:41:58 -04:00
Dmitriy ZaporozhetsandRobert Speicher 73547ae613 Merge branch 'redirect-ci-dash' into 'master'
Temporary bring /ci page page with help information

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

See merge request !1630
2015-10-17 17:40:33 -04:00
Douwe Maan d80a4d3c15 Merge branch 'rs-redactor-filter' into 'master'
Separate rendering of Markdown reference links from redacting those the user doesn't have access to and extracting referenced objects

Related: !1014

See merge request !1090
2015-10-17 13:57:22 +02:00
Robert SpeicherandRobert Speicher f4d3639a0d Merge branch 'filter-label' into 'master'
Allow dashboard and group issues/MRs to be filtered by label

See merge request !1591
2015-10-16 17:31:38 -04:00
Drew BlessingandRobert Speicher e047e13a79 Fix import from SVN link 2015-10-16 17:18:36 -04:00
Dmitriy ZaporozhetsandRobert Speicher 10d64038e3 Merge branch 'improve-typography' into 'master'
Improve typography



See merge request !1622
2015-10-16 16:12:15 -04:00
Dmitriy ZaporozhetsandRobert Speicher 4a3f0f9517 Merge branch 'fix-wiki-padding' into 'master'
Dont put padding on typography but on holder elements instead

Fixes wrong padding of wiki content.

See merge request !1620
2015-10-16 16:11:40 -04:00
Dmitriy ZaporozhetsandRobert Speicher 201d265b47 Merge branch 'compact-select' into 'master'
Make selectbox options more compact

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

See merge request !1619
2015-10-16 16:09:05 -04:00
Dmitriy ZaporozhetsandRobert Speicher d4a20a6aa8 Merge branch 'comment-highlight' into 'master'
Highlight comment based on anchor in URL

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

Fix for #2954 

See merge request !1618
2015-10-16 16:08:49 -04:00
Douwe MaanandRobert Speicher fd2d295b6b Merge branch 'notify-mr-upon-branch-presence-change' into 'master'
Add a system note and update relevant merge requests when a branch is deleted or re-added

If a branch is deleted with an open merge request, amended offline, and then pushed again,
GitLab doesn't bother to update the merge request even though the last commit ID and/or
code may have changed. This MR ensures that each push will update any relevant merge
requests and adds a system note if this happens as well.

The new messages look like:

![image](https://gitlab.com/gitlab-org/gitlab-ce/uploads/6581eea069cd8e485b7fa4187ed4c043/image.png)

Closes #2926 

See merge request !1601
2015-10-16 16:03:48 -04:00
Kamil Trzcinski 0aa6061d6a Implement when syntax in .gitlab-ci.yml 2015-10-15 23:49:39 +02:00
Robert Speicher 3d76390798 Merge branch 'sentences-end-in-periods' into 'master'
Sentences end in periods.

[ci skip]

See merge request !1604
2015-10-15 20:21:10 +00:00
Kamil Trzcinski 567460d16d Added missing comma [ci skip] 2015-10-15 18:11:46 +02:00
Kamil Trzcinski 71d0cfcff6 Make the builds view and warning notice nicer 2015-10-15 17:14:01 +02:00
Dmitriy Zaporozhets 19cfa86aa3 Merge branch 'rs-markdown-typography' into 'master'
Markdown typography CSS fixes

The `!important` flags recently added to the `md-typography`
mixin's `pre` elements were overriding the background and
foreground colors for syntax highlighting.

| Before | After |
|:------:|:-----:|
| ![Screen_Shot_2015-09-25_at_3.32.32_PM](https://gitlab.com/gitlab-org/gitlab-ce/uploads/802163bd9f46864ac89e7be165951f07/Screen_Shot_2015-09-25_at_3.32.32_PM.png) | ![Screen_Shot_2015-09-25_at_3.33.30_PM](https://gitlab.com/gitlab-org/gitlab-ce/uploads/6be72036653378405320085324dff5ad/Screen_Shot_2015-09-25_at_3.33.30_PM.png) |

See merge request !1442
2015-10-15 14:11:13 +00:00
Kamil Trzcinski 0d09b5fefc Fix builds view count indicator 2015-10-15 15:50:40 +02:00
Valery Sizov 62bf2eb862 Merge branch 'fix/improve_reset_service_password_v2' into 'master'
Improve invalidation of stored service password if the endpoint URL is changed (V2)

New version of !1583, using the same failproof logic but this time mirroring the name and behaviour of the change-tracking methods of ActiveModel::Dirty in order to make it clearer and more natural.

Added more tests to clarify the expected behaviour.

This is an alternative to !1594

/cc @vsizov @rspeicher

See merge request !1600
2015-10-15 13:47:37 +00:00
Yorick Peterse 5ce933599c Merge branch 'user-by-login-performance' into 'master'
Improve User.by_login performance

This greatly speeds up the performance of `User.by_login`. I adopted some changes from @haynes in this patch, the credits go to him for coming up with those originally.

Fixes #2341

See merge request !1545
2015-10-15 13:41:17 +00:00
Dmitriy Zaporozhets c0a6836be4 Merge branch 'view-issue-performance' 2015-10-15 14:37:04 +02:00
Douwe Maan d843cbe08d Sentences end in periods. 2015-10-15 13:44:32 +02:00
Douwe Maan 4b28f2d999 Merge branch 'git-archive-golang' into 'master'
Let gitlab-git-http-server handle archive downloads

This change relies on changes in gitlab_git and gitlab-git-http-server.

fixes #2429

See merge request !1548
2015-10-15 11:43:14 +00:00
Kamil Trzciński daccc54d25 Merge branch 'builds-view' into 'master'
Added builds view

![Screen_Shot_2015-10-13_at_19.02.48](https://gitlab.com/gitlab-org/gitlab-ce/uploads/95bb3a7d9d603678fdd077558637045d/Screen_Shot_2015-10-13_at_19.02.48.png)

/cc @dzaporozhets @vsizov 


See merge request !1593
2015-10-15 11:35:57 +00:00
Dmitriy Zaporozhets 524b3db30c Merge branch 'fix-path-with-leading-dot-error' into 'master'
Fix error preventing displaying of commit data for a directory with a leading dot

Directories with leading dots erroneously get rejected by the route controller if git
ref regex is used in constraints. This prevents commit data from being loaded. The regex verification is now done in controller.

Closes https://github.com/gitlabhq/gitlabhq/issues/8763


See merge request !1574
2015-10-15 10:36:24 +00:00
Alex Lossent 98e666ab6a Improve invalidation of stored service password if the endpoint URL is changed
Password can now be specified at the same time as the new URL, and the service
template admin pages now work.
2015-10-15 12:07:59 +02:00
Yorick Peterse bed29940ef Fixed Rubocop styling issues 2015-10-15 12:05:01 +02:00
Yorick Peterse e5925d073e Renamed Note.inc_associations to with_associations 2015-10-15 12:05:01 +02:00
Yorick Peterse f3980e230f Don't use link_to/image_tag where not needed
In these particular instances we can just use HAML tags directly. This
can shave off some time spent loading issue pages, though this depends
on the amount of comments being displayed.

When viewing https://gitlab.com/gitlab-org/gitlab-ce/issues/2164 locally
these changes reduce loading time by about 400 ms in total.
2015-10-15 12:05:01 +02:00
Yorick Peterse 3025b71141 Improve ProjectTeam#max_member_access performance
By comparing objects in Ruby we can greatly improve the performance of
this method. In the worst case (should no data be eager loaded) this
will run the same amount of queries as before, in the best case (when
data _is_ eager loadeD) it requires no queries at all.

The added benchmark used to produce around 273 iterations per second.
With this commit this has been increased to almost 40 000 iterations per
second: a speedup of roughly 145 times.

Combined with eager loading Note associations this results in about 30
queries less when viewing a single issue, this in turn cuts down the
loading time by 30-40%.
2015-10-15 12:05:01 +02:00
Yorick Peterse b5f8161dae Eager load project associations for notes
This ensures that when viewing an issue each note already has the
associated project, project members, group and group members available.
Since this information is requres for every note this results in quite
the reduction of SQL queries being executed.
2015-10-15 12:05:01 +02:00
Yorick Peterse 8237da0d4a Eager load note projects when viewing issues 2015-10-15 12:05:01 +02:00
Yorick Peterse 39fcd445fa Use note.author for issue comment avatars
This removes the need for running a query to find the User object again
based on the supplied Email address.
2015-10-15 12:05:01 +02:00
Yorick Peterse 1554786c6a Eager load various issue/note associations
This ensures we don't end up running N+1 queries for the objects in the
affected collections.
2015-10-15 12:05:01 +02:00
Yorick Peterse ff8f7fb0a1 Re-use User for avatars in link_to_member 2015-10-15 12:05:01 +02:00
Yorick Peterse 9496356367 Re-use User objects for avatar_icon where possible
This removes the need for running an extra SQL query in these cases.
2015-10-15 12:05:01 +02:00
Yorick Peterse 693e63f523 Allow avatar_icon to operate on a User
If the User object is already known before calling this method being
able to re-use said object can save us an extra SQL query.
2015-10-15 12:05:01 +02:00
Yorick Peterse 72f428c7d2 Improve performance of User.by_login
Performance is improved in two steps:

1. On PostgreSQL an expression index is used for checking lower(email)
   and lower(username).
2. The check to determine if we're searching for a username or Email is
   moved to Ruby. Thanks to @haynes for suggesting and writing the
   initial implementation of this.

Moving the check to Ruby makes this method an additional 1.5 times
faster compared to doing the check in the SQL query.

With performance being improved I've now also tweaked the amount of
iterations required by the User.by_login benchmark. This method now runs
between 900 and 1000 iterations per second.
2015-10-15 11:58:25 +02:00
Kamil Trzcinski 9fa209e1d8 Remove unneeded change 2015-10-15 11:51:45 +02:00
Douwe Maan c993481d99 Merge branch 'master' into git-archive-golang 2015-10-15 11:47:36 +02:00
Douwe Maan e2045f5e68 Merge branch 'rs-issues_sentence' into 'master'
Simplify the `issues_sentence` helper



See merge request !1598
2015-10-15 07:27:53 +00:00
Douwe Maan 7ad6852363 Merge branch 'rs-mr-tabs-scroll' into 'master'
Prevent a JS error in MergeRequestTabs

When `window.location.hash` is pointing to a note, e.g. `#note_1234`,
`scrollToElement` would throw an error because a selector such as
`.commits #note_1234` doesn't exist, so `offset()` returned `undefined`.

This error would prevent subsequent calls from running, which caused the
loading spinner to never be hidden.

Now we ensure the selector returns a valid element before trying to
scroll to it.

This is the proper fix for !1553.

See merge request !1597
2015-10-15 07:26:39 +00:00
Robert Speicher 9750de4943 Simplify the issues_sentence helper 2015-10-14 16:30:19 -04:00
Robert Speicher 123669a551 Merge branch 'simplify-cross-references' into 'master'
Simplify code around (cross)-references

See merge request !1568
2015-10-14 20:10:34 +00:00
Robert Speicher d7f2a656f9 Update highlight themes so they always have the correct colors 2015-10-14 15:39:02 -04:00
Robert Speicher 386b13d624 Allow highlight themes to override pre colors 2015-10-14 15:38:19 -04:00
Robert Speicher fc0d92746d Prevent a JS error in MergeRequestTabs
When `window.location.hash` is pointing to a note, e.g. `#note_1234`,
`scrollToElement` would throw an error because a selector such as
`.commits #note_1234` doesn't exist, so `offset()` returned `undefined`.

This error would prevent subsequent calls from running, which caused the
loading spinner to never be hidden.

Now we ensure the selector returns a valid element before trying to
scroll to it.
2015-10-14 15:01:25 -04:00
Kamil Trzciński a3a80eac11 Merge branch 'show_pending_warning' into 'master'
Show warning when build is pending and there are not runners

This change is based on: !1530.

This resolves #2967.



See merge request !1573
2015-10-14 18:57:05 +00:00
Kamil Trzciński 45c0b74dc4 Merge branch 'predefined_build_variables' into 'master'
Add a few predefined variables to CI builds

This adds CI_BUILD_TAG, CI_BUILD_STAGE, CI_BUILD_NAME and CI_BUILD_TRIGGERED to build environment.

This change is based on: !1530 

See merge request !1572
2015-10-14 18:55:59 +00:00
Kamil Trzcinski 0ff8975939 Fix cancel_all specs 2015-10-14 19:59:56 +02:00
Valery Sizov 2fb02f9252 Merge branch 'fix/improve_reset_service_password' into 'master'
Improve invalidation of stored service password if the endpoint URL is changed

A number of issues were found in !1490 and !1558 (triggered by support request 7395)

* It is not possible to set a new URL and a password at the same time (new password is ignored)
* An error occurs on the Service Templates admin pages (prop_updated? was referencing the service's project, which is not defined for templates)
* Passwords are reset on every save in Service Templates admin pages

This should fix these 3 issues by respectively:
* Differentiating a property that has been assigned a new value (regardless of the new value) and a property that has been assigned a new value that is different from the old one
* Providing an alternate implementation to detected updated properties, not relying on the service's project
* Filtering an empty password parameter passed to the Service Templates admin page like on the project service page

See merge request !1583
2015-10-14 16:01:35 +00:00
Valery Sizov 8f584d5f2c Fix: Images cannot show when projects' path was changed 2015-10-14 18:50:35 +03:00