Commit 2de542f0 authored by alinamihaila's avatar alinamihaila

Use clusters_user_distinct_count method

parent 562f4fb6
......@@ -257,7 +257,7 @@ module EE
def usage_activity_by_stage_monitor(time_period)
{
clusters: distinct_count(::Clusters::Cluster.where(time_period), :user_id),
clusters_applications_prometheus: distinct_count(::Clusters::Applications::Prometheus.where(time_period).available.joins(:cluster), 'clusters.user_id'),
clusters_applications_prometheus: clusters_user_distinct_count(::Clusters::Applications::Prometheus, time_period),
operations_dashboard_default_dashboard: count(::User.active.with_dashboard('operations').where(time_period)),
operations_dashboard_users_with_projects_added: distinct_count(UsersOpsDashboardProject.joins(:user).merge(::User.active).where(time_period), :user_id),
projects_prometheus_active: distinct_count(::Project.with_active_prometheus_service.where(time_period), :creator_id),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment