2019-04-02 02:26:09 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class Projects::Environments::PrometheusApiController < Projects::ApplicationController
|
2020-07-02 20:09:23 -04:00
|
|
|
include Metrics::Dashboard::PrometheusApiProxy
|
2019-10-10 08:06:19 -04:00
|
|
|
|
2020-07-02 20:09:23 -04:00
|
|
|
before_action :proxyable
|
2019-04-02 02:26:09 -04:00
|
|
|
|
2020-10-08 14:08:32 -04:00
|
|
|
feature_category :metrics
|
2022-05-20 11:09:10 -04:00
|
|
|
urgency :low
|
2020-10-08 14:08:32 -04:00
|
|
|
|
2019-04-02 02:26:09 -04:00
|
|
|
private
|
|
|
|
|
2020-07-02 20:09:23 -04:00
|
|
|
def proxyable
|
|
|
|
@proxyable ||= project.environments.find(params[:id])
|
2019-04-02 02:26:09 -04:00
|
|
|
end
|
2019-04-15 11:31:59 -04:00
|
|
|
|
2020-07-02 20:09:23 -04:00
|
|
|
def proxy_variable_substitution_service
|
2021-06-18 11:10:16 -04:00
|
|
|
::Prometheus::ProxyVariableSubstitutionService
|
2019-04-15 11:31:59 -04:00
|
|
|
end
|
2019-04-02 02:26:09 -04:00
|
|
|
end
|