summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/jira_connect/index.js
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-08-19 09:08:42 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-08-19 09:08:42 +0000
commitb76ae638462ab0f673e5915986070518dd3f9ad3 (patch)
treebdab0533383b52873be0ec0eb4d3c66598ff8b91 /app/assets/javascripts/jira_connect/index.js
parent434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff)
downloadgitlab-ce-b76ae638462ab0f673e5915986070518dd3f9ad3.tar.gz
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'app/assets/javascripts/jira_connect/index.js')
-rw-r--r--app/assets/javascripts/jira_connect/index.js52
1 files changed, 0 insertions, 52 deletions
diff --git a/app/assets/javascripts/jira_connect/index.js b/app/assets/javascripts/jira_connect/index.js
deleted file mode 100644
index bc0d21c6c9a..00000000000
--- a/app/assets/javascripts/jira_connect/index.js
+++ /dev/null
@@ -1,52 +0,0 @@
-import '../webpack';
-
-import setConfigs from '@gitlab/ui/dist/config';
-import Vue from 'vue';
-import { getLocation, sizeToParent } from '~/jira_connect/utils';
-import GlFeatureFlagsPlugin from '~/vue_shared/gl_feature_flags_plugin';
-import Translate from '~/vue_shared/translate';
-
-import JiraConnectApp from './components/app.vue';
-import createStore from './store';
-
-const store = createStore();
-
-const updateSignInLinks = async () => {
- const location = await getLocation();
- Array.from(document.querySelectorAll('.js-jira-connect-sign-in')).forEach((el) => {
- const updatedLink = `${el.getAttribute('href')}?return_to=${location}`;
- el.setAttribute('href', updatedLink);
- });
-};
-
-export async function initJiraConnect() {
- await updateSignInLinks();
-
- const el = document.querySelector('.js-jira-connect-app');
- if (!el) {
- return null;
- }
-
- setConfigs();
- Vue.use(Translate);
- Vue.use(GlFeatureFlagsPlugin);
-
- const { groupsPath, subscriptions, subscriptionsPath, usersPath } = el.dataset;
- sizeToParent();
-
- return new Vue({
- el,
- store,
- provide: {
- groupsPath,
- subscriptions: JSON.parse(subscriptions),
- subscriptionsPath,
- usersPath,
- },
- render(createElement) {
- return createElement(JiraConnectApp);
- },
- });
-}
-
-document.addEventListener('DOMContentLoaded', initJiraConnect);