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

model_version_detail.vue « components « model_registry « ml « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8d3e8cf2023cc8771c605291131edb89957a062a (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 { convertToGraphQLId } from '~/graphql_shared/utils';
import { TYPENAME_PACKAGES_PACKAGE } from '~/graphql_shared/constants';
import * as i18n from '../translations';
import CandidateDetail from './candidate_detail.vue';

export default {
  name: 'ModelVersionDetail',
  components: {
    PackageFiles: () =>
      import('~/packages_and_registries/package_registry/components/details/package_files.vue'),
    CandidateDetail,
  },
  props: {
    modelVersion: {
      type: Object,
      required: true,
    },
  },
  computed: {
    packageId() {
      return convertToGraphQLId(TYPENAME_PACKAGES_PACKAGE, this.modelVersion.packageId);
    },
    projectPath() {
      return this.modelVersion.projectPath;
    },
    packageType() {
      return 'ml_model';
    },
  },
  i18n,
};
</script>

<template>
  <div>
    <h3 class="gl-font-lg gl-mt-5">{{ $options.i18n.DESCRIPTION_LABEL }}</h3>

    <div v-if="modelVersion.description">
      {{ modelVersion.description }}
    </div>
    <div v-else class="gl-text-secondary">
      {{ $options.i18n.NO_DESCRIPTION_PROVIDED_LABEL }}
    </div>

    <template v-if="modelVersion.packageId">
      <package-files
        :package-id="packageId"
        :project-path="projectPath"
        :package-type="packageType"
      />
    </template>

    <div class="gl-mt-5">
      <span class="gl-font-weight-bold">{{ $options.i18n.MLFLOW_ID_LABEL }}:</span>
      {{ modelVersion.candidate.info.eid }}
    </div>

    <candidate-detail :candidate="modelVersion.candidate" :show-info-section="false" />
  </div>
</template>