diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-21 15:11:29 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-21 15:11:29 +0300 |
commit | 559b1da28e46a9969315beb11ee2d2056f75b06d (patch) | |
tree | fad20c706047f4aca44c1f030cb81d5b1e302cab /app/assets/javascripts/ci/runner/runner_edit/index.js | |
parent | a065770457b66dc856897fc5282bf897b9e4f65b (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/ci/runner/runner_edit/index.js')
-rw-r--r-- | app/assets/javascripts/ci/runner/runner_edit/index.js | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/app/assets/javascripts/ci/runner/runner_edit/index.js b/app/assets/javascripts/ci/runner/runner_edit/index.js new file mode 100644 index 00000000000..5b2ddb8f68e --- /dev/null +++ b/app/assets/javascripts/ci/runner/runner_edit/index.js @@ -0,0 +1,33 @@ +import Vue from 'vue'; +import VueApollo from 'vue-apollo'; +import createDefaultClient from '~/lib/graphql'; +import RunnerEditApp from './runner_edit_app.vue'; + +Vue.use(VueApollo); + +export const initRunnerEdit = (selector) => { + const el = document.querySelector(selector); + + if (!el) { + return null; + } + + const { runnerId, runnerPath } = el.dataset; + + const apolloProvider = new VueApollo({ + defaultClient: createDefaultClient(), + }); + + return new Vue({ + el, + apolloProvider, + render(h) { + return h(RunnerEditApp, { + props: { + runnerId, + runnerPath, + }, + }); + }, + }); +}; |