Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyasonik <syasonik@gitlab.com>2019-03-15 14:20:59 +0300
committersyasonik <syasonik@gitlab.com>2019-04-03 12:21:56 +0300
commitab1e1b55a84ffc6b09233a6831be9bdc77c05115 (patch)
treedd59f2fd052b1112429580855536faa59855972a /app/models/concerns/prometheus_adapter.rb
parent478077747da82a3dfaafbebc1797b26b965b030f (diff)
Specify time window for additional metrics api
Adds support for start and end parameters in the #additional_metrics endpoint of the EnvironmentsController. start and end are meant to be unix timestamps, per the Prometheus API (as the consumer of this endpoint will eventually be transitioned to a prometheus endpoint). This functionality is behind the :metrics_time_window feature flag for development.
Diffstat (limited to 'app/models/concerns/prometheus_adapter.rb')
-rw-r--r--app/models/concerns/prometheus_adapter.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/concerns/prometheus_adapter.rb b/app/models/concerns/prometheus_adapter.rb
index a29e80fe0c1..decbbbd87f2 100644
--- a/app/models/concerns/prometheus_adapter.rb
+++ b/app/models/concerns/prometheus_adapter.rb
@@ -51,7 +51,7 @@ module PrometheusAdapter
end
def build_query_args(*args)
- args.map(&:id)
+ args.map { |arg| arg.respond_to?(:id) ? arg.id : arg }
end
end
end