2020-01-01 13:55:28 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class Projects::Environments::SampleMetricsController < Projects::ApplicationController
|
2021-01-03 14:25:43 +05:30
|
|
|
feature_category :metrics
|
2022-07-23 23:45:48 +05:30
|
|
|
urgency :low
|
2021-01-03 14:25:43 +05:30
|
|
|
|
2020-01-01 13:55:28 +05:30
|
|
|
def query
|
2020-03-13 15:44:24 +05:30
|
|
|
result = Metrics::SampleMetricsService.new(params[:identifier], range_start: params[:start], range_end: params[:end]).query
|
2020-01-01 13:55:28 +05:30
|
|
|
|
|
|
|
if result
|
|
|
|
render json: { "status": "success", "data": { "resultType": "matrix", "result": result } }
|
|
|
|
else
|
|
|
|
render_404
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|