summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAlfredo Sumaran <alfredo@gitlab.com>2016-11-16 21:48:06 -0500
committerAlfredo Sumaran <alfredo@gitlab.com>2016-11-21 13:57:10 -0500
commit515fab4d490d9a7d7375b052de164c8c3afc0d63 (patch)
tree4e77211b6778120d140872143f709020797ce089 /app
parent4d5d8a81567f554b5e191aad64a4d461c357385f (diff)
downloadgitlab-ce-515fab4d490d9a7d7375b052de164c8c3afc0d63.tar.gz
Fix variable names to use camelCase
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/cycle_analytics/components/item_commit_component.js.es620
-rw-r--r--app/assets/javascripts/cycle_analytics/components/item_issue_component.js.es66
-rw-r--r--app/assets/javascripts/cycle_analytics/cycle_analytics_store.js.es69
3 files changed, 21 insertions, 14 deletions
diff --git a/app/assets/javascripts/cycle_analytics/components/item_commit_component.js.es6 b/app/assets/javascripts/cycle_analytics/components/item_commit_component.js.es6
index 6713b1fb970..3c3f2a650ef 100644
--- a/app/assets/javascripts/cycle_analytics/components/item_commit_component.js.es6
+++ b/app/assets/javascripts/cycle_analytics/components/item_commit_component.js.es6
@@ -20,8 +20,11 @@
template: `
<div>
<div class="item-details item-conmmit-component">
+ <img class="avatar" :src="commit.author.avatarUrl">
<h5 class="item-title">
- <a href="commit.url">{{ commit.title }}</a>
+ <a :href="commit.url">
+ {{ commit.title }}
+ </a>
</h5>
<span>
First
@@ -30,20 +33,15 @@
<path fill="#8F8F8F" fill-rule="evenodd" d="M28.7769836,18 C27.8675252,13.9920226 24.2831748,11 20,11 C15.7168252,11 12.1324748,13.9920226 11.2230164,18 L4.0085302,18 C2.90195036,18 2,18.8954305 2,20 C2,21.1122704 2.8992496,22 4.0085302,22 L11.2230164,22 C12.1324748,26.0079774 15.7168252,29 20,29 C24.2831748,29 27.8675252,26.0079774 28.7769836,22 L35.9914698,22 C37.0980496,22 38,21.1045695 38,20 C38,18.8877296 37.1007504,18 35.9914698,18 L28.7769836,18 L28.7769836,18 Z M20,25 C22.7614237,25 25,22.7614237 25,20 C25,17.2385763 22.7614237,15 20,15 C17.2385763,15 15,17.2385763 15,20 C15,22.7614237 17.2385763,25 20,25 L20,25 Z"/>
</svg>
</span>
- <a href="#" class="commit-hash-link monospace">{{ commit.hash }}</a>
+ <a :href="commit.url" class="commit-hash-link monospace">{{ commit.shortSha }}</a>
pushed by
- <a href="commit.profile" class="commit-author-link">{{ commit.author }}</a>
+ <a :href="commit.author.webUrl" class="commit-author-link">
+ {{ commit.author.name }}
+ </a>
</span>
</div>
<div class="item-time">
- <span class="hours" v-if="commit.totalTime.hours">
- {{ commit.totalTime.hours }}
- <abbr title="Hours">hr</abbr>
- </span>
- <span class="minutes" v-if="commit.totalTime.minutes">
- {{ commit.totalTime.minutes }}
- <abbr title="Minutes">mins</abbr>
- </span>
+ <total-time :time="commit.totalTime"></total-time>
</div>
<div>
`,
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 4de1abb4c64..5bacdb93226 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,14 +21,14 @@
template: `
<div>
<div class="item-details">
- <img class="avatar" :src="issue.author.avatar_url">
+ <img class="avatar" :src="issue.author.avatarUrl">
<h5 class="item-title">
<a :href="issue.url">
{{ issue.title }}
</a>
</h5>
<a :href="issue.url" class="issue-link">
- #{{issue.iid}}
+ #{{ issue.iid }}
</a>
&middot;
<span>
@@ -39,7 +39,7 @@
</span>
<span>
by
- <a :href="issue.author.web_url" class="issue-author-link">
+ <a :href="issue.author.webUrl" class="issue-author-link">
{{ issue.author.name }}
</a>
</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 b73a3d25bea..5812f2952b9 100644
--- a/app/assets/javascripts/cycle_analytics/cycle_analytics_store.js.es6
+++ b/app/assets/javascripts/cycle_analytics/cycle_analytics_store.js.es6
@@ -56,9 +56,18 @@
newEvents.forEach((item) => {
item.totalTime = item.total_time;
item.createdAt = item.created_at;
+ item.author.webUrl = item.author.web_url;
+ item.author.avatarUrl = item.author.avatar_url;
+ if (item.short_sha) {
+ item.shortSha = item.short_sha;
+ }
+
+ delete item.author.web_url;
+ delete item.author.avatar_url;
delete item.total_time;
delete item.created_at;
+ delete item.short_sha;
});
return newEvents;