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

index.js « show « experiments « ml « projects « pages « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 97e436920c79b96eb8a83ce313c64d7fed643ae2 (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
import Vue from 'vue';
import MlExperiment from '~/ml/experiment_tracking/components/ml_experiment.vue';

const initShowExperiment = () => {
  const element = document.querySelector('#js-show-ml-experiment');
  if (!element) {
    return;
  }

  const container = document.createElement('div');
  element.appendChild(container);

  const candidates = JSON.parse(element.dataset.candidates);
  const metricNames = JSON.parse(element.dataset.metrics);
  const paramNames = JSON.parse(element.dataset.params);

  // eslint-disable-next-line no-new
  new Vue({
    el: container,
    provide: {
      candidates,
      metricNames,
      paramNames,
    },
    render(h) {
      return h(MlExperiment);
    },
  });
};

initShowExperiment();