gitlab-org--gitlab-foss/app/views/shared
Stan Hu 5416ab8a0d Merge branch '21170-cycle-analytics' into 'master'
Cycle Analytics: first iteration

## What does this MR do?

- Implement the first iteration of the "Cycle Analytics" feature.

## What are the relevant issue numbers?

- Closes #21170 

## Screenshots

![cycle_analytics_screencast.gif](/uploads/d23c3c912caa6935fd47b53ca3a56b97/cycle_analytics.gif)

## Backend Tasks

- [x]  Implementation
    - [x]  Phases
        - [x]  Issue (Tracker)
        - [x]  Plan (Board)
        - [x]  Code (IDE)
        - [x]  Test (CI)
        - [x]  Review (MR)
        - [x]  Staging (CD)
        - [x]  Production (Total)
    - [x]  Make heuristics more modular
    - [x]  Scope to project
    - [x]  Date range (30 days, 90 days)
    - [x]  Access restriction
- [x]  Test
    - [x]  Find a better way to test these phases
    - [x]  Phases
        - [x]  Issue (Tracker)
        - [x]  Plan (Board)
        - [x]  Code (IDE)
        - [x]  Test (CI)
        - [x]  Review (MR)
        - [x]  Staging (CD)
        - [x]  Production (Total)
    - [x]  Test for "end case happens before start case"
    - [x]  Consolidate helper
- [x]  Miniboss review
- [x]  Performance testing with mock data
- [x]  Improve performance
    - [x]  Pre-calculate "merge requests closing issues
    - [x]  Pre-calculate everything else
- [x]  Test performance against 10k issues
- [x]  Test all pre-calculation code
    - [x]  Ci::Pipeline -> build start/finish
    - [x]  Ci::Pipeline#merge_requests
    - [x]  Issue -> record default metrics after save
    - [x]  MergeRequest -> record default metrics after save
    - [x]  Deployment -> Update "first_deployed_to_production_at" for MR metrics
    - [x]  Git Push -> Update "first commit mention" for issue metrics
    - [x]  Merge request create/update/refresh -> Update "merge requests closing issues"
- [x]  Remove `MergeRequestsClosingIssues` when necessary
- [x]  Changes to unblock Fatih
    - [x]  Add summary data
    - [x]  `stats` should be array
    - [x]  Let `stats` be `null` if all `stats` are null
- [x]  Indexes for "merge requests closing issues"
- [x]  Test summary data
- [x]  Scope everything to project
    - [x]  Find out why tests were passing
- [x]  Filter should include issues/MRs which have made it to production within the range
- [x]  Don't create duplicate `MergeRequestsClosingIssues`
- [x]  Fix tests
- [x]  MySQL median
- [x]  Assign to Douwe for review
- [x]  Fix conflicts
- [x]  Implement suggestions from Yorick's review
    - [x]  Test on PG
    - [x]  Test on MySQL
- [x]  Refactor
    - [x]  Cleanup
        - [x]  What happens if we have no data at all?
        - [x]  Extract common queries to methods / scopes
    - [x]  Remove unused queries
    - [x]  Downtime for foreign key migrations
    - [x]  Find a way around "if issue.metrics.present?" all over the place
    - [x]  Find a way around "if merge_request.metrics.present?" all over the place
    - [x]  Test migrations on a fresh database
        - [x]  MySQL
        - [x]  Pg
- [x]  Access issues
    - While the project is public and the visibility is set to "Everyone with access", you cannot visit the cycle analytics page when signed out.
- [x]  CHANGELOG
- [x]  Implement suggestions from Douwe's review
    - [x]  First set of comments
    - [x]  Second set of comments
    - [x]  Third set of comments
    - [x]  Fourth set of comments
- [x]  Make sure build is green
- [ ]  Make issue for "polish"
- [ ]  EE MR


See merge request !5986
2016-09-21 05:05:02 +00:00
..
builds Code refactoring 2016-09-13 09:05:07 +02:00
groups Syntax fixes and better tests for helper methods. Updated docs. 2016-09-15 14:10:49 -05:00
icons Update cycle analytics icon and fix color of the dismiss button. 2016-09-21 00:19:17 +03:00
issuable fix issues mr counter 2016-09-20 14:39:15 +01:00
members Allow project group links to be expired 2016-08-18 22:45:41 +01:00
milestones Remove icons from some buttons which already has text 2016-07-01 18:09:17 +02:00
notifications
projects Merge branch 'add-delimiter-project-stats' into 'master' 2016-08-17 19:35:25 +00:00
snippets Reordered dropdown options 2016-09-07 15:12:03 +01:00
web_hooks Add option to confidential issues events to trigger Webhooks 2016-08-31 18:34:23 -03:00
_allow_request_access.html.haml Allow to disable user request access to groups/projects 2016-07-20 14:38:21 +02:00
_choose_group_avatar_button.html.haml
_clone_panel.html.haml Clone button should not be clickable when there is a disabled protocol 2016-07-05 16:54:22 -05:00
_commit_message_container.html.haml
_confirm_modal.html.haml
_event_filter.html.haml
_field.html.haml
_file_highlight.html.haml add custom highlighting via .gitattributes 2016-06-27 14:17:49 -07:00
_group_form.html.haml
_group_tips.html.haml
_import_form.html.haml some JS magic to fix empty URL bug 2016-07-13 17:01:24 +02:00
_issues.html.haml
_label_row.html.haml
_labels_row.html.haml Fix filter label tooltip HTML rendering 2016-08-04 12:30:38 -05:00
_logo.svg Change logo animation to CSS 2016-08-26 17:32:11 -05:00
_merge_requests.html.haml
_milestone_expired.html.haml
_milestones_filter.html.haml
_nav_scroll.html.haml Add horizontal scrolling to all sub-navs on mobile viewports 2016-08-25 18:01:37 -05:00
_new_commit_form.html.haml
_new_project_item_select.html.haml
_no_password.html.haml
_no_ssh.html.haml
_outdated_browser.html.haml
_project_limit.html.haml
_promo.html.haml
_ref_switcher.html.haml Make the ref-selector function work properly for branch selection. 2016-08-17 09:23:43 -06:00
_service_settings.html.haml Refactor service settings view 2016-07-20 12:11:37 -03:00
_show_aside.html.haml
_sort_dropdown.html.haml
_visibility_level.html.haml Added group-specific setting for LFS. 2016-09-15 12:27:32 -05:00
_visibility_radios.html.haml