summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Sumaran <alfredo@gitlab.com>2016-11-16 17:25:44 -0500
committerAlfredo Sumaran <alfredo@gitlab.com>2016-11-21 13:57:10 -0500
commit2fc9b5a2f5b4742df356f564dfcdf27c8b3ce9c9 (patch)
treeb4cfc5e81ba18563fa7c8fcbbe4717f0b3339aa7
parent2748a01a3a0dc6c6e946c41c68ec866bc87e8f8b (diff)
downloadgitlab-ce-2fc9b5a2f5b4742df356f564dfcdf27c8b3ce9c9.tar.gz
Use correct data for ItemIssueComponent from response
-rw-r--r--app/assets/javascripts/cycle_analytics/components/item_issue_component.js.es613
-rw-r--r--app/assets/javascripts/cycle_analytics/cycle_analytics_store.js.es62
2 files changed, 9 insertions, 6 deletions
diff --git a/app/assets/javascripts/cycle_analytics/components/item_issue_component.js.es6 b/app/assets/javascripts/cycle_analytics/components/item_issue_component.js.es6
index e73b2db1ba8..4de1abb4c64 100644
--- a/app/assets/javascripts/cycle_analytics/components/item_issue_component.js.es6
+++ b/app/assets/javascripts/cycle_analytics/components/item_issue_component.js.es6
@@ -21,19 +21,20 @@
template: `
<div>
<div class="item-details">
- <img class="avatar" src="https://secure.gravatar.com/avatar/3731e7dd4f2b4fa8ae184c0a7519dd58?s=64&amp;d=identicon">
+ <img class="avatar" :src="issue.author.avatar_url">
<h5 class="item-title">
- <a href="issue.url">
+ <a :href="issue.url">
{{ issue.title }}
</a>
</h5>
- <a href="issue.url" class="issue-link">
- #{{issue.id}}
+ <a :href="issue.url" class="issue-link">
+ #{{issue.iid}}
</a>
+ &middot;
<span>
Opened
- <a href="issue.url" class="issue-date">
- {{ issue.datetime }}
+ <a :href="issue.url" class="issue-date">
+ {{ issue.createdAt }}
</a>
</span>
<span>
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 9315f7621a7..b73a3d25bea 100644
--- a/app/assets/javascripts/cycle_analytics/cycle_analytics_store.js.es6
+++ b/app/assets/javascripts/cycle_analytics/cycle_analytics_store.js.es6
@@ -55,8 +55,10 @@
newEvents.forEach((item) => {
item.totalTime = item.total_time;
+ item.createdAt = item.created_at;
delete item.total_time;
+ delete item.created_at;
});
return newEvents;