Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-05-02 00:56:33 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2018-05-02 01:05:03 +0300
commit6ea31cb7cd905e61508a0fcdd0b1a61fe758c8ba (patch)
treee3923a01ed715223da887844d4bfc6a09f60bc97 /app/controllers/projects/pipelines_controller.rb
parentf7dccbb7ddb7c9a93b934f4452f52abd3ec8e0e7 (diff)
Add stages_ajax endpoint to serve old HTML
Diffstat (limited to 'app/controllers/projects/pipelines_controller.rb')
-rw-r--r--app/controllers/projects/pipelines_controller.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/controllers/projects/pipelines_controller.rb b/app/controllers/projects/pipelines_controller.rb
index 160613ea5dc..d15f722caff 100644
--- a/app/controllers/projects/pipelines_controller.rb
+++ b/app/controllers/projects/pipelines_controller.rb
@@ -109,6 +109,15 @@ class Projects::PipelinesController < Projects::ApplicationController
.represent(@stage, details: true)
end
+ # TODO: This endpoint is used by mini-pipeline-graph
+ # TODO: This endpoint should be migrated to `stage.json`
+ def stage_ajax
+ @stage = pipeline.legacy_stage(params[:stage])
+ return not_found unless @stage
+
+ render json: { html: view_to_html_string('projects/pipelines/_stage')) }
+ end
+
def retry
pipeline.retry_failed(current_user)