summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Sumaran <alfredo@gitlab.com>2017-02-28 19:45:28 +0000
committerFelipe Artur <felipefac@gmail.com>2017-03-03 19:01:30 -0300
commit3412fa8a543b0dd876a54d29762b8cab814e6652 (patch)
tree840b03e78dd33d106aae86033075bab323e7a707
parent772f4e703fa01ed3b1c20ce5a955b61b79a139aa (diff)
downloadgitlab-ce-3412fa8a543b0dd876a54d29762b8cab814e6652.tar.gz
Merge branch '27622-cycle-analytics-loading' into 'master'
Fix Cycle Analytics -> Plan is loading forever Closes #27622 See merge request !9577
-rw-r--r--app/assets/javascripts/cycle_analytics/cycle_analytics_store.js.es611
1 files changed, 8 insertions, 3 deletions
diff --git a/app/assets/javascripts/cycle_analytics/cycle_analytics_store.js.es6 b/app/assets/javascripts/cycle_analytics/cycle_analytics_store.js.es6
index be732971c7f..c89972d327c 100644
--- a/app/assets/javascripts/cycle_analytics/cycle_analytics_store.js.es6
+++ b/app/assets/javascripts/cycle_analytics/cycle_analytics_store.js.es6
@@ -67,9 +67,14 @@
events.forEach((item) => {
if (!item) return;
- item.totalTime = item.total_time;
- item.author.webUrl = item.author.web_url;
- item.author.avatarUrl = item.author.avatar_url;
+ const eventItem = Object.assign({}, DEFAULT_EVENT_OBJECTS[stage.slug], item);
+
+ eventItem.totalTime = eventItem.total_time;
+
+ if (eventItem.author) {
+ eventItem.author.webUrl = eventItem.author.web_url;
+ eventItem.author.avatarUrl = eventItem.author.avatar_url;
+ }
if (item.created_at) item.createdAt = item.created_at;
if (item.short_sha) item.shortSha = item.short_sha;