gitlab-org--gitlab-foss/app/assets/javascripts
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
..
behaviors Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
blob Merge branch 'issue-description-scroll-fix' into 'master' 2016-09-15 15:06:18 +00:00
blob_edit Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
boards Fixed issue boards loading issues on large screens 2016-09-13 11:27:16 +01:00
commit Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
diff_notes Fix jumping between discussions on changes tab 2016-08-18 18:14:47 -05:00
extensions Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
graphs Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
lib Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
network Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
profile Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
snippet Don't use global variables. 2016-08-18 21:48:11 +01:00
templates Load issues and merge requests templates from repository 2016-08-16 15:50:17 -03:00
u2f Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
users Replace contributions calendar timezone payload with dates 2016-09-16 14:38:59 -05:00
abuse_reports.js.es6 Update abuse_reports.js.es6 with prettier window.gl assignment 2016-08-24 11:25:06 +00:00
activities.js Remove redundant js-timeago-pending from user activity log 2016-08-31 11:20:48 -05:00
admin.js ES6ify all the things! 2016-07-24 23:45:11 +03:00
api.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
application.js Hides tooltip on discussion toggle button when clicking 2016-09-12 09:52:14 +01:00
aside.js ES6ify all the things! 2016-07-24 23:45:11 +03:00
autosave.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
awards_handler.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
breakpoints.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
broadcast_message.js ES6ify all the things! 2016-07-24 23:45:11 +03:00
build.js Now anchors to the top or bottom of the build trace with the correct offset 2016-09-09 21:22:18 +01:00
build_artifacts.js ES6ify all the things! 2016-07-24 23:45:11 +03:00
build_variables.js.es6 add feature test 2016-09-06 14:42:43 +02:00
commit.js ES6ify all the things! 2016-07-24 23:45:11 +03:00
commits.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
compare.js ES6ify all the things! 2016-07-24 23:45:11 +03:00
compare_autocomplete.js ES6ify all the things! 2016-07-24 23:45:11 +03:00
confirm_danger_modal.js ES6ify all the things! 2016-07-24 23:45:11 +03:00
copy_to_clipboard.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
create_label.js.es6 Removed underscorejs from create label class 2016-08-17 17:17:39 +01:00
cycle-analytics.js.es6 Use triple dashes for the empty value in cycle analytics. 2016-09-21 00:19:17 +03:00
diff.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
dispatcher.js Merge remote-tracking branch 'origin/master' into 21170-cycle-analytics 2016-09-20 14:48:13 +05:30
dropzone_input.js Rename markdown_preview routes to preview_markdown 2016-08-11 15:54:18 +02:00
due_date_select.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
files_comment_button.js Added unfold test to parallel and added 'diff discussion' context 2016-08-23 20:45:29 +01:00
flash.js ES6ify all the things! 2016-07-24 23:45:11 +03:00
gfm_auto_complete.js.es6 Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
gl_dropdown.js Merge branch 'master' into '21961-issues-filtering-issue-with-labels-that-contain-spaces' 2016-09-19 19:33:23 +00:00
gl_form.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
group_avatar.js ES6ify all the things! 2016-07-24 23:45:11 +03:00
groups.js ES6ify all the things! 2016-07-24 23:45:11 +03:00
groups_select.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
importer_status.js fix indent in JS file 2016-09-20 12:10:35 +02:00
issuable.js.es6 fix issues mr counter 2016-09-20 14:39:15 +01:00
issuable_context.js ES6ify all the things! 2016-07-24 23:45:11 +03:00
issuable_form.js Move to project dropdown with infinite scroll for better performance 2016-08-18 15:31:51 +02:00
issue.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
issue_status_select.js ES6ify all the things! 2016-07-24 23:45:11 +03:00
issues-bulk-assignment.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
LabelManager.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
labels.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
labels_select.js Replace single quotes with escaped single quotes and write spec to test multiple lable selection over a page load 2016-09-14 12:15:01 +01:00
layout_nav.js Doesnt run JS if active element doesnt exist 2016-09-16 13:52:06 +01:00
line_highlighter.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
logo.js Minor code refactor for inlining functions. 2016-08-30 08:02:29 +03:00
member_expiration_date.js Don’t add events in loop 2016-08-18 19:41:18 -05:00
merge_conflict_data_provider.js.es6 Fix hard coded plural text. 2016-08-13 00:30:44 +03:00
merge_conflict_resolver.js.es6 Keep committing ... spinner when conflict resolved 2016-08-19 12:12:50 +01:00
merge_request.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
merge_request_tabs.js Fix line diff side-by-side line highlighting 2016-09-13 11:51:52 +01:00
merge_request_widget.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
merged_buttons.js ES6ify all the things! 2016-07-24 23:45:11 +03:00
milestone.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
milestone_select.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
namespace_select.js ES6ify all the things! 2016-07-24 23:45:11 +03:00
new_branch_form.js ES6ify all the things! 2016-07-24 23:45:11 +03:00
new_commit_form.js ES6ify all the things! 2016-07-24 23:45:11 +03:00
notes.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
notifications_dropdown.js ES6ify all the things! 2016-07-24 23:45:11 +03:00
notifications_form.js ES6ify all the things! 2016-07-24 23:45:11 +03:00
pager.js ES6ify all the things! 2016-07-24 23:45:11 +03:00
pipeline.js.es6 Remove index from pipeline toggles 2016-08-17 16:44:25 -05:00
preview_markdown.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
project.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
project_avatar.js ES6ify all the things! 2016-07-24 23:45:11 +03:00
project_find_file.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
project_fork.js ES6ify all the things! 2016-07-24 23:45:11 +03:00
project_import.js ES6ify all the things! 2016-07-24 23:45:11 +03:00
project_members.js Add MemberExpirationDate JS helper 2016-08-18 14:14:22 +01:00
project_new.js Refactored code to rely less on IDs that could change 2016-09-02 14:51:36 +01:00
project_select.js ES6ify all the things! 2016-07-24 23:45:11 +03:00
project_show.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
projects_list.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
protected_branch_access_dropdown.js.es6 Set default label if user unselects the option from dropdown 2016-08-21 00:21:32 -05:00
protected_branch_create.js.es6 Toggle dropdown disabled attribute 2016-08-21 00:20:57 -05:00
protected_branch_dropdown.js.es6 Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
protected_branch_edit.js.es6 Do not update if one dropdown has not selected any option 2016-08-21 00:19:22 -05:00
protected_branch_edit_list.js.es6 Wrap classes with IIFE and define it inside gl namespace 2016-08-05 17:19:01 -05:00
right_sidebar.js use gitlab global root url as canonical base url for all javascript set cookies (closes #20435) 2016-08-24 22:11:28 -05:00
search.js ES6ify all the things! 2016-07-24 23:45:11 +03:00
search_autocomplete.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
shortcuts.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
shortcuts_blob.js ES6ify all the things! 2016-07-24 23:45:11 +03:00
shortcuts_dashboard_navigation.js ES6ify all the things! 2016-07-24 23:45:11 +03:00
shortcuts_find_file.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
shortcuts_issuable.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
shortcuts_navigation.js Added keyboard shortcut to navigate to issue boards 2016-09-15 18:20:36 -04:00
shortcuts_network.js ES6ify all the things! 2016-07-24 23:45:11 +03:00
sidebar.js.es6 sync sidebar DOM state on page:change to minimize split-second appearance of the sidebar in certain situations 2016-09-07 14:02:21 -05:00
single_file_diff.js Fixed issue with expand diff not initializing resolve buttons 2016-08-04 11:27:11 +01:00
snippets_list.js.es6 Convert SnippetsList to ES6 2016-09-05 17:38:20 +01:00
star.js ES6ify all the things! 2016-07-24 23:45:11 +03:00
subscription.js ES6ify all the things! 2016-07-24 23:45:11 +03:00
subscription_select.js ES6ify all the things! 2016-07-24 23:45:11 +03:00
syntax_highlight.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
todos.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
tree.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
user.js.es6 removed null return - renamed 'placeTop' to 'placeProfileAvatarsToTop' 2016-09-01 14:51:53 -06:00
user_tabs.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
users_select.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
wikis.js ES6ify all the things! 2016-07-24 23:45:11 +03:00
zen_mode.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00