PipelineCard.vue 1.75 KB
Newer Older
Quentin David's avatar
Quentin David committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<template>
  <v-card outlined v-if="pipeline">
    <v-card-text>
      
      <div v-if="pipeline.description">
        <h3>Description</h3>
        <br/>
        <p>{{ pipeline.description }}</p>
      </div>

      <h3>Options de pré-traitement</h3>
      <br/>
      <div v-if="filteredPreProcessingOptions">
        <div v-for="optionName in filteredPreProcessingOptions"
          :key="optionName"
        >
          <p> {{ optionName }}</p>
        </div>
      </div>
      <div v-else>
        <p> Aucune option de pré-traitement n'a été sélectionnée</p>
      </div>
23
24
      <v-divider/>
      <br/>
Quentin David's avatar
Quentin David committed
25
26
27
28
29
30
      <h3>Modules choisis</h3>
      <br/>
      <div
        v-for="process in pipeline.processes"
        :key="process._id"
      >
31
32
        <v-divider/>
        <br/>
Quentin David's avatar
Quentin David committed
33
34
35
36
37
38
39
40
41
        <h4> {{ process.moduleName }} </h4>
        <br/>
        <div
          v-for="parameter in process.moduleParameters"
          :key="parameter._id"
        >
          <span v-if="parameter.value"><p><span class="font-weight-medium">{{ parameter.name }}</span> : {{ parameter.value }}</p></span>
          <span v-else><p><span class="font-weight-medium">{{ parameter.name }}</span> : Non rempli</p></span>
        </div>
42
        
Quentin David's avatar
Quentin David committed
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
      </div>

    </v-card-text>
  </v-card>
</template>
<script>
export default {
  data: () => ({
  }),
  computed: {
    filteredPreProcessingOptions() {
      if (this.pipeline && this.pipeline.preProcessingOptions) {
        let l = [];
        for (const optionName in this.pipeline.preProcessingOptions) {
          if (this.pipeline.preProcessingOptions[optionName] === true) {
            l.push(optionName);
          }
        }
        return l.length ? l : null;
      }
      else {
        return null;
      }
    }
  },
  props: ['pipeline']
}
</script>