Use correct `Environment`-class within `Gitlab` namespace
This commit is contained in:
parent
faabcbd3ae
commit
fda83a6179
|
|
@ -5,7 +5,7 @@ module Gitlab
|
|||
include QueryAdditionalMetrics
|
||||
|
||||
def query(environment_id)
|
||||
Environment.find_by(id: environment_id).try do |environment|
|
||||
::Environment.find_by(id: environment_id).try do |environment|
|
||||
query_metrics(
|
||||
common_query_context(environment, timeframe_start: 8.hours.ago.to_f, timeframe_end: Time.now.to_f)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ module Gitlab
|
|||
module Queries
|
||||
class EnvironmentQuery < BaseQuery
|
||||
def query(environment_id)
|
||||
Environment.find_by(id: environment_id).try do |environment|
|
||||
::Environment.find_by(id: environment_id).try do |environment|
|
||||
environment_slug = environment.slug
|
||||
timeframe_start = 8.hours.ago.to_f
|
||||
timeframe_end = Time.now.to_f
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ module Gitlab
|
|||
ci_pipeline_schedules: ::Ci::PipelineSchedule.count,
|
||||
deploy_keys: DeployKey.count,
|
||||
deployments: Deployment.count,
|
||||
environments: Environment.count,
|
||||
in_review_folder: Environment.in_review_folder.count,
|
||||
environments: ::Environment.count,
|
||||
in_review_folder: ::Environment.in_review_folder.count,
|
||||
groups: Group.count,
|
||||
issues: Issue.count,
|
||||
keys: Key.count,
|
||||
|
|
|
|||
Loading…
Reference in New Issue