summaryrefslogtreecommitdiff
path: root/app/views/projects/cycle_analytics
diff options
context:
space:
mode:
authorTimothy Andrew <mail@timothyandrew.net>2016-08-25 11:24:41 +0530
committerTimothy Andrew <mail@timothyandrew.net>2016-08-26 16:28:20 +0530
commit487906b3861068a8f81125814f919a07bfab8469 (patch)
tree13bb6d62ad6211c2f7075e0d1321f5405acbfeb0 /app/views/projects/cycle_analytics
parentf932bb8e41852d7bdcd66fe15a56277074df3aa3 (diff)
downloadgitlab-ce-487906b3861068a8f81125814f919a07bfab8469.tar.gz
Add the "Code" Cycle Analytics section.
1. Record the `wip_flag_first_removed_at` and `first_assigned_to_user_other_than_author` metrics for a merge request. Use a `merge_request_metrics` table, similar to the one for `issues`. Metrics are recorded `after_save`. 2. Move larger queries to a `CycleAnalytics::Queries` module.
Diffstat (limited to 'app/views/projects/cycle_analytics')
-rw-r--r--app/views/projects/cycle_analytics/show.html.haml17
1 files changed, 15 insertions, 2 deletions
diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml
index 6aad68617fe..0774c54ddab 100644
--- a/app/views/projects/cycle_analytics/show.html.haml
+++ b/app/views/projects/cycle_analytics/show.html.haml
@@ -1,8 +1,21 @@
%ul.list-group
%li.list-group-item
Issue:
- = distance_of_time_in_words @cycle_analytics.issue
+ - if issue = @cycle_analytics.issue
+ = distance_of_time_in_words issue
+ - else
+ <Not enough data>
%li.list-group-item
Plan:
- = distance_of_time_in_words @cycle_analytics.plan
+ - if plan = @cycle_analytics.plan
+ = distance_of_time_in_words plan
+ - else
+ <Not enough data>
+
+ %li.list-group-item
+ Code:
+ - if code = @cycle_analytics.code.presence
+ = distance_of_time_in_words code
+ - else
+ = "<Not enough data>"