Commit Graph

2655 Commits

Author SHA1 Message Date
Jacob Schatz 1bf2fe276f Merge branch 'reduce-contributions-calendar-payload' into 'master'
Reduce contributions calendar data payload

## What does this MR do?
Reduces the contributions calendar data payload by only passing contribution dates and counts

## Are there points in the code the reviewer needs to double check?
Please double check my javascript code 😃 

## Why was this MR needed?

Reduce user's bandwidth and decrease website loading time

## What are the relevant issue numbers?
Closes #20862 

## Screenshots (if relevant)
Before:
![Screen_Shot_2016-08-11_at_3.55.55_PM](/uploads/382842b3c889978bb302bd9057701ec3/Screen_Shot_2016-08-11_at_3.55.55_PM.png)
```
new Calendar(
  {"1439269200":0,"1439355600":0,"1439442000":0,"1439528400":0,"1439614800":0,"1439701200":0,"1439787600":0,"1439874000":0,"1439960400":0,"1440046800":0,"1440133200":0,"1440219600":0,"1440306000":0,"1440392400":0,"1440478800":0,"1440565200":0,"1440651600":0,"1440738000":0,"1440824400":0,"1440910800":0,"1440997200":0,"1441083600":0,"1441170000":0,"1441256400":0,"1441342800":0,"1441429200":0,"1441515600":0,"1441602000":0,"1441688400":0,"1441774800":0,"1441861200":0,"1441947600":0,"1442034000":0,"1442120400":0,"1442206800":0,"1442293200":0,"1442379600":0,"1442466000":0,"1442552400":0,"1442638800":0,"1442725200":0,"1442811600":0,"1442898000":0,"1442984400":0,"1443070800":0,"1443157200":0,"1443243600":0,"1443330000":0,"1443416400":0,"1443502800":0,"1443589200":0,"1443675600":0,"1443762000":0,"1443848400":0,"1443934800":0,"1444021200":0,"1444107600":0,"1444194000":0,"1444280400":0,"1444366800":0,"1444453200":0,"1444539600":0,"1444626000":0,"1444712400":0,"1444798800":0,"1444885200":0,"1444971600":0,"1445058000":0,"1445144400":0,"1445230800":0,"1445317200":0,"1445403600":0,"1445490000":0,"1445576400":0,"1445662800":0,"1445749200":0,"1445835600":0,"1445922000":0,"1446008400":0,"1446094800":0,"1446181200":0,"1446267600":0,"1446354000":0,"1446444000":0,"1446530400":0,"1446616800":0,"1446703200":0,"1446789600":0,"1446876000":0,"1446962400":0,"1447048800":0,"1447135200":0,"1447221600":0,"1447308000":0,"1447394400":0,"1447480800":0,"1447567200":0,"1447653600":0,"1447740000":0,"1447826400":0,"1447912800":0,"1447999200":0,"1448085600":0,"1448172000":0,"1448258400":0,"1448344800":0,"1448431200":0,"1448517600":0,"1448604000":0,"1448690400":0,"1448776800":0,"1448863200":0,"1448949600":0,"1449036000":0,"1449122400":0,"1449208800":0,"1449295200":0,"1449381600":0,"1449468000":0,"1449554400":0,"1449640800":0,"1449727200":0,"1449813600":0,"1449900000":0,"1449986400":0,"1450072800":0,"1450159200":0,"1450245600":0,"1450332000":0,"1450418400":0,"1450504800":0,"1450591200":0,"1450677600":0,"1450764000":0,"1450850400":0,"1450936800":0,"1451023200":0,"1451109600":0,"1451196000":0,"1451282400":0,"1451368800":0,"1451455200":0,"1451541600":0,"1451628000":0,"1451714400":0,"1451800800":0,"1451887200":0,"1451973600":0,"1452060000":0,"1452146400":0,"1452232800":0,"1452319200":0,"1452405600":0,"1452492000":0,"1452578400":0,"1452664800":0,"1452751200":0,"1452837600":0,"1452924000":0,"1453010400":0,"1453096800":0,"1453183200":0,"1453269600":0,"1453356000":0,"1453442400":0,"1453528800":0,"1453615200":0,"1453701600":0,"1453788000":0,"1453874400":0,"1453960800":0,"1454047200":0,"1454133600":0,"1454220000":0,"1454306400":0,"1454392800":0,"1454479200":0,"1454565600":0,"1454652000":0,"1454738400":0,"1454824800":0,"1454911200":0,"1454997600":0,"1455084000":0,"1455170400":0,"1455256800":0,"1455343200":0,"1455429600":0,"1455516000":0,"1455602400":0,"1455688800":0,"1455775200":0,"1455861600":0,"1455948000":0,"1456034400":0,"1456120800":0,"1456207200":0,"1456293600":0,"1456380000":0,"1456466400":0,"1456552800":0,"1456639200":0,"1456725600":0,"1456812000":0,"1456898400":0,"1456984800":0,"1457071200":0,"1457157600":0,"1457244000":0,"1457330400":0,"1457416800":0,"1457503200":0,"1457589600":0,"1457676000":0,"1457762400":0,"1457848800":0,"1457931600":0,"1458018000":0,"1458104400":0,"1458190800":0,"1458277200":0,"1458363600":0,"1458450000":0,"1458536400":0,"1458622800":0,"1458709200":0,"1458795600":0,"1458882000":0,"1458968400":0,"1459054800":0,"1459141200":0,"1459227600":0,"1459314000":0,"1459400400":0,"1459486800":0,"1459573200":0,"1459659600":0,"1459746000":0,"1459832400":0,"1459918800":0,"1460005200":0,"1460091600":0,"1460178000":0,"1460264400":0,"1460350800":0,"1460437200":0,"1460523600":0,"1460610000":0,"1460696400":0,"1460782800":0,"1460869200":0,"1460955600":0,"1461042000":0,"1461128400":0,"1461214800":0,"1461301200":0,"1461387600":0,"1461474000":0,"1461560400":0,"1461646800":0,"1461733200":0,"1461819600":0,"1461906000":0,"1461992400":0,"1462078800":0,"1462165200":0,"1462251600":0,"1462338000":0,"1462424400":0,"1462510800":0,"1462597200":0,"1462683600":0,"1462770000":0,"1462856400":0,"1462942800":0,"1463029200":0,"1463115600":0,"1463202000":0,"1463288400":0,"1463374800":0,"1463461200":0,"1463547600":0,"1463634000":0,"1463720400":0,"1463806800":0,"1463893200":0,"1463979600":0,"1464066000":0,"1464152400":0,"1464238800":0,"1464325200":0,"1464411600":0,"1464498000":0,"1464584400":0,"1464670800":0,"1464757200":0,"1464843600":0,"1464930000":0,"1465016400":0,"1465102800":0,"1465189200":0,"1465275600":0,"1465362000":0,"1465448400":0,"1465534800":0,"1465621200":0,"1465707600":0,"1465794000":0,"1465880400":0,"1465966800":0,"1466053200":0,"1466139600":0,"1466226000":0,"1466312400":0,"1466398800":0,"1466485200":0,"1466571600":0,"1466658000":0,"1466744400":0,"1466830800":0,"1466917200":0,"1467003600":0,"1467090000":0,"1467176400":0,"1467262800":0,"1467349200":0,"1467435600":0,"1467522000":0,"1467608400":0,"1467694800":0,"1467781200":0,"1467867600":0,"1467954000":0,"1468040400":0,"1468126800":0,"1468213200":0,"1468299600":0,"1468386000":0,"1468472400":0,"1468558800":0,"1468645200":0,"1468731600":0,"1468818000":0,"1468904400":0,"1468990800":0,"1469077200":0,"1469163600":17,"1469250000":0,"1469336400":0,"1469422800":3,"1469509200":14,"1469595600":54,"1469682000":0,"1469768400":4,"1469854800":1,"1469941200":0,"1470027600":0,"1470114000":0,"1470200400":1,"1470286800":0,"1470373200":1,"1470459600":0,"1470546000":0,"1470632400":0,"1470718800":0,"1470805200":0,"1470891600":2},
  '/u/root/calendar_activities'
);
```


