blob: c1acef5ac136f9404b4aea2cec64236ef02c2420 (
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
|
import Vue from 'vue';
import MlCandidate from '~/ml/experiment_tracking/components/ml_candidate.vue';
const initShowCandidate = () => {
const element = document.querySelector('#js-show-ml-candidate');
if (!element) {
return;
}
const container = document.createElement('div');
element.appendChild(container);
const candidate = JSON.parse(element.dataset.candidate);
// eslint-disable-next-line no-new
new Vue({
el: container,
provide: {
candidate,
},
render(h) {
return h(MlCandidate);
},
});
};
initShowCandidate();
|