summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/cycle_analytics/components/stage_test_component.js.es6
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2017-03-02 22:05:45 +0000
committerFatih Acet <acetfatih@gmail.com>2017-03-02 22:05:45 +0000
commit1ca2f3798a6bd8c64fe4ee0bbcb6bb5e7b3419e8 (patch)
tree160f97638885d0f9a76e89bb647e9dc3154ef12a /app/assets/javascripts/cycle_analytics/components/stage_test_component.js.es6
parent6178c500a220909f67ad14f98e8b642773548891 (diff)
parent52e104b2a41d4bbc55853bc62045232fc29e5e57 (diff)
downloadgitlab-ce-1ca2f3798a6bd8c64fe4ee0bbcb6bb5e7b3419e8.tar.gz
Merge branch 'add-svg-loader' into 'master'
Fixes Tech debt: No need to pass svgs as props into Vue with Webpack Closes #27692 and #27840 See merge request !9522
Diffstat (limited to 'app/assets/javascripts/cycle_analytics/components/stage_test_component.js.es6')
-rw-r--r--app/assets/javascripts/cycle_analytics/components/stage_test_component.js.es611
1 files changed, 8 insertions, 3 deletions
diff --git a/app/assets/javascripts/cycle_analytics/components/stage_test_component.js.es6 b/app/assets/javascripts/cycle_analytics/components/stage_test_component.js.es6
index 4bfd363a1f1..0015249cfaa 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_test_component.js.es6
+++ b/app/assets/javascripts/cycle_analytics/components/stage_test_component.js.es6
@@ -1,5 +1,7 @@
/* eslint-disable no-param-reassign */
-/* global Vue */
+import Vue from 'vue';
+import iconBuildStatus from '../svg/icon_build_status.svg';
+import iconBranch from '../svg/icon_branch.svg';
((global) => {
global.cycleAnalytics = global.cycleAnalytics || {};
@@ -9,6 +11,9 @@
items: Array,
stage: Object,
},
+ data() {
+ return { iconBuildStatus, iconBranch };
+ },
template: `
<div>
<div class="events-description">
@@ -18,13 +23,13 @@
<li v-for="build in items" class="stage-event-item item-build-component">
<div class="item-details">
<h5 class="item-title">
- <span class="icon-build-status">${global.cycleAnalytics.svgs.iconBuildStatus}</span>
+ <span class="icon-build-status">${iconBuildStatus}</span>
<a :href="build.url" class="item-build-name">{{ build.name }}</a>
&middot;
<a :href="build.url" class="pipeline-id">#{{ build.id }}</a>
<i class="fa fa-code-fork"></i>
<a :href="build.branch.url" class="branch-name monospace">{{ build.branch.name }}</a>
- <span class="icon-branch">${global.cycleAnalytics.svgs.iconBranch}</span>
+ <span class="icon-branch">${iconBranch}</span>
<a :href="build.commitUrl" class="short-sha monospace">{{ build.shortSha }}</a>
</h5>
<span>