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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/ci/runner/runner_edit/index.js')
-rw-r--r--app/assets/javascripts/ci/runner/runner_edit/index.js33
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,
+ },
+ });
+ },
+ });
+};