Welcome to mirror list, hosted at ThFree Co, Russian Federation.

log.vue « log « components « jobs « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ef126166e8bd9c1520d4d1466425c0b5ef414b7b (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
<script>
import { mapState, mapActions } from 'vuex';
import CollpasibleLogSection from './collapsible_section.vue';
import LogLine from './line.vue';

export default {
  components: {
    CollpasibleLogSection,
    LogLine,
  },
  computed: {
    ...mapState(['traceEndpoint', 'trace', 'isTraceComplete']),
  },
  methods: {
    ...mapActions(['toggleCollapsibleLine']),
    handleOnClickCollapsibleLine(section) {
      this.toggleCollapsibleLine(section);
    },
  },
};
</script>
<template>
  <code class="job-log d-block">
    <template v-for="(section, index) in trace">
      <collpasible-log-section
        v-if="section.isHeader"
        :key="`collapsible-${index}`"
        :section="section"
        :trace-endpoint="traceEndpoint"
        @onClickCollapsibleLine="handleOnClickCollapsibleLine"
      />
      <log-line v-else :key="section.offset" :line="section" :path="traceEndpoint" />
    </template>

    <div v-if="!isTraceComplete" class="js-log-animation loader-animation pt-3 pl-3">
      <div class="dot"></div>
      <div class="dot"></div>
      <div class="dot"></div>
    </div>
  </code>
</template>