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-06-03 12:08:47 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-03 12:08:47 +0300
commit31a432e38a8b70d3ffb16afa8d7cfeee4f5f5921 (patch)
treeb59f8b4e2ef7486f13adb01328a749f19b93a023 /app/models/performance_monitoring
parent6b7b853dff4cb7e72d76bd501d75708111c95585 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/performance_monitoring')
-rw-r--r--app/models/performance_monitoring/prometheus_dashboard.rb2
-rw-r--r--app/models/performance_monitoring/prometheus_panel.rb2
-rw-r--r--app/models/performance_monitoring/prometheus_panel_group.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/app/models/performance_monitoring/prometheus_dashboard.rb b/app/models/performance_monitoring/prometheus_dashboard.rb
index 4ebab341750..d2d477c868b 100644
--- a/app/models/performance_monitoring/prometheus_dashboard.rb
+++ b/app/models/performance_monitoring/prometheus_dashboard.rb
@@ -13,7 +13,7 @@ module PerformanceMonitoring
def from_json(json_content)
dashboard = new(
dashboard: json_content['dashboard'],
- panel_groups: json_content['panel_groups'].map { |group| PrometheusPanelGroup.from_json(group) }
+ panel_groups: json_content['panel_groups']&.map { |group| PrometheusPanelGroup.from_json(group) }
)
dashboard.tap(&:validate!)
diff --git a/app/models/performance_monitoring/prometheus_panel.rb b/app/models/performance_monitoring/prometheus_panel.rb
index 3fe029abda0..4ea62e901b4 100644
--- a/app/models/performance_monitoring/prometheus_panel.rb
+++ b/app/models/performance_monitoring/prometheus_panel.rb
@@ -15,7 +15,7 @@ module PerformanceMonitoring
title: json_content['title'],
y_label: json_content['y_label'],
weight: json_content['weight'],
- metrics: json_content['metrics'].map { |metric| PrometheusMetric.from_json(metric) }
+ metrics: json_content['metrics']&.map { |metric| PrometheusMetric.from_json(metric) }
)
panel.tap(&:validate!)
diff --git a/app/models/performance_monitoring/prometheus_panel_group.rb b/app/models/performance_monitoring/prometheus_panel_group.rb
index e672545fce3..72991ccb5ab 100644
--- a/app/models/performance_monitoring/prometheus_panel_group.rb
+++ b/app/models/performance_monitoring/prometheus_panel_group.rb
@@ -13,7 +13,7 @@ module PerformanceMonitoring
panel_group = new(
group: json_content['group'],
priority: json_content['priority'],
- panels: json_content['panels'].map { |panel| PrometheusPanel.from_json(panel) }
+ panels: json_content['panels']&.map { |panel| PrometheusPanel.from_json(panel) }
)
panel_group.tap(&:validate!)