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

training_provider_list.vue « components « security_configuration « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 509377a63e8d62e344af004bde3b6122ec5ed87b (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
57
58
59
60
61
<script>
import { GlCard, GlToggle, GlLink, GlSkeletonLoader } from '@gitlab/ui';
import securityTrainingProvidersQuery from '../graphql/security_training_providers.query.graphql';

export default {
  components: {
    GlCard,
    GlToggle,
    GlLink,
    GlSkeletonLoader,
  },
  apollo: {
    securityTrainingProviders: {
      query: securityTrainingProvidersQuery,
    },
  },
  data() {
    return {
      securityTrainingProviders: [],
    };
  },
  computed: {
    isLoading() {
      return this.$apollo.queries.securityTrainingProviders.loading;
    },
  },
};
</script>

<template>
  <div
    v-if="isLoading"
    class="gl-bg-white gl-py-6 gl-rounded-base gl-border-1 gl-border-solid gl-border-gray-100"
  >
    <gl-skeleton-loader :width="350" :height="44">
      <rect width="200" height="8" x="10" y="0" rx="4" />
      <rect width="300" height="8" x="10" y="15" rx="4" />
      <rect width="100" height="8" x="10" y="35" rx="4" />
    </gl-skeleton-loader>
  </div>
  <ul v-else class="gl-list-style-none gl-m-0 gl-p-0">
    <li
      v-for="{ id, isEnabled, name, description, url } in securityTrainingProviders"
      :key="id"
      class="gl-mb-6"
    >
      <gl-card>
        <div class="gl-display-flex">
          <gl-toggle :value="isEnabled" :label="__('Training mode')" label-position="hidden" />
          <div class="gl-ml-5">
            <h3 class="gl-font-lg gl-m-0 gl-mb-2">{{ name }}</h3>
            <p>
              {{ description }}
              <gl-link :href="url" target="_blank">{{ __('Learn more.') }}</gl-link>
            </p>
          </div>
        </div>
      </gl-card>
    </li>
  </ul>
</template>