2019-04-02 06:26:09 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class Projects::Environments::PrometheusApiController < Projects::ApplicationController
|
2020-07-03 00:09:23 +00:00
|
|
|
include Metrics::Dashboard::PrometheusApiProxy
|
2019-10-10 12:06:19 +00:00
|
|
|
|
2020-07-03 00:09:23 +00:00
|
|
|
before_action :proxyable
|
2019-04-02 06:26:09 +00:00
|
|
|
|
|
|
|
private
|
|
|
|
|
2020-07-03 00:09:23 +00:00
|
|
|
def proxyable
|
|
|
|
@proxyable ||= project.environments.find(params[:id])
|
2019-04-02 06:26:09 +00:00
|
|
|
end
|
2019-04-15 15:31:59 +00:00
|
|
|
|
2020-07-03 00:09:23 +00:00
|
|
|
def proxy_variable_substitution_service
|
|
|
|
Prometheus::ProxyVariableSubstitutionService
|
2019-04-15 15:31:59 +00:00
|
|
|
end
|
2019-04-02 06:26:09 +00:00
|
|
|
end
|