diff options
Diffstat (limited to 'app/assets/javascripts/commit')
-rw-r--r-- | app/assets/javascripts/commit/pipelines/pipelines_bundle.js | 28 | ||||
-rw-r--r-- | app/assets/javascripts/commit/pipelines/pipelines_table.vue | 19 |
2 files changed, 23 insertions, 24 deletions
diff --git a/app/assets/javascripts/commit/pipelines/pipelines_bundle.js b/app/assets/javascripts/commit/pipelines/pipelines_bundle.js index 24033634aad..920ffde3e32 100644 --- a/app/assets/javascripts/commit/pipelines/pipelines_bundle.js +++ b/app/assets/javascripts/commit/pipelines/pipelines_bundle.js @@ -1,5 +1,5 @@ import Vue from 'vue'; -import commitPipelinesTable from './pipelines_table.vue'; +import CommitPipelinesTable from './pipelines_table.vue'; /** * Used in: @@ -8,14 +8,6 @@ import commitPipelinesTable from './pipelines_table.vue'; * - Merge Request details View > Pipelines Tab > Pipelines Table (projects:merge_requests:show) * - New Merge Request View > Pipelines Tab > Pipelines Table (projects:merge_requests:creations:new) */ - -const CommitPipelinesTable = Vue.extend(commitPipelinesTable); - -// export for use in merge_request_tabs.js (TODO: remove this hack when we understand how to load -// vue.js in merge_request_tabs.js) -window.gl = window.gl || {}; -window.gl.CommitPipelinesTable = CommitPipelinesTable; - export default () => { const pipelineTableViewEl = document.querySelector('#commit-pipeline-table-view'); @@ -34,13 +26,17 @@ export default () => { }); if (pipelineTableViewEl.dataset.disableInitialization === undefined) { - const table = new CommitPipelinesTable({ - propsData: { - endpoint: pipelineTableViewEl.dataset.endpoint, - helpPagePath: pipelineTableViewEl.dataset.helpPagePath, - emptyStateSvgPath: pipelineTableViewEl.dataset.emptyStateSvgPath, - errorStateSvgPath: pipelineTableViewEl.dataset.errorStateSvgPath, - autoDevopsHelpPath: pipelineTableViewEl.dataset.helpAutoDevopsPath, + const table = new Vue({ + render(createElement) { + return createElement(CommitPipelinesTable, { + props: { + endpoint: pipelineTableViewEl.dataset.endpoint, + helpPagePath: pipelineTableViewEl.dataset.helpPagePath, + emptyStateSvgPath: pipelineTableViewEl.dataset.emptyStateSvgPath, + errorStateSvgPath: pipelineTableViewEl.dataset.errorStateSvgPath, + autoDevopsHelpPath: pipelineTableViewEl.dataset.helpAutoDevopsPath, + }, + }); }, }).$mount(); pipelineTableViewEl.appendChild(table.$el); diff --git a/app/assets/javascripts/commit/pipelines/pipelines_table.vue b/app/assets/javascripts/commit/pipelines/pipelines_table.vue index fe32868e6d8..787152d00ef 100644 --- a/app/assets/javascripts/commit/pipelines/pipelines_table.vue +++ b/app/assets/javascripts/commit/pipelines/pipelines_table.vue @@ -1,22 +1,25 @@ <script> import { GlButton, GlLoadingIcon, GlModal, GlLink } from '@gitlab/ui'; +import { getParameterByName } from '~/lib/utils/common_utils'; +import SvgBlankState from '~/pipelines/components/pipelines_list/blank_state.vue'; +import PipelinesTableComponent from '~/pipelines/components/pipelines_list/pipelines_table.vue'; +import eventHub from '~/pipelines/event_hub'; +import PipelinesMixin from '~/pipelines/mixins/pipelines_mixin'; import PipelinesService from '~/pipelines/services/pipelines_service'; import PipelineStore from '~/pipelines/stores/pipelines_store'; -import pipelinesMixin from '~/pipelines/mixins/pipelines'; -import eventHub from '~/pipelines/event_hub'; import TablePagination from '~/vue_shared/components/pagination/table_pagination.vue'; -import { getParameterByName } from '~/lib/utils/common_utils'; -import CIPaginationMixin from '~/vue_shared/mixins/ci_pagination_api_mixin'; export default { components: { - TablePagination, GlButton, + GlLink, GlLoadingIcon, GlModal, - GlLink, + PipelinesTableComponent, + TablePagination, + SvgBlankState, }, - mixins: [pipelinesMixin, CIPaginationMixin], + mixins: [PipelinesMixin], props: { endpoint: { type: String, @@ -197,7 +200,7 @@ export default { <gl-button v-if="canRenderPipelineButton" block - class="gl-mt-3 gl-mb-0 gl-display-md-none" + class="gl-mt-3 gl-mb-0 gl-md-display-none" variant="success" data-testid="run_pipeline_button_mobile" :loading="state.isRunningMergeRequestPipeline" |