Class: Projects::Environments::SampleMetricsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/projects/environments/sample_metrics_controller.rb

Instance Method Summary collapse

Instance Method Details

#queryObject


4
5
6
7
8
9
10
11
12
# File 'app/controllers/projects/environments/sample_metrics_controller.rb', line 4

def query
  result = Metrics::SampleMetricsService.new(params[:identifier], range_start: params[:start], range_end: params[:end]).query

  if result
    render json: { "status": "success", "data": { "resultType": "matrix", "result": result } }
  else
    render_404
  end
end