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:
Diffstat (limited to 'app/services/metrics/dashboard/default_embed_service.rb')
-rw-r--r--app/services/metrics/dashboard/default_embed_service.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/app/services/metrics/dashboard/default_embed_service.rb b/app/services/metrics/dashboard/default_embed_service.rb
index 8b01b44fc98..e1bd98bd5c2 100644
--- a/app/services/metrics/dashboard/default_embed_service.rb
+++ b/app/services/metrics/dashboard/default_embed_service.rb
@@ -1,9 +1,9 @@
# frozen_string_literal: true
# Responsible for returning a filtered system dashboard
-# containing only the default embedded metrics. In future,
-# this class may be updated to support filtering to
-# alternate metrics/panels.
+# containing only the default embedded metrics. This class
+# operates by selecting metrics directly from the system
+# dashboard.
#
# Why isn't this filtering in a processing stage? By filtering
# here, we ensure the dynamically-determined dashboard is cached.
@@ -11,7 +11,7 @@
# Use Gitlab::Metrics::Dashboard::Finder to retrive dashboards.
module Metrics
module Dashboard
- class DefaultEmbedService < ::Metrics::Dashboard::BaseService
+ class DefaultEmbedService < ::Metrics::Dashboard::BaseEmbedService
# For the default filtering for embedded metrics,
# uses the 'id' key in dashboard-yml definition for
# identification.
@@ -33,10 +33,6 @@ module Metrics
{ 'panel_groups' => [{ 'panels' => panels }] }
end
- def cache_key
- "dynamic_metrics_dashboard_#{metric_identifiers.join('_')}"
- end
-
private
# Returns an array of the panels groups on the
@@ -58,6 +54,10 @@ module Metrics
def metric_identifiers
DEFAULT_EMBEDDED_METRICS_IDENTIFIERS
end
+
+ def identifiers
+ metric_identifiers.join('|')
+ end
end
end
end