2017-09-10 17:25:29 +05:30
|
|
|
module Gitlab
|
|
|
|
module Prometheus
|
|
|
|
module Queries
|
|
|
|
class AdditionalMetricsEnvironmentQuery < BaseQuery
|
|
|
|
include QueryAdditionalMetrics
|
|
|
|
|
|
|
|
def query(environment_id)
|
|
|
|
::Environment.find_by(id: environment_id).try do |environment|
|
|
|
|
query_metrics(
|
2018-03-27 19:54:05 +05:30
|
|
|
environment.project,
|
2017-09-10 17:25:29 +05:30
|
|
|
common_query_context(environment, timeframe_start: 8.hours.ago.to_f, timeframe_end: Time.now.to_f)
|
|
|
|
)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|