diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-05 19:20:45 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-05 19:20:45 +0300 |
commit | d298fad0c0564454271cba11e6f20c19681534ac (patch) | |
tree | 0a19d07d8b3bdd2574617305c300e404f2ace581 /app/assets/javascripts/pages/shared | |
parent | c9f9eec79cab801a50db698f682aacffbedf07f7 (diff) |
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc41
Diffstat (limited to 'app/assets/javascripts/pages/shared')
-rw-r--r-- | app/assets/javascripts/pages/shared/mount_runner_instructions.js | 32 | ||||
-rw-r--r-- | app/assets/javascripts/pages/shared/wikis/index.js | 2 |
2 files changed, 33 insertions, 1 deletions
diff --git a/app/assets/javascripts/pages/shared/mount_runner_instructions.js b/app/assets/javascripts/pages/shared/mount_runner_instructions.js new file mode 100644 index 00000000000..51028e585b8 --- /dev/null +++ b/app/assets/javascripts/pages/shared/mount_runner_instructions.js @@ -0,0 +1,32 @@ +import Vue from 'vue'; +import VueApollo from 'vue-apollo'; +import createDefaultClient from '~/lib/graphql'; +import InstallRunnerInstructions from '~/vue_shared/components/runner_instructions/runner_instructions.vue'; + +Vue.use(VueApollo); + +export function initInstallRunner(componentId = 'js-install-runner') { + const installRunnerEl = document.getElementById(componentId); + + if (installRunnerEl) { + const defaultClient = createDefaultClient(); + const { projectPath, groupPath } = installRunnerEl.dataset; + + const apolloProvider = new VueApollo({ + defaultClient, + }); + + // eslint-disable-next-line no-new + new Vue({ + el: installRunnerEl, + apolloProvider, + provide: { + projectPath, + groupPath, + }, + render(createElement) { + return createElement(InstallRunnerInstructions); + }, + }); + } +} diff --git a/app/assets/javascripts/pages/shared/wikis/index.js b/app/assets/javascripts/pages/shared/wikis/index.js index 5e23b9bab4e..0679686110d 100644 --- a/app/assets/javascripts/pages/shared/wikis/index.js +++ b/app/assets/javascripts/pages/shared/wikis/index.js @@ -3,9 +3,9 @@ import Vue from 'vue'; import Translate from '~/vue_shared/translate'; import csrf from '~/lib/utils/csrf'; import ShortcutsWiki from '~/behaviors/shortcuts/shortcuts_wiki'; -import Wikis from './wikis'; import ZenMode from '../../../zen_mode'; import GLForm from '../../../gl_form'; +import Wikis from './wikis'; import deleteWikiModal from './components/delete_wiki_modal.vue'; export default () => { |