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/predefined_dashboard_service.rb')
-rw-r--r--app/services/metrics/dashboard/predefined_dashboard_service.rb15
1 files changed, 12 insertions, 3 deletions
diff --git a/app/services/metrics/dashboard/predefined_dashboard_service.rb b/app/services/metrics/dashboard/predefined_dashboard_service.rb
index f454df63773..c21083475f0 100644
--- a/app/services/metrics/dashboard/predefined_dashboard_service.rb
+++ b/app/services/metrics/dashboard/predefined_dashboard_service.rb
@@ -10,7 +10,8 @@ module Metrics
DASHBOARD_NAME = nil
SEQUENCE = [
- STAGES::EndpointInserter,
+ STAGES::MetricEndpointInserter,
+ STAGES::VariableEndpointInserter,
STAGES::PanelIdsInserter,
STAGES::Sorter
].freeze
@@ -23,12 +24,20 @@ module Metrics
def matching_dashboard?(filepath)
filepath == self::DASHBOARD_PATH
end
+
+ def out_of_the_box_dashboard?
+ true
+ end
end
private
+ def dashboard_version
+ raise NotImplementedError
+ end
+
def cache_key
- "metrics_dashboard_#{dashboard_path}"
+ "metrics_dashboard_#{dashboard_path}_#{dashboard_version}"
end
def dashboard_path
@@ -39,7 +48,7 @@ module Metrics
def get_raw_dashboard
yml = File.read(Rails.root.join(dashboard_path))
- YAML.safe_load(yml)
+ load_yaml(yml)
end
def sequence