After:
![Screen_Shot_2016-08-11_at_3.56.36_PM](/uploads/9325cdb8c0271075abee2a838c1a0787/Screen_Shot_2016-08-11_at_3.56.36_PM.png)

```
new Calendar(
  {"1469163600":17,"1469422800":3,"1469509200":14,"1469595600":54,"1469768400":4,"1469854800":1,"1470200400":1,"1470373200":1,"1470891600":2},
  '/u/root/calendar_activities'
);
```
## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- Tests
  - [x] All builds are passing
- [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 you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !5784
2016-08-26 02:19:40 +00:00
Clement Ho a15e9f02b8 Reduce contributions calendar data payload 2016-08-25 16:00:39 -05:00
Robert Speicher 75ed0e27d9 Merge branch '21247-mergerequestscontroller-conflicts-may-fail-with-iso-8859-data' into 'master'
Handle non-UTF-8 conflicts gracefully

## What does this MR do?

If a conflict file isn't in a UTF-8-compatible encoding, we can't resolve it in the UI.

## What are the relevant issue numbers?

Closes #21247. 

See merge request !5961
2016-08-25 19:08:38 +00:00
Douwe Maan 2933f3f597 Merge branch '21275-getting-500-error-when-viewing-a-merge-request' 2016-08-25 14:05:05 -05:00
Douwe Maan 4c17e1b3db Merge branch 'zj-remove-gitorious' into 'master'
Remove gitorious

## What does this MR do?

Remove gitorious as import source

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

Did I remove everything?

## Why was this MR needed?

This button yielded a 404

## What are the relevant issue numbers?

Closes #17062 

/cc @JobV 

See merge request !5866
2016-08-25 18:02:39 +00:00
Douwe Maan bbd9a6fe40 Merge branch 'dz-merge-request-version' 2016-08-25 12:59:21 -05:00
Paco Guzman a5079f68e6 Adds response mime type to transaction metric action when it's not HTML 2016-08-25 16:33:41 +02:00
Sean McGivern 4a3d1a5838 Handle case where conflicts aren't on disk yet 2016-08-25 12:34:54 +01:00
Z.J. van de Weg 4c8e9a8d27 Remove gitorious 2016-08-25 10:10:10 +01:00
Sean McGivern 44eb3197a9 Handle non-UTF-8 conflicts gracefully
These can't be resolved in the UI because if they aren't in a UTF-8
compatible encoding, they can't be rendered as JSON. Even if they could,
we would be implicitly changing the file encoding anyway, which seems
like a bad idea.
2016-08-25 08:27:08 +01:00
Douwe Maan 291fd85880 Merge branch 'github-importer' into 'master'
Does not halt the GitHub import process when an error occurs

## What are the relevant issue numbers?

Fixes #20385 

https://gitlab.com/gitlab-org/gitlab-ce/issues/20149

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- Tests
  - [x] All builds are passing
- [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 you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !5763
2016-08-24 20:39:29 +00:00
Douglas Barbosa Alexandre 2986de7c8c Add readable error message when remote data could not be fully imported 2016-08-24 12:17:13 -03:00
Douglas Barbosa Alexandre 3c09000e18 Does not halt the GitHub import process when an error occurs 2016-08-24 12:16:42 -03:00
Ben Boeckel 9b470aebb9 url_builder: handle project snippets 2016-08-24 10:32:12 -04:00
Yorick Peterse 94cfd4adb2 Merge branch 'metrics-typo' into 'master'
Fix typo in gitlab-workhorse header

See merge request !5891
2016-08-22 13:15:15 +00:00
Dmitriy Zaporozhets 9329436deb
Merge branch 'master' into dz-merge-request-version
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-08-22 11:34:41 +03:00
Robert Speicher 70cc319b87 Merge branch 'disable-issue-by-email' into 'master'
Disable “issue by email” feature until it uses a different token

Separate token being worked on in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5914, but too late for 8.11.

See merge request !5915
2016-08-20 01:29:11 +00:00
Douwe Maan 97dddf39cd Disable “issue by email” feature until it uses a different token 2016-08-19 19:49:12 -05:00
Stan Hu 310eef4521 Merge branch 'gokmengoksel/gitlab-ce-koding' into 'master'
Koding Integration

## What does this MR do?

Will provide Koding integration with GitLab services. Forked from !4914.

## Are there points in the code the reviewer needs to double check?
I've introduced new layouts which might not be necessary, first time contributor. 

## Why was this MR needed?
We're planning to ship Koding with GitLab.

## What are the relevant issue numbers?
#12759 #14698 

## Screenshots (if relevant)

### Screencasts

http://recordit.co/BDMbhwgxPD
http://recordit.co/By0qiz1ClC

### Enable Koding in Application Settings

![image](/uploads/73a69421105c03aa2b0b47e2617d3fbc/image.png)

### Koding Dashboard
![image](/uploads/6c7dda34792280c0e4791e36af4eba11/image.png)

### Set up Koding Stack
1 - ![image](/uploads/d5c2b93f8e61b5cbffdb06f0267d485f/image.png)
2 - ![image](/uploads/44d9a9b574b8ac0c5eb553fb9653d5da/image.png)

### Run on Koding on Project Page

![image](/uploads/7d2b46221009074ffff75d66d5a1a555/image.png)

### Run in IDE on Merge Requests
![image](/uploads/65eed90c34c34b5fe7ad29ef9c717640/image.png)

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [x] Tests
  - [x] Added for this feature/bug
  - [x] All builds are passing
- [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 you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !5909
2016-08-19 20:38:44 +00:00
Gokmen Goksel a927a9bf6b Support integration with Koding (online IDE)
Koding: #index: landing page for Koding integration

If enabled it will provide a link to open remote Koding instance url
for now we are also providing the sneak preview video for how
integration works in detail.

Repository: check whether .koding.yml file exists on repository

Projects: landing page: show Run in IDE (Koding) button if repo has stack file

Projects: MR: show Run in IDE Koding button if repo has stack file on active branch

ProjectHelpers: add_koding_stack: stack generator for provided project

With this helper we will auto-generate the required stack template
for a given project. For the feature we can request this base template
from the running Koding instance on integration.

Currently this will provide users to create a t2.nano instance on aws
and it'll automatically configures the instance for basic requirements.

Projects: empty state and landing page provide shortcuts to create stack

projects_helper: use branch on checkout and provide an entry point

This ${var.koding_queryString_branch} will be replaced with the branch
provided in query string which will allow us to use same stack template
for different branches of the same repository.

ref: b8c0e43c4c

projects_helper: provide sha info in query string to use existing vms

With this change we'll be able to query existing vms on Koding side
based on the commit id that they've created.

ref: 1d630fadf3

Integration: Docs: Koding documentation added

Disable /koding route if integration is disabled

Use application settings to enable Koding

Projects_helper: better indentation with strip_heredoc usage

Projects_helper: return koding_url as is if there is no project provided

current_settings: set koding_enabled: false by default

Koding_Controller: to render not_found once integration is disabled

Dashboard_specs: update spec for Koding enabled case

Projects_Helper: make repo dynamic

ref: 4d615242f4

Updated documentation to have right format
2016-08-19 12:10:58 -07:00
Robert Speicher eae636edb4 Merge branch 'wall-clock-time-for-showing-pipeline' into 'master'
Show wall-clock time when showing pipeline

## What does this MR do?

Show wall-clock time when showing pipeline instead of cumulative builds time.

Closes #17007

See merge request !5734
2016-08-19 17:42:26 +00:00
Douwe Maan cd10271667 Merge branch '20895-inline-comments-for-first-commit' into 'master'
Fix line commenting for the initial commit

## What does this MR do?

Support line positions on the initial commit, where we can't compare because there's no parent commit.

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

I chose to use the blank SHA to represent the initial commit, but it could as easily be the same SHA. I just thought this was clearer.

## Why was this MR needed?

People couldn't add line comments to the initial commit!

## What are the relevant issue numbers?

Closes #20895.

## Screenshots (if relevant)

![Comment_on_initial_commit](/uploads/1164448462ff55d133f3ff51c98044df/Comment_on_initial_commit.gif)

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added (N/A, regression)
- [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) (N/A)
- [x] API support added (N/A)
- Tests
  - [x] Added for this feature/bug
  - [x] All builds are passing
- [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 you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !5900
2016-08-19 16:40:45 +00:00
Lin Jen-Shin a49151f0d1 Merge remote-tracking branch 'upstream/master' into wall-clock-time-for-showing-pipeline
* upstream/master: (50 commits)
  Increased vertical alignment of labels for issues in lists
  Changed file name Updated spec HAML
  Changed tests to use JS tests
  Addressed feedback
  Made logic simpler by moving away from underscorejs
  Added tooltip to label value in collapsed sidebar
  Add play icon SVG
  Have hover color of builds span full width
  Fix alignment of icon on commits page
  Change sleep to wait_for_ajax
  Added tests
  Destroy branch delete tooltip when row is removed
  Move and improvement comment in pipeline fixtures
  Fix notification_service argument error of declined invitation emails
  Update contribution acceptance criteria with tests requirements
  Fixed keyboard shortcuts not working on issue boards
  Hides tooltip when dragging Fixes issue with cursor not changing when dragging
  Hides tooltips when dragging issues
  Add a spec testing a second side effect of `Repository#merge`.
  drop execute bit
  ...
2016-08-20 00:09:58 +08:00
Sean McGivern 4a4c1765be Fix line commenting for the initial commit
The initial commit doesn't have a parent, so explicitly pass the blank
SHA and handle that when calculating the position.
2016-08-19 16:35:44 +01:00
Douwe Maan d2f4c3ca5d Merge branch 'fix/improve-test-coverage-badge-pipelines' into 'master'
Render coverage badge using latest successful pipeline

## What does this MR do?

This MR make test coverage badge to report value for the latest successful pipeline, instead of the latest one, regardless the status.

Latest pipeline is often running, which makes coverage report inaccurate. Latest pipeline can be also the failed one, which may mean that not all stages got processed, therefore coverage report can be inaccurate as well.

This also improves coverage badge performance because it is not necessary to touch repository to get recent SHA on the branch.

## Why was this MR needed?

See #21013

## What are the relevant issue numbers?

Closes #21013

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry 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 [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !5862
2016-08-19 15:22:54 +00:00
Jacob Vosmaer 2bd0ed4a5c Fix typo in gitlab-workhorse header 2016-08-19 12:25:52 +02:00
Dmitriy Zaporozhets 6db65143db
Merge branch 'master' into dz-merge-request-version
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-08-19 13:01:58 +03:00
Lin Jen-Shin f8496a33b3 Merge remote-tracking branch 'upstream/master' into wall-clock-time-for-showing-pipeline
* upstream/master: (554 commits)
  Fix expansion of discussions in diff
  Improve performance of MR show page
  Fix jumping between discussions on changes tab
  Update doorkeeper to 4.2.0
  Fix MR note discussion ID
  Handle legacy sort order values
  Refactor `find_for_git_client` and its related methods.
  Remove right margin on Jump button icon
  Fix bug causing “Jump to discussion” button not to show
  Small refactor and syntax fixes.
  Removed unnecessary service for user retrieval and improved API error message.
  Added documentation and CHANGELOG item
  Added checks for 2FA to the API `/sessions` endpoint and the Resource Owner Password Credentials flow.
  Fix behavior around commands with optional arguments
  Fix behavior of label_ids and add/remove_label_ids
  Remove unneeded aliases
  Do not expose projects on deployments
  Incorporate feedback
  Docs for API endpoints
  Expose project for environments
  ...
2016-08-19 16:59:01 +08:00
Lin Jen-Shin f3e8b88814 Use travel_to instead of dependency injection, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5734#note_14056642
2016-08-19 16:57:25 +08:00
Robert Speicher a59c33e4a3 Merge branch '2fa-check-git-http' into 'master'
2FA checks for Git over HTTP

## What does this MR do?

This MR allows the use of `PersonalAccessTokens` to access Git over HTTP and makes that the only allowed method if the user has 2FA enabled. If a user with 2FA enabled tries to access Git over HTTP using his username and password the request will be denied and the user will be presented with the following message:

```
remote: HTTP Basic: Access denied
remote: You have 2FA enabled, please use a personal access token for Git over HTTP.
remote: You can generate one at http://localhost:3000/profile/personal_access_tokens
fatal: Authentication failed for 'http://localhost:3000/documentcloud/underscore.git/'
```

## What are the relevant issue numbers?

Fixes #13568 

See merge request !5764
2016-08-18 23:18:58 +00:00
Patricio Cano de5f238029 Refactor `find_for_git_client` and its related methods. 2016-08-18 17:15:50 -05:00
Robert Speicher 717366d28d Merge branch '4273-slash-commands' into 'master'
Support slash commands in issues / MR description & comments

See merge request !5021
2016-08-18 16:41:16 -05:00
Douwe Maan 2703330a19 Fix behavior around commands with optional arguments 2016-08-18 14:29:49 -05:00
Grzegorz Bizon 42496ecef7 Render coverage badge for latest successful pipeline 2016-08-18 16:30:43 +02:00
Douwe Maan 3e7eeefc93 Address feedback 2016-08-17 18:58:44 -05:00
Douwe Maan 8b8a4626c6 Fix specs and implement fixes based on failing specs 2016-08-17 17:54:24 -05:00
Patricio Cano 2f86860a6d Refactor `find_for_git_client` method to not use assignment in conditionals and syntax fixes. 2016-08-17 17:21:18 -05:00
Douwe Maan 20d46393a2 Merge branch 'custom-events-tracking' into 'master'
Tracking of custom events

## What does this MR do?

This MR adds the ability to track custom events such as the number of Git pushes.

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

The usual stuff.

## Why was this MR needed?

We want to track more business level data such as the number of Git pushes, how many repositories are imported (and from where), etc.

## What are the relevant issue numbers?

gitlab-org/gitlab-ce#13720

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [x] ~~API support added~~
- Tests
  - [x] Added for this feature/bug
  - [x] All builds are passing
- [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 you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

cc @pcarranza 

See merge request !5830
2016-08-17 17:30:45 +00:00
Sean McGivern e6f3461c0b Merge remote-tracking branch 'origin/master' into mc-ui 2016-08-17 16:55:28 +01:00
Yorick Peterse fa0624fc64
Better formatting for downtime check messages
This removes excessive whitespace from the messages (e.g. leading
whitespace) and ensures the message is more clearly visible.
2016-08-17 12:15:20 +02:00
Yorick Peterse 88a0c984fc
Fixed downtime check label colouring
The colours were incorrect: offline was green and online was red,
instead of the opposite.
2016-08-17 11:50:30 +02:00
Yorick Peterse d345591fc8
Tracking of custom events
GitLab Performance Monitoring is now able to track custom events not
directly related to application performance. These events include the
number of tags pushed, repositories created, builds registered, etc.

The use of these events is to get a better overview of how a GitLab
instance is used and how that may affect performance. For example, a
large number of Git pushes may have a negative impact on the underlying
storage engine.

Events are stored in the "events" measurement and are not prefixed with
"rails_" or "sidekiq_", this makes it easier to query events with the
same name triggered from different parts of the application. All events
being stored in the same measurement also makes it easier to downsample
data.

Currently the following events are tracked:

* Creating repositories
* Removing repositories
* Changing the default branch of a repository
* Pushing a new tag
* Removing an existing tag
* Pushing a commit (along with the branch being pushed to)
* Pushing a new branch
* Removing an existing branch
* Importing a repository (along with the URL we're importing)
* Forking a repository (along with the source/target path)
* CI builds registered (and when no build could be found)
* CI builds being updated
* Rails and Sidekiq exceptions

Fixes gitlab-org/gitlab-ce#13720
2016-08-17 10:04:04 +02:00
Lin Jen-Shin ec4549e4b5 Merge remote-tracking branch 'upstream/master' into wall-clock-time-for-showing-pipeline
* upstream/master: (99 commits)
  Update CHANGELOG for 8.10.6, 8.9.7, and 8.8.8
  Updated Akismet documentation
  Add hover state to todos (!5361)
  Load issues and merge requests templates from repository
  Backport EE assertions in protected branch related specs.
  Revert "Merge branch '19957-write-tests-for-adding-comments-for-different-line-types-in-diff' into 'master'"
  Fix a missed `before_action` for `AutocompleteController`.
  Backport `AutocompleteController#load_project` from EE!581.
  Fix API::BranchesSpec.
  Fix failing tests relating to backporting ee!581.
  Revert unrelevant changes
  Fix the protected branches factory.
  Improve EE compatibility with protected branch access levels.
  Move the "update" portion of the protected branch view into a partial.
  Don't select an access level if already selected.
  Backport changes from gitlab-org/gitlab-ee!581 to CE.
  Further refactor and syntax fixes.
  Upgrade httpclient gem from 2.7.0.1 to 2.8.2.
  Make rubocop happy
  Make rubocop happy
  ...
2016-08-17 13:30:12 +08:00
Douwe Maan e07c27fee4 Merge branch 'master' into 4273-slash-commands
# Conflicts:
#	app/services/issues/create_service.rb
2016-08-16 17:49:53 -05:00
Douwe Maan 029b7d2e92 Fixed specs and fixes based on failing specs 2016-08-16 17:42:34 -05:00
Kamil Trzcinski 45953a4c59 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into pipeline-hooks-without-slack 2016-08-16 21:17:15 +01:00
Douwe Maan f7e08ad0de Merge branch 'issue_18656' into 'master'
Load issue templates from repository

part of #18656 


## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [x] API support added
- Tests
  - [x] Added for this feature/bug
  - [x] All builds are passing
- [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 you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !4981
2016-08-16 19:32:41 +00:00
Felipe Artur 2872672945 Load issues and merge requests templates from repository 2016-08-16 15:50:17 -03:00
Timothy Andrew d9efc7d9e6 Merge remote-tracking branch 'origin/master' into ee-581-backport-changes 2016-08-16 23:51:22 +05:30
Ruben Davila 7f853e2245 Merge remote-tracking branch 'dev/master' 2016-08-16 12:24:03 -05:00