summaryrefslogtreecommitdiff
path: root/app/controllers/projects/environments
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-16 21:08:00 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-16 21:08:00 +0000
commit69d6d3ca2013e97cfd2d89449669ea7bf475f4e9 (patch)
tree2cc4227ebfc52b7603691f06b0b8e09e030e8428 /app/controllers/projects/environments
parent01fdcf49b1553c22ae116fe96cedd7b91d02225c (diff)
downloadgitlab-ce-69d6d3ca2013e97cfd2d89449669ea7bf475f4e9.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/projects/environments')
-rw-r--r--app/controllers/projects/environments/sample_metrics_controller.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/controllers/projects/environments/sample_metrics_controller.rb b/app/controllers/projects/environments/sample_metrics_controller.rb
new file mode 100644
index 00000000000..79a7eab150b
--- /dev/null
+++ b/app/controllers/projects/environments/sample_metrics_controller.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class Projects::Environments::SampleMetricsController < Projects::ApplicationController
+ def query
+ result = Metrics::SampleMetricsService.new(params[:identifier]).query
+
+ if result
+ render json: { "status": "success", "data": { "resultType": "matrix", "result": result } }
+ else
+ render_404
+ end
+ end
+end