summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/cycle_analytics
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2018-11-16 14:07:38 -0600
committerMike Greiling <mike@pixelcog.com>2018-11-20 09:30:01 -0600
commit5b9495c5db851ec8d1ca2cc6da0da12d6b161130 (patch)
treef622611ceb4caeda70212a52438a2c9428511a68 /app/assets/javascripts/cycle_analytics
parent29d129d21718f8aa9c7d58a8b403cf91f6d4addd (diff)
downloadgitlab-ce-5b9495c5db851ec8d1ca2cc6da0da12d6b161130.tar.gz
Prettify all the things
Diffstat (limited to 'app/assets/javascripts/cycle_analytics')
-rw-r--r--app/assets/javascripts/cycle_analytics/components/banner.vue27
-rw-r--r--app/assets/javascripts/cycle_analytics/components/limit_warning_component.vue13
-rw-r--r--app/assets/javascripts/cycle_analytics/components/stage_code_component.vue31
-rw-r--r--app/assets/javascripts/cycle_analytics/components/stage_component.vue37
-rw-r--r--app/assets/javascripts/cycle_analytics/components/stage_plan_component.vue33
-rw-r--r--app/assets/javascripts/cycle_analytics/components/stage_review_component.vue53
-rw-r--r--app/assets/javascripts/cycle_analytics/components/stage_staging_component.vue59
-rw-r--r--app/assets/javascripts/cycle_analytics/components/stage_test_component.vue61
-rw-r--r--app/assets/javascripts/cycle_analytics/components/total_time_component.vue22
9 files changed, 70 insertions, 266 deletions
diff --git a/app/assets/javascripts/cycle_analytics/components/banner.vue b/app/assets/javascripts/cycle_analytics/components/banner.vue
index 82b0f523d2e..e44588efbfc 100644
--- a/app/assets/javascripts/cycle_analytics/components/banner.vue
+++ b/app/assets/javascripts/cycle_analytics/components/banner.vue
@@ -32,30 +32,19 @@ export default {
type="button"
@click="dismissOverviewDialog"
>
- <icon
- name="close"
- />
+ <icon name="close" />
</button>
- <div
- class="svg-container"
- v-html="iconCycleAnalyticsSplash"
- >
- </div>
+ <div class="svg-container" v-html="iconCycleAnalyticsSplash"></div>
<div class="inner-content">
- <h4>
- {{ __('Introducing Cycle Analytics') }}
- </h4>
+ <h4>{{ __('Introducing Cycle Analytics') }}</h4>
<p>
- {{ __(`Cycle Analytics gives an overview
-of how much time it takes to go from idea to production in your project.`) }}
+ {{
+ __(`Cycle Analytics gives an overview
+of how much time it takes to go from idea to production in your project.`)
+ }}
</p>
<p>
- <a
- :href="documentationLink"
- target="_blank"
- rel="nofollow"
- class="btn"
- >
+ <a :href="documentationLink" target="_blank" rel="nofollow" class="btn">
{{ __('Read more') }}
</a>
</p>
diff --git a/app/assets/javascripts/cycle_analytics/components/limit_warning_component.vue b/app/assets/javascripts/cycle_analytics/components/limit_warning_component.vue
index f6a7d9962eb..16bc900867a 100644
--- a/app/assets/javascripts/cycle_analytics/components/limit_warning_component.vue
+++ b/app/assets/javascripts/cycle_analytics/components/limit_warning_component.vue
@@ -14,17 +14,12 @@ export default {
};
</script>
<template>
- <span
- v-if="count === 50"
- class="events-info float-right"
- >
+ <span v-if="count === 50" class="events-info float-right">
<i
v-tooltip
- :title="n__(
- 'Limited to showing %d event at most',
- 'Limited to showing %d events at most',
- 50
- )"
+ :title="
+ n__('Limited to showing %d event at most', 'Limited to showing %d events at most', 50)
+ "
class="fa fa-warning"
aria-hidden="true"
data-placement="top"
diff --git a/app/assets/javascripts/cycle_analytics/components/stage_code_component.vue b/app/assets/javascripts/cycle_analytics/components/stage_code_component.vue
index 429fef176c3..333ea111cd6 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_code_component.vue
+++ b/app/assets/javascripts/cycle_analytics/components/stage_code_component.vue
@@ -28,45 +28,26 @@ export default {
<limit-warning :count="items.length" />
</div>
<ul class="stage-event-list">
- <li
- v-for="(mergeRequest, i) in items"
- :key="i"
- class="stage-event-item"
- >
+ <li v-for="(mergeRequest, i) in items" :key="i" class="stage-event-item">
<div class="item-details">
<!-- FIXME: Pass an alt attribute here for accessibility -->
<user-avatar-image :img-src="mergeRequest.author.avatarUrl" />
<h5 class="item-title merge-merquest-title">
- <a :href="mergeRequest.url">
- {{ mergeRequest.title }}
- </a>
+ <a :href="mergeRequest.url"> {{ mergeRequest.title }} </a>
</h5>
- <a
- :href="mergeRequest.url"
- class="issue-link">
- !{{ mergeRequest.iid }}
- </a>
- &middot;
+ <a :href="mergeRequest.url" class="issue-link"> !{{ mergeRequest.iid }} </a> &middot;
<span>
{{ s__('OpenedNDaysAgo|Opened') }}
- <a
- :href="mergeRequest.url"
- class="issue-date">
- {{ mergeRequest.createdAt }}
- </a>
+ <a :href="mergeRequest.url" class="issue-date"> {{ mergeRequest.createdAt }} </a>
</span>
<span>
{{ s__('ByAuthor|by') }}
- <a
- :href="mergeRequest.author.webUrl"
- class="issue-author-link">
+ <a :href="mergeRequest.author.webUrl" class="issue-author-link">
{{ mergeRequest.author.name }}
</a>
</span>
</div>
- <div class="item-time">
- <total-time :time="mergeRequest.totalTime" />
- </div>
+ <div class="item-time"><total-time :time="mergeRequest.totalTime" /></div>
</li>
</ul>
</div>
diff --git a/app/assets/javascripts/cycle_analytics/components/stage_component.vue b/app/assets/javascripts/cycle_analytics/components/stage_component.vue
index 56e851fa528..c4f5172df3b 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_component.vue
+++ b/app/assets/javascripts/cycle_analytics/components/stage_component.vue
@@ -28,47 +28,24 @@ export default {
<limit-warning :count="items.length" />
</div>
<ul class="stage-event-list">
- <li
- v-for="(issue, i) in items"
- :key="i"
- class="stage-event-item"
- >
+ <li v-for="(issue, i) in items" :key="i" class="stage-event-item">
<div class="item-details">
<!-- FIXME: Pass an alt attribute here for accessibility -->
- <user-avatar-image :img-src="issue.author.avatarUrl"/>
+ <user-avatar-image :img-src="issue.author.avatarUrl" />
<h5 class="item-title issue-title">
- <a
- :href="issue.url"
- class="issue-title"
- >
- {{ issue.title }}
- </a>
+ <a :href="issue.url" class="issue-title"> {{ issue.title }} </a>
</h5>
- <a
- :href="issue.url"
- class="issue-link"
- >#{{ issue.iid }}</a>
- &middot;
+ <a :href="issue.url" class="issue-link">#{{ issue.iid }}</a> &middot;
<span>
{{ s__('OpenedNDaysAgo|Opened') }}
- <a
- :href="issue.url"
- class="issue-date"
- >{{ issue.createdAt }}</a>
+ <a :href="issue.url" class="issue-date">{{ issue.createdAt }}</a>
</span>
<span>
{{ s__('ByAuthor|by') }}
- <a
- :href="issue.author.webUrl"
- class="issue-author-link"
- >
- {{ issue.author.name }}
- </a>
+ <a :href="issue.author.webUrl" class="issue-author-link"> {{ issue.author.name }} </a>
</span>
</div>
- <div class="item-time">
- <total-time :time="issue.totalTime" />
- </div>
+ <div class="item-time"><total-time :time="issue.totalTime" /></div>
</li>
</ul>
</div>
diff --git a/app/assets/javascripts/cycle_analytics/components/stage_plan_component.vue b/app/assets/javascripts/cycle_analytics/components/stage_plan_component.vue
index 54b9da4983a..6c256fa6736 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_plan_component.vue
+++ b/app/assets/javascripts/cycle_analytics/components/stage_plan_component.vue
@@ -34,42 +34,25 @@ export default {
<limit-warning :count="items.length" />
</div>
<ul class="stage-event-list">
- <li
- v-for="(commit, i) in items"
- :key="i"
- class="stage-event-item"
- >
+ <li v-for="(commit, i) in items" :key="i" class="stage-event-item">
<div class="item-details item-conmmit-component">
<!-- FIXME: Pass an alt attribute here for accessibility -->
<user-avatar-image :img-src="commit.author.avatarUrl" />
<h5 class="item-title commit-title">
- <a :href="commit.commitUrl">
- {{ commit.title }}
- </a>
+ <a :href="commit.commitUrl"> {{ commit.title }} </a>
</h5>
<span>
- {{ s__('FirstPushedBy|First') }}
- <span
- class="commit-icon"
- v-html="iconCommit"
- >
- </span>
- <a
- :href="commit.commitUrl"
- class="commit-hash-link commit-sha"
- >{{ commit.shortSha }}</a>
+ {{ s__('FirstPushedBy|First') }} <span class="commit-icon" v-html="iconCommit"> </span>
+ <a :href="commit.commitUrl" class="commit-hash-link commit-sha">{{
+ commit.shortSha
+ }}</a>
{{ s__('FirstPushedBy|pushed by') }}
- <a
- :href="commit.author.webUrl"
- class="commit-author-link"
- >
+ <a :href="commit.author.webUrl" class="commit-author-link">
{{ commit.author.name }}
</a>
</span>
</div>
- <div class="item-time">
- <total-time :time="commit.totalTime" />
- </div>
+ <div class="item-time"><total-time :time="commit.totalTime" /></div>
</li>
</ul>
</div>
diff --git a/app/assets/javascripts/cycle_analytics/components/stage_review_component.vue b/app/assets/javascripts/cycle_analytics/components/stage_review_component.vue
index f9c80d237d7..f874f11aff0 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_review_component.vue
+++ b/app/assets/javascripts/cycle_analytics/components/stage_review_component.vue
@@ -30,66 +30,37 @@ export default {
<limit-warning :count="items.length" />
</div>
<ul class="stage-event-list">
- <li
- v-for="(mergeRequest, i) in items"
- :key="i"
- class="stage-event-item"
- >
+ <li v-for="(mergeRequest, i) in items" :key="i" class="stage-event-item">
<div class="item-details">
<!-- FIXME: Pass an alt attribute here for accessibility -->
<user-avatar-image :img-src="mergeRequest.author.avatarUrl" />
<h5 class="item-title merge-merquest-title">
- <a :href="mergeRequest.url">
- {{ mergeRequest.title }}
- </a>
+ <a :href="mergeRequest.url"> {{ mergeRequest.title }} </a>
</h5>
- <a
- :href="mergeRequest.url"
- class="issue-link"
- >!{{ mergeRequest.iid }}</a>
- &middot;
+ <a :href="mergeRequest.url" class="issue-link">!{{ mergeRequest.iid }}</a> &middot;
<span>
{{ s__('OpenedNDaysAgo|Opened') }}
- <a
- :href="mergeRequest.url"
- class="issue-date"
- >{{ mergeRequest.createdAt }}</a>
+ <a :href="mergeRequest.url" class="issue-date">{{ mergeRequest.createdAt }}</a>
</span>
<span>
{{ s__('ByAuthor|by') }}
- <a
- :href="mergeRequest.author.webUrl"
- class="issue-author-link"
- >{{ mergeRequest.author.name }}</a>
+ <a :href="mergeRequest.author.webUrl" class="issue-author-link">{{
+ mergeRequest.author.name
+ }}</a>
</span>
<template v-if="mergeRequest.state === 'closed'">
<span class="merge-request-state">
- <i
- class="fa fa-ban"
- aria-hidden="true"
- >
- </i>
- {{ mergeRequest.state.toUpperCase() }}
+ <i class="fa fa-ban" aria-hidden="true"> </i> {{ mergeRequest.state.toUpperCase() }}
</span>
</template>
<template v-else>
- <span
- v-if="mergeRequest.branch"
- class="merge-request-branch"
- >
- <icon
- :size="16"
- name="fork"
- />
- <a :href="mergeRequest.branch.url">
- {{ mergeRequest.branch.name }}
- </a>
+ <span v-if="mergeRequest.branch" class="merge-request-branch">
+ <icon :size="16" name="fork" />
+ <a :href="mergeRequest.branch.url"> {{ mergeRequest.branch.name }} </a>
</span>
</template>
</div>
- <div class="item-time">
- <total-time :time="mergeRequest.totalTime" />
- </div>
+ <div class="item-time"><total-time :time="mergeRequest.totalTime" /></div>
</li>
</ul>
</div>
diff --git a/app/assets/javascripts/cycle_analytics/components/stage_staging_component.vue b/app/assets/javascripts/cycle_analytics/components/stage_staging_component.vue
index e83b66eef86..c5146c3bf88 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_staging_component.vue
+++ b/app/assets/javascripts/cycle_analytics/components/stage_staging_component.vue
@@ -36,62 +36,23 @@ export default {
<limit-warning :count="items.length" />
</div>
<ul class="stage-event-list">
- <li
- v-for="(build, i) in items"
- :key="i"
- class="stage-event-item item-build-component"
- >
+ <li v-for="(build, i) in items" :key="i" class="stage-event-item item-build-component">
<div class="item-details">
<!-- FIXME: Pass an alt attribute here for accessibility -->
- <user-avatar-image :img-src="build.author.avatarUrl"/>
+ <user-avatar-image :img-src="build.author.avatarUrl" />
<h5 class="item-title">
- <a
- :href="build.url"
- class="pipeline-id"
- >
- #{{ build.id }}
- </a>
- <icon
- :size="16"
- name="fork"
- />
- <a
- :href="build.branch.url"
- class="ref-name"
- >
- {{ build.branch.name }}
- </a>
- <span
- class="icon-branch"
- v-html="iconBranch"
- >
- </span>
- <a
- :href="build.commitUrl"
- class="commit-sha"
- >
- {{ build.shortSha }}
- </a>
+ <a :href="build.url" class="pipeline-id"> #{{ build.id }} </a>
+ <icon :size="16" name="fork" />
+ <a :href="build.branch.url" class="ref-name"> {{ build.branch.name }} </a>
+ <span class="icon-branch" v-html="iconBranch"> </span>
+ <a :href="build.commitUrl" class="commit-sha"> {{ build.shortSha }} </a>
</h5>
<span>
- <a
- :href="build.url"
- class="build-date"
- >
- {{ build.date }}
- </a>
- {{ s__('ByAuthor|by') }}
- <a
- :href="build.author.webUrl"
- class="issue-author-link"
- >
- {{ build.author.name }}
- </a>
+ <a :href="build.url" class="build-date"> {{ build.date }} </a> {{ s__('ByAuthor|by') }}
+ <a :href="build.author.webUrl" class="issue-author-link"> {{ build.author.name }} </a>
</span>
</div>
- <div class="item-time">
- <total-time :time="build.totalTime" />
- </div>
+ <div class="item-time"><total-time :time="build.totalTime" /></div>
</li>
</ul>
</div>
diff --git a/app/assets/javascripts/cycle_analytics/components/stage_test_component.vue b/app/assets/javascripts/cycle_analytics/components/stage_test_component.vue
index a8196dc879a..35721384210 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_test_component.vue
+++ b/app/assets/javascripts/cycle_analytics/components/stage_test_component.vue
@@ -38,63 +38,22 @@ export default {
<limit-warning :count="items.length" />
</div>
<ul class="stage-event-list">
- <li
- v-for="(build, i) in items"
- :key="i"
- class="stage-event-item item-build-component"
- >
+ <li v-for="(build, i) in items" :key="i" class="stage-event-item item-build-component">
<div class="item-details">
<h5 class="item-title">
- <span
- class="icon-build-status"
- v-html="iconBuildStatus"
- >
- </span>
- <a
- :href="build.url"
- class="item-build-name"
- >
- {{ build.name }}
- </a>
- &middot;
- <a
- :href="build.url"
- class="pipeline-id"
- >
- #{{ build.id }}
- </a>
- <icon
- :size="16"
- name="fork"
- />
- <a
- :href="build.branch.url"
- class="ref-name"
- >
- {{ build.branch.name }}
- </a>
- <span
- class="icon-branch"
- v-html="iconBranch"
- >
- </span>
- <a
- :href="build.commitUrl"
- class="commit-sha">
- {{ build.shortSha }}
- </a>
+ <span class="icon-build-status" v-html="iconBuildStatus"> </span>
+ <a :href="build.url" class="item-build-name"> {{ build.name }} </a> &middot;
+ <a :href="build.url" class="pipeline-id"> #{{ build.id }} </a>
+ <icon :size="16" name="fork" />
+ <a :href="build.branch.url" class="ref-name"> {{ build.branch.name }} </a>
+ <span class="icon-branch" v-html="iconBranch"> </span>
+ <a :href="build.commitUrl" class="commit-sha"> {{ build.shortSha }} </a>
</h5>
<span>
- <a
- :href="build.url"
- class="issue-date">
- {{ build.date }}
- </a>
+ <a :href="build.url" class="issue-date"> {{ build.date }} </a>
</span>
</div>
- <div class="item-time">
- <total-time :time="build.totalTime" />
- </div>
+ <div class="item-time"><total-time :time="build.totalTime" /></div>
</li>
</ul>
</div>
diff --git a/app/assets/javascripts/cycle_analytics/components/total_time_component.vue b/app/assets/javascripts/cycle_analytics/components/total_time_component.vue
index 4db50134208..b93a7d3c4f9 100644
--- a/app/assets/javascripts/cycle_analytics/components/total_time_component.vue
+++ b/app/assets/javascripts/cycle_analytics/components/total_time_component.vue
@@ -18,28 +18,16 @@ export default {
<span class="total-time">
<template v-if="hasData">
<template v-if="time.days">
- {{ time.days }}
- <span>
- {{ n__('day', 'days', time.days) }}
- </span>
+ {{ time.days }} <span> {{ n__('day', 'days', time.days) }} </span>
</template>
<template v-if="time.hours">
- {{ time.hours }}
- <span>
- {{ n__('Time|hr', 'Time|hrs', time.hours) }}
- </span>
+ {{ time.hours }} <span> {{ n__('Time|hr', 'Time|hrs', time.hours) }} </span>
</template>
<template v-if="time.mins && !time.days">
- {{ time.mins }}
- <span>
- {{ n__('Time|min', 'Time|mins', time.mins) }}
- </span>
+ {{ time.mins }} <span> {{ n__('Time|min', 'Time|mins', time.mins) }} </span>
</template>
- <template v-if="time.seconds && hasData === 1 || time.seconds === 0">
- {{ time.seconds }}
- <span>
- {{ s__('Time|s') }}
- </span>
+ <template v-if="(time.seconds && hasData === 1) || time.seconds === 0">
+ {{ time.seconds }} <span> {{ s__('Time|s') }} </span>
</template>
</template>
<template v-else>