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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-11-03 18:09:05 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-11-03 18:09:05 +0300
commitff8eb438401fc82b883fc4ae69626f0035b69236 (patch)
tree044a7195c0338c2b31d55dd21a5638068a5722ea /app/models/analytics
parent2ac811ce685f906d3e54e78b23f61495c19ad595 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/analytics')
-rw-r--r--app/models/analytics/instance_statistics/measurement.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/analytics/instance_statistics/measurement.rb b/app/models/analytics/instance_statistics/measurement.rb
index a9b5393b39d..7446a28501e 100644
--- a/app/models/analytics/instance_statistics/measurement.rb
+++ b/app/models/analytics/instance_statistics/measurement.rb
@@ -36,6 +36,8 @@ module Analytics
scope :order_by_latest, -> { order(recorded_at: :desc) }
scope :with_identifier, -> (identifier) { where(identifier: identifier) }
+ scope :recorded_after, -> (date) { where(self.model.arel_table[:recorded_at].gteq(date)) if date.present? }
+ scope :recorded_before, -> (date) { where(self.model.arel_table[:recorded_at].lteq(date)) if date.present? }
def self.measurement_identifier_values
identifiers.values