summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/cycle_analytics/components/stage_plan_component.vue
blob: 152c086a606e598f17eb8fb7b4ea35365b1528be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<script>
import userAvatarImage from '../../vue_shared/components/user_avatar/user_avatar_image.vue';
import iconCommit from '../svg/icon_commit.svg';

export default {
  props: {
    items: Array,
    stage: Object,
  },
  components: {
    userAvatarImage,
  },
  computed: {
    iconCommit() {
      return iconCommit;
    },
  },
};
</script>
<template>
  <div>
    <div class="events-description">
      {{ stage.description }}
      <limit-warning :count="items.length" />
    </div>
    <ul class="stage-event-list">
      <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>
          </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|pushed by') }}
            <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>
      </li>
    </ul>
  </div>
</template>