summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/merge_request_tabs.js
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2019-09-11 09:06:33 +0000
committerKushal Pandya <kushalspandya@gmail.com>2019-09-11 09:06:33 +0000
commit48b98b5898e15ab4bb1db47e201fef8db68dc34d (patch)
tree70edcf4953d88d542243fe1d288ff249c02c9d9f /app/assets/javascripts/merge_request_tabs.js
parentbfaa96d586668678893e295062495f2c35b73c2a (diff)
downloadgitlab-ce-48b98b5898e15ab4bb1db47e201fef8db68dc34d.tar.gz
Enables Run Pipeline button to be rendered
In the Merge Request view, under pipelines tab the user can see a run pipeline button Adds axios post request to button click Adds the logic to handle the user click, refresh the table and disable the button while thee request is being made Updates UI for desktop and mobile Adds specs Regenerates potfile Follow-up after review Uses .finally to avoid code repetition
Diffstat (limited to 'app/assets/javascripts/merge_request_tabs.js')
-rw-r--r--app/assets/javascripts/merge_request_tabs.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/assets/javascripts/merge_request_tabs.js b/app/assets/javascripts/merge_request_tabs.js
index b6868e63716..52674107df2 100644
--- a/app/assets/javascripts/merge_request_tabs.js
+++ b/app/assets/javascripts/merge_request_tabs.js
@@ -333,7 +333,8 @@ export default class MergeRequestTabs {
mountPipelinesView() {
const pipelineTableViewEl = document.querySelector('#commit-pipeline-table-view');
- const { CommitPipelinesTable } = gl;
+ const { CommitPipelinesTable, mrWidgetData } = gl;
+
this.commitPipelinesTable = new CommitPipelinesTable({
propsData: {
endpoint: pipelineTableViewEl.dataset.endpoint,
@@ -341,6 +342,9 @@ export default class MergeRequestTabs {
emptyStateSvgPath: pipelineTableViewEl.dataset.emptyStateSvgPath,
errorStateSvgPath: pipelineTableViewEl.dataset.errorStateSvgPath,
autoDevopsHelpPath: pipelineTableViewEl.dataset.helpAutoDevopsPath,
+ canRunPipeline: true,
+ projectId: pipelineTableViewEl.dataset.projectId,
+ mergeRequestId: mrWidgetData ? mrWidgetData.iid : null,
},
}).$mount();