diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-14 18:08:05 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-14 18:08:05 +0300 |
commit | 3e764061b3209d4deee2a55851d5d564a9f19d8b (patch) | |
tree | 9b6bd5edff70694e9426a86c15f355dab3a2c06d /app/assets/javascripts/ml | |
parent | 363a1ea13879c755f9cd8018763d3a7bdf4bf1c7 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/ml')
-rw-r--r-- | app/assets/javascripts/ml/experiment_tracking/routes/candidates/show/index.js | 3 | ||||
-rw-r--r-- | app/assets/javascripts/ml/experiment_tracking/routes/candidates/show/ml_candidates_show.vue (renamed from app/assets/javascripts/ml/experiment_tracking/components/ml_candidate.vue) | 52 | ||||
-rw-r--r-- | app/assets/javascripts/ml/experiment_tracking/routes/candidates/show/translations.js | 11 |
3 files changed, 45 insertions, 21 deletions
diff --git a/app/assets/javascripts/ml/experiment_tracking/routes/candidates/show/index.js b/app/assets/javascripts/ml/experiment_tracking/routes/candidates/show/index.js new file mode 100644 index 00000000000..529bd6fe9f2 --- /dev/null +++ b/app/assets/javascripts/ml/experiment_tracking/routes/candidates/show/index.js @@ -0,0 +1,3 @@ +import MlCandidatesShow from './ml_candidates_show.vue'; + +export default MlCandidatesShow; diff --git a/app/assets/javascripts/ml/experiment_tracking/components/ml_candidate.vue b/app/assets/javascripts/ml/experiment_tracking/routes/candidates/show/ml_candidates_show.vue index d0c42905ee2..3c765de92a2 100644 --- a/app/assets/javascripts/ml/experiment_tracking/components/ml_candidate.vue +++ b/app/assets/javascripts/ml/experiment_tracking/routes/candidates/show/ml_candidates_show.vue @@ -1,11 +1,21 @@ <script> import { GlLink } from '@gitlab/ui'; -import { __ } from '~/locale'; import { FEATURE_NAME, FEATURE_FEEDBACK_ISSUE } from '~/ml/experiment_tracking/constants'; import IncubationAlert from '~/vue_shared/components/incubation/incubation_alert.vue'; +import { + TITLE_LABEL, + INFO_LABEL, + ID_LABEL, + STATUS_LABEL, + EXPERIMENT_LABEL, + ARTIFACTS_LABEL, + PARAMETERS_LABEL, + METRICS_LABEL, + METADATA_LABEL, +} from './translations'; export default { - name: 'MlCandidate', + name: 'MlCandidatesShow', components: { IncubationAlert, GlLink, @@ -17,29 +27,29 @@ export default { }, }, i18n: { - titleLabel: __('Model candidate details'), - infoLabel: __('Info'), - idLabel: __('ID'), - statusLabel: __('Status'), - experimentLabel: __('Experiment'), - artifactsLabel: __('Artifacts'), - parametersLabel: __('Parameters'), - metricsLabel: __('Metrics'), - metadataLabel: __('Metadata'), + TITLE_LABEL, + INFO_LABEL, + ID_LABEL, + STATUS_LABEL, + EXPERIMENT_LABEL, + ARTIFACTS_LABEL, + PARAMETERS_LABEL, + METRICS_LABEL, + METADATA_LABEL, }, computed: { sections() { return [ { - sectionName: this.$options.i18n.parametersLabel, + sectionName: this.$options.i18n.PARAMETERS_LABEL, sectionValues: this.candidate.params, }, { - sectionName: this.$options.i18n.metricsLabel, + sectionName: this.$options.i18n.METRICS_LABEL, sectionValues: this.candidate.metrics, }, { - sectionName: this.$options.i18n.metadataLabel, + sectionName: this.$options.i18n.METADATA_LABEL, sectionValues: this.candidate.metadata, }, ]; @@ -58,7 +68,7 @@ export default { /> <h3> - {{ $options.i18n.titleLabel }} + {{ $options.i18n.TITLE_LABEL }} </h3> <table class="candidate-details"> @@ -66,20 +76,20 @@ export default { <tr class="divider"></tr> <tr> - <td class="gl-text-secondary gl-font-weight-bold">{{ $options.i18n.infoLabel }}</td> - <td class="gl-font-weight-bold">{{ $options.i18n.idLabel }}</td> + <td class="gl-text-secondary gl-font-weight-bold">{{ $options.i18n.INFO_LABEL }}</td> + <td class="gl-font-weight-bold">{{ $options.i18n.ID_LABEL }}</td> <td>{{ candidate.info.iid }}</td> </tr> <tr> <td></td> - <td class="gl-font-weight-bold">{{ $options.i18n.statusLabel }}</td> + <td class="gl-font-weight-bold">{{ $options.i18n.STATUS_LABEL }}</td> <td>{{ candidate.info.status }}</td> </tr> <tr> <td></td> - <td class="gl-font-weight-bold">{{ $options.i18n.experimentLabel }}</td> + <td class="gl-font-weight-bold">{{ $options.i18n.EXPERIMENT_LABEL }}</td> <td> <gl-link :href="candidate.info.path_to_experiment">{{ candidate.info.experiment_name @@ -89,10 +99,10 @@ export default { <tr v-if="candidate.info.path_to_artifact"> <td></td> - <td class="gl-font-weight-bold">{{ $options.i18n.artifactsLabel }}</td> + <td class="gl-font-weight-bold">{{ $options.i18n.ARTIFACTS_LABEL }}</td> <td> <gl-link :href="candidate.info.path_to_artifact">{{ - $options.i18n.artifactsLabel + $options.i18n.ARTIFACTS_LABEL }}</gl-link> </td> </tr> diff --git a/app/assets/javascripts/ml/experiment_tracking/routes/candidates/show/translations.js b/app/assets/javascripts/ml/experiment_tracking/routes/candidates/show/translations.js new file mode 100644 index 00000000000..caad145873e --- /dev/null +++ b/app/assets/javascripts/ml/experiment_tracking/routes/candidates/show/translations.js @@ -0,0 +1,11 @@ +import { s__ } from '~/locale'; + +export const TITLE_LABEL = s__('MlExperimentTracking|Model candidate details'); +export const INFO_LABEL = s__('MlExperimentTracking|Info'); +export const ID_LABEL = s__('MlExperimentTracking|ID'); +export const STATUS_LABEL = s__('MlExperimentTracking|Status'); +export const EXPERIMENT_LABEL = s__('MlExperimentTracking|Experiment'); +export const ARTIFACTS_LABEL = s__('MlExperimentTracking|Artifacts'); +export const PARAMETERS_LABEL = s__('MlExperimentTracking|Parameters'); +export const METRICS_LABEL = s__('MlExperimentTracking|Metrics'); +export const METADATA_LABEL = s__('MlExperimentTracking|Metadata'); |