diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-03 12:08:47 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-03 12:08:47 +0300 |
commit | 31a432e38a8b70d3ffb16afa8d7cfeee4f5f5921 (patch) | |
tree | b59f8b4e2ef7486f13adb01328a749f19b93a023 /app/models/performance_monitoring | |
parent | 6b7b853dff4cb7e72d76bd501d75708111c95585 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/performance_monitoring')
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!) |