Commit Graph

3455 Commits

Author SHA1 Message Date
Kushal Pandya 3ea8d17e87 ESLint: remove extra indentation 2016-12-21 13:16:17 +05:30
Kushal Pandya 394d0fd3c8 ESLint: Clean up nested if blocks 2016-12-21 13:16:17 +05:30
Kushal Pandya f1f45d4a6f Improve isInViewport impl, autoscroll behavior
- Improve isInViewport impementation to be robust.
- Autoscroll is now a status indicator instead of toggle button
- Scrolling build log enables autoscroll itself when scrolled to bottom.
2016-12-21 13:16:17 +05:30
Kushal Pandya 071745141d Enable build log autoscroll when page scrolls to bottom 2016-12-21 13:16:17 +05:30
Alfredo Sumaran 528c3e2b8d Merge branch 'remove-u2f-error-logging' into 'master'
Display error code for U2F errors

See merge request !7305
2016-12-21 07:24:33 +00:00
Grzegorz Bizon 92a91a8803 Merge branch '19703-direct-link-pipelines' into 'master'
Resolve "Direct link from pipeline list to builds"

## What does this MR do?
- Adds a dropdown with builds in the mini pipeline graph in the pipelines table
- Unnest a lot of CSS related with pipelines in order to make it reusable

## Screenshots
![Screen_Shot_2016-12-15_at_14.45.41](/uploads/ca1c61842a422a34383e029d668034b7/Screen_Shot_2016-12-15_at_14.45.41.png)
![Screen_Shot_2016-12-15_at_14.45.49](/uploads/952e3277143639ce4ad111103034faeb/Screen_Shot_2016-12-15_at_14.45.49.png)
![Screen_Shot_2016-12-15_at_14.46.02](/uploads/f7369a124b1c3c0db4194de2cb637ef0/Screen_Shot_2016-12-15_at_14.46.02.png)

![graph_animation](/uploads/9bae036cb5acff499f992a4722943d72/graph_animation.gif)

## Does this MR meet the acceptance criteria?

- [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [x] Added for this feature/bug
  - [ ] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?
Closes #25071 
Closes  #19703 

See merge request !8097
2016-12-20 21:21:52 +00:00
Filipa Lacerda 3ef1e76659 Fix broken test
Changes after review
2016-12-20 14:04:19 +00:00
Filipa Lacerda dd5965a15a Remove console.log 2016-12-20 11:14:46 +00:00
Filipa Lacerda 11040589c8 Adds tests for the MiniPipelineGraph class 2016-12-20 11:10:20 +00:00
Kamil Trzciński 7607226026 Merge branch '22864-kubernetes-deploy-with-terminal' into 'master'
Add online terminal support for Kubernetes

## What does this MR do?

Gives terminal access to kubernetes-deployed environments  via the deployment service

## Are there points in the code the reviewer needs to double check?

## Why was this MR needed?

Part of idea to production

## Screenshots (if relevant)

### `/root/reviewing/environments`

![Screen_Shot_2016-12-15_at_19.10.40](/uploads/bd2c54c07b6c85dec3328a20cd185b64/Screen_Shot_2016-12-15_at_19.10.40.png)

### `/root/reviewing/environments/10013`

![Screen_Shot_2016-12-19_at_12.52.39](/uploads/db4e4e06cda88437e8727433d65898b9/Screen_Shot_2016-12-19_at_12.52.39.png)

### `/root/reviewing/enviroments/10013/terminal`

![Screen_Shot_2016-12-15_at_02.35.52](/uploads/1bb77b7e2de2c657ae3bda62dc4f0970/Screen_Shot_2016-12-15_at_02.35.52.png)

## Does this MR meet the acceptance criteria?

- [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added
- [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- Tests
  - [X] Added for this feature/bug
  - [x] All builds are passing
- [X] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [X] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

* Closes #22864 #22958
* Alternative to, and somewhat based on,  !6770 
* Depends on https://gitlab.com/gitlab-org/gitlab-workhorse/merge_requests/83

See merge request !7690
2016-12-20 10:34:29 +00:00
Filipa Lacerda 1b449ba073 Merge branch 'master' into 19703-direct-link-pipelines
* master: (32 commits)
  Update CHANGELOG.md for 8.13.10
  Update CHANGELOG.md for 8.14.5
  Add Wiki import to BB importer
  Make CI badge hitboxes better match container
  Move admin broadcast messages spinach feature to rspec
  Move Admin Appearance spinach feature to rspec
  Fix MR issue to do with merge user
  Check if selected object is valid before passing to calback
  Fix for missing service when importing from EE to CE
  Fix tests because now we don't convert values
  Spaces for literal hash
  updated spec
  Keep the value type for YAML variables
  Test if expanded_environment_name could expand var
  Fix duplicated build token problem and added relevant spec
  Just implement it in the block
  Move admin labels spinach test to rspec
  Bring back "notification-dropdown" class for styling and use "js-notification-dropdown" for JavaScript
  Fix 500 error for invalid path when visiting blame page
  Add sentence casing, fix groups page buttons, fix dark gray variable
  ...
2016-12-19 23:15:50 +00:00
Filipa Lacerda 34e317d21c Adds loading to improve UX 2016-12-19 22:36:08 +00:00
Fatih Acet 3db5b7033b Add terminal UI and controller actions 2016-12-19 21:27:08 +00:00
Fatih Acet 46533a7d63 Merge branch 'leave-project-btn' into 'master'
Move buttons to project header

Closes #25692    
Before:   
<img src="/uploads/fb65f1ca8021f1669071a3980e5f8258/Screen_Shot_2016-12-14_at_3.52.19_PM.png" width="800px">
After (with Koding setup):   
<img src="/uploads/236e0103186a1b482c4302aa3a4b94b1/Screen_Shot_2016-12-16_at_10.09.53_AM.png" width="800px">
After (without Koding setup):
<img src="/uploads/04bc8360831c98a4c86d3b11ee24826d/Screen_Shot_2016-12-16_at_10.18.35_AM.png" width="800px">


See merge request !8095
2016-12-19 20:38:16 +00:00
Nick Thomas 7c2e16d053 Add xterm.js 2.1.0 and a wrapper class to the asset pipeline 2016-12-19 19:53:03 +00:00
Fatih Acet c5741e57c2 Fix consistent typo in environment.js
environmnets => environments
2016-12-19 19:53:02 +00:00
Filipa Lacerda b1613e5489 Makes API call when stage is clicked 2016-12-19 17:47:45 +00:00
Alfredo Sumaran d80b267731 Check if selected object is valid before passing to calback 2016-12-19 10:50:53 -05:00
Kamil Trzcinski 14d47884df
Merge remote-tracking branch 'origin/master' into dockerfile-templates 2016-12-18 23:39:51 +01:00
Adam Niedzielski e7d019c699 Bring back "notification-dropdown" class for styling and use "js-notification-dropdown" for JavaScript 2016-12-18 21:07:06 +01:00
Sean McGivern 0a6450094e Merge branch 'cleaner-merge-commit-messages' into 'master'
Cleaner merge commit messages

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

See merge request !7722
2016-12-17 02:06:16 +00:00
Fatih Acet 77bfad1f4e Merge branch '18435-autocomplete-is-not-performant' into 'master'
Make autocomplete request performant

## What does this MR do?

Restricts the `autocomplete_sources`action to returning the `json`of one specific `at` type at a time.

Makes sure all commands start by immediately showing the `loading` dropdown.

If the `loading` dropdown is active, we will request and load in the data for that specific `at` type. We manually trigger the filter again. This time, if `loading` dropdown is not active, initiate default filter behaviour and use the correct data template.

Also fixes an issue where `setup` was called multiple times by only setting up and destroying atwho on a focused/blured input.

## Are there points in the code the reviewer needs to double check?

## Why was this MR needed?

`autocomplete_sources` was requested on page load and is large.

## Screenshots (if relevant)

3 requests for 3 different first-time references.

![Screen_Shot_2016-10-14_at_14.43.12](/uploads/0b04eab0d0bf3638d6d6e431036b8089/Screen_Shot_2016-10-14_at_14.43.12.png)

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [x] Added for this feature/bug
  - [x] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

Closes #22802

Closes #18435

See merge request !6856
2016-12-16 20:52:02 +00:00
Filipa Lacerda df6c1b84a8 Prevent enviroment table to overflow when name has underscores
Fix error in linter

Add changelog entry
2016-12-16 12:59:18 +00:00
Gabriel Gizotti 4525cdaec3 add eslint disable prefix for prefer-arrow-callback rule on header of merge_request.js file 2016-12-16 19:15:07 +10:00
Gabriel Gizotti 5d478e5cee add js prefix to classes used to toggle description on commit message in merge request 2016-12-16 19:13:17 +10:00
Gabriel Gizotti 99dd58ec55 Unify commit message listeners in one function 2016-12-16 19:13:17 +10:00
Gabriel Gizotti e97c7100ae move javascript code from _commit_message_container view to javascripts/merge_request.js 2016-12-16 19:13:17 +10:00
Alfredo Sumaran 958a499a7f Fix eslint errors 2016-12-15 18:02:45 -05:00
Fatih Acet b01a830afe Merge branch '24877-bulk-edit-only-keeps-common-labels-when-searching' into 'master'
Improve bulk assignment

This MR improves current implementation of Label dropdown when used for bulk assignment on issuable pages (/:namespace/:project/issues, /:namespace/:project/merge_requests)

Previously this dropdown relied on `<input>` tags to get its active items and also to calculate items with indeterminate state.

Relying on `<input>` tags is not enough when we want to set/get multiple states on a dropdown.

For this case we want to get/set:

- Marked items 
- Unmarked items that were initially marked
- Unmarked items that were initially indeterminate
- Items with indeterminate state.

This MR makes the Label dropdown to save its own state as `data` so it will be easy to get and set whatever state we want no matter if the dropdown is filtering which is the issue that I initially wanted to solve as you can see in the following gif.

**Before** 
![2016-12-07_11.44.48](/uploads/cb697161b8b39cdee72fdbb95a531100/2016-12-07_11.44.48.gif)

**After**
![2016-12-07_11.32.43](/uploads/338255a302de0dd1367474f33232d2a3/2016-12-07_11.32.43.gif)

As you can see in the first gif the `bug` label is removed from the selected issues but the `enhancement` label should set but the `critical` should be kept. This is fixed on the next gif.

Fixes #24877

See merge request !7765
2016-12-15 21:03:33 +00:00
Fatih Acet cd5b06dd51 Merge branch 'gfm-autocomplete-char-in-middle' into 'master'
Fixed GFM autocomplete to disallow non-word characters in string

## What does this MR do?

Disallows GFM autocomplete working when a non-word character is enter in the middle of the string.

## Screenshots (if relevant)

![Screen_Shot_2016-12-12_at_09.47.46](/uploads/aa6463a57b97c103c69eab6bb1d80540/Screen_Shot_2016-12-12_at_09.47.46.png)

## What are the relevant issue numbers?

Closes #25540

See merge request !8035
2016-12-15 17:31:58 +00:00
Fatih Acet b2fdad0a64 Merge branch 'add-object-assign-polyfill' into 'master'
Add Object.assign polyfill

Because PhantomJS

See merge request !8090
2016-12-15 16:53:08 +00:00
Luke Bennett 1356e40f22
Changed autocomplete_sources into an action that returns a single 'at' type of sources at a time
Finished up autocomplete_sources action and added frontend to fetch data only when its needed

Added wait_for_ajax to specs

Fixed builds and improved the setup/destroy lifecycle

Changed global namespace and DRYed up loading logic

Added safety for accidentally loading data twice

Removed destroy as its not necessary and is messing with click events from a blur race condition

Created AutocompleteSourcesController and updated routes

Fixed @undefined from tabbing before load ends

Disable tabSelectsMatch until we have loaded data

Review changes
2016-12-15 15:20:33 +00:00
Sean McGivern 4d1f583712 Merge branch 'katex-math' into 'master'
Render math in Asciidoc and Markdown with KaTeX using code blocks

Closes #13690 and #13180

See merge request !8003
2016-12-15 14:11:38 +00:00
Phil Hughes 089dbc7db1 Fixed bug with +1 not autocompleting 2016-12-15 09:31:25 +00:00
Alfredo Sumaran 4e68b88193 Merge branch 'clean-no-undef' into 'master'
Explicitly declare all javascript globals and all eslint rule violations

This merge request takes every single external global variable referenced within a javascript file and explicitly marks it with a `/* global Foo */` comment block at the top of the script.

This also expands all blanket instances of `/* eslint-disable */` with an explicit list of disabled rules.  This is useful because if we need to search for violations of a particular rule we can simply grep the codebase for something like `no-unused-vars` or `semi` and find all of the places where this rule has yet to be fixed.

Lastly, it also removes and resolves any existing `no-undef` eslint violations.  This is useful for catching mistakes like forgetting to declare a variable with `var`/`let`/`const` which can cause hard to find bugs.

## What does this MR do?

1. Looks for generic uses of `/* eslint-disable */` and refactors them into individual rule exceptions.
2. Looks for all occurrences of `/* eslint-disable ... no-undef */` and resolves them by either fixing bugs or declaring globals with `/* global Foo */`.

## Are there points in the code the reviewer needs to double check?

This touches a lot of files, most changes touch nothing other than comment blocks or whitespace.  The exceptions are the following 14 files which required some small bug fixes after removing `no-undef`:

- api.js
- breakpoints.js
- build.js
- commits.js
- diff_notes/components/jump_to_discussion.js.es6
- gfm_auto_complete.js.es6
- gl_dropdown.js
- groups_select.js
- importer_status.js
- namespace_select.js
- notes.js
- preview_markdown.js
- projects_list.js
- single_file_diff.js

## Why was this MR needed?

Removal of ~"technical debt" and some necessary changes to help !7288 

## Screenshots (if relevant)

N/A

## Does this MR meet the acceptance criteria?

- [ ] ~~[Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added~~
- [ ] ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~
- [ ] ~~API support added~~
- Tests
  - [ ] ~~Added for this feature/bug~~
  - [ ] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

N/A

See merge request !8043
2016-12-15 00:52:46 +00:00
Alfredo Sumaran 38e57945e1 Merge branch 'username-exists-root' into 'master'
Username exists check respects the relative root URL

## What does this MR do?

The path for checking if the username exists was hardcoded to as a absolute URL which broke in relative path installs. This fixes that by respecting the relative path.

## What are the relevant issue numbers?

Closes #25548

See merge request !8092
2016-12-14 23:27:05 +00:00
Mike Greiling 47646d85b1 fix eslint violations in Object.assign polyfill 2016-12-14 15:54:33 -06:00
Phil Hughes 886a939b02 Username exists check respects the relative root URL
Closes #25548
2016-12-14 17:01:53 +00:00
Munken 2d170a20dc Render math in Asciidoc and Markdown with KaTeX using code blocks 2016-12-14 16:50:54 +00:00
Alfredo Sumaran f796840fd3 Add Object.assign polyfill 2016-12-14 11:45:45 -05:00
Alfredo Sumaran 8a6b4c1f7a Remove white space between nav items 2016-12-14 10:32:14 -05:00
Alfredo Sumaran 51b2ffaf7e Address feedback 2016-12-14 10:05:00 -05:00
Alfredo Sumaran 262fc28a7d Improve issuable's bulk assignment implementation
This fixes the case when the user wants to add a label. The user has to use the dropdown’s filter input to look for a label and click it in order to see the bug.

Step to reproduce

- Select at least two issues, one label should be present in all issues, other label should be present in at least one.

- On the label dropdown: Deselect label that is present in all issues, look for another issue using the filter input and click it.

- Click on `Update issues`

Before: Unmarked label were kept on selected issues.
Now: Unmarked label is removed from selected issues
2016-12-14 10:05:00 -05:00
Mike Greiling 8e0e902b13 resolve all instances of no-undef eslint rule violations 2016-12-14 02:11:13 -06:00
Mike Greiling 23f5865e18 expand remaining non-explicit eslint-disable blocks and factor out globals when no-undef encountered 2016-12-13 21:07:31 -06:00
Sean McGivern 0139896b37 Merge branch '3478-copy-commit-hash-to-clipboard' into 'master'
Copy commit hash to clipboard

Closes #3478 

See merge request !8020
2016-12-13 12:06:36 +00:00
Fatih Acet f4dde5d564 Merge branch '24949-view-2-up-swipe-onion-skin-controls-for-merge-request-diff-containing-an-image' into 'master'
Add image controls to MR diffs

## What does this MR do?

Instantiates `ImageFile` in `Diff` which is instantiated in `MergeRequestTabs`.

## Are there points in the code the reviewer needs to double check?

## Why was this MR needed?

## Screenshots (if relevant)

![Screen_Shot_2016-12-04_at_11.11.21](/uploads/738c68ad3fa682c1c132421abce7165e/Screen_Shot_2016-12-04_at_11.11.21.png)

## Does this MR meet the acceptance criteria?

- [ ] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [ ] Added for this feature/bug
  - [ ] All builds are passing
- [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?


Closes #24949

See merge request !7919
2016-12-13 12:05:09 +00:00
Alfredo Sumaran 4db62fef53 Merge branch '25286-customer-label-doesn-t-autocomplete-correctly' into 'master'
Correct autocomplete for values with special characters

## What does this MR do?

This adds a check for any special chars in any value passed to the `DefaultOptions.beforeInsert` callback function. If special chars are found and `skipSpecialCharTest` option is `false`, it will wrap the value in quotation marks.

This fixed autocompleting `~customer+` instead of `~"customer+"`.

## Are there points in the code the reviewer needs to double check?

## Why was this MR needed?

## Screenshots (if relevant)

![2016-12-03_10.37.11](/uploads/59159623638939933d23b447692775b8/2016-12-03_10.37.11.gif)

## Does this MR meet the acceptance criteria?

- [ ] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [ ] Added for this feature/bug
  - [ ] All builds are passing
- [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?


Closes #25286, #24961

See merge request !7910
2016-12-12 23:06:24 +00:00
Alfredo Sumaran 0d04db92ef Merge branch '19550-fix-contributer-graph-duplicates' into 'master'
Resolve "contributor emails in contributors graphs is case sensitive"

## What does this MR do?

changes author email to a case insensitive comparison so emails like "Somebody@foo.com" and "somebody@foo.com" are treated as a single author in contribution graphs.

## Are there points in the code the reviewer needs to double check?

should be pretty simple

## Why was this MR needed?

see above description

## Screenshots (if relevant)

#### before:
![before](/uploads/873a073e8d31e1094da6f050ba3e3f51/before.png)

#### after:
![after](/uploads/b9e534755615994f3e58442141c17f86/after.png)


## Does this MR meet the acceptance criteria?

- [ ] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added
- [ ] ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~
- [ ] ~~API support added~~
- Tests
  - [ ] ~~Added for this feature/bug~~
  - [ ] ~~All builds are passing~~
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

Closes #19550

See merge request !8021
2016-12-12 20:13:14 +00:00
victorwu 569645a809 Clean up commit copy to clipboard and make consistent 2016-12-12 13:16:52 -06:00