diff options
Diffstat (limited to 'app/assets/javascripts/pages/import/bitbucket_server')
-rw-r--r-- | app/assets/javascripts/pages/import/bitbucket_server/status/components/bitbucket_server_status_table.vue | 30 | ||||
-rw-r--r-- | app/assets/javascripts/pages/import/bitbucket_server/status/index.js | 20 |
2 files changed, 50 insertions, 0 deletions
diff --git a/app/assets/javascripts/pages/import/bitbucket_server/status/components/bitbucket_server_status_table.vue b/app/assets/javascripts/pages/import/bitbucket_server/status/components/bitbucket_server_status_table.vue new file mode 100644 index 00000000000..e01c7b80e1a --- /dev/null +++ b/app/assets/javascripts/pages/import/bitbucket_server/status/components/bitbucket_server_status_table.vue @@ -0,0 +1,30 @@ +<script> +import { GlButton } from '@gitlab/ui'; +import BitbucketStatusTable from '~/import_projects/components/bitbucket_status_table.vue'; + +export default { + components: { + BitbucketStatusTable, + GlButton, + }, + props: { + providerTitle: { + type: String, + required: true, + }, + reconfigurePath: { + type: String, + required: true, + }, + }, +}; +</script> +<template> + <bitbucket-status-table :provider-title="providerTitle"> + <template #actions> + <gl-button variant="info" class="gl-ml-3" data-method="post" :href="reconfigurePath">{{ + __('Reconfigure') + }}</gl-button> + </template> + </bitbucket-status-table> +</template> diff --git a/app/assets/javascripts/pages/import/bitbucket_server/status/index.js b/app/assets/javascripts/pages/import/bitbucket_server/status/index.js new file mode 100644 index 00000000000..88455c9b7b9 --- /dev/null +++ b/app/assets/javascripts/pages/import/bitbucket_server/status/index.js @@ -0,0 +1,20 @@ +import Vue from 'vue'; +import { initStoreFromElement, initPropsFromElement } from '~/import_projects'; +import BitbucketServerStatusTable from './components/bitbucket_server_status_table.vue'; + +document.addEventListener('DOMContentLoaded', () => { + const mountElement = document.getElementById('import-projects-mount-element'); + if (!mountElement) return undefined; + + const store = initStoreFromElement(mountElement); + const props = initPropsFromElement(mountElement); + const { reconfigurePath } = mountElement.dataset; + + return new Vue({ + el: mountElement, + store, + render(createElement) { + return createElement(BitbucketServerStatusTable, { props: { ...props, reconfigurePath } }); + }, + }); +}); |