diff options
author | Fatih Acet <acetfatih@gmail.com> | 2017-02-07 00:07:41 +0300 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2017-02-07 00:07:41 +0300 |
commit | 3a9228739019a7cee7cbcf4dd969e1b671119c93 (patch) | |
tree | 3b81ad12705f8719425bbc9b1a84f8bb4dbb63ca /app/controllers | |
parent | ee43dcd5d633f19b13a1d914a403686faec2bbca (diff) | |
parent | 183ff875f4e78e9cef4cc1d23630909527e334a2 (diff) |
Merge branch 'fe-commit-mr-pipelines' into 'master'
Use vue.js Pipelines table in commit and merge request view
Closes #27141
See merge request !8844
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects/commit_controller.rb | 1 | ||||
-rw-r--r-- | app/controllers/projects/merge_requests_controller.rb | 19 |
2 files changed, 11 insertions, 9 deletions
diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb index b5a7078a3a1..f880a9862c6 100644 --- a/app/controllers/projects/commit_controller.rb +++ b/app/controllers/projects/commit_controller.rb @@ -37,7 +37,6 @@ class Projects::CommitController < Projects::ApplicationController format.json do render json: PipelineSerializer .new(project: @project, user: @current_user) - .with_pagination(request, response) .represent(@pipelines) end end diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb index 6eb542e4bd8..38a1946a71e 100644 --- a/app/controllers/projects/merge_requests_controller.rb +++ b/app/controllers/projects/merge_requests_controller.rb @@ -216,19 +216,22 @@ class Projects::MergeRequestsController < Projects::ApplicationController end format.json do - render json: { - html: view_to_html_string('projects/merge_requests/show/_pipelines'), - pipelines: PipelineSerializer - .new(project: @project, user: @current_user) - .with_pagination(request, response) - .represent(@pipelines) - } + render json: PipelineSerializer + .new(project: @project, user: @current_user) + .represent(@pipelines) end end end def new - define_new_vars + respond_to do |format| + format.html { define_new_vars } + format.json do + render json: { pipelines: PipelineSerializer + .new(project: @project, user: @current_user) + .represent(@pipelines) } + end + end end def new_diffs |