Commit b9bd0a86 authored by David Kim's avatar David Kim

Merge branch 'fix-predefined-metrics-dashboard-autoload' into 'master'

Fix preloaded dashboards when not eager loading

See merge request gitlab-org/gitlab!64691
parents c0a53132 98fbf785
...@@ -7,14 +7,9 @@ module Gitlab ...@@ -7,14 +7,9 @@ module Gitlab
module Metrics module Metrics
module Dashboard module Dashboard
class Finder class Finder
# Dashboards that should not be part of the list of all dashboards PREDEFINED_DASHBOARD_LIST = [
# displayed on the metrics dashboard page. ::Metrics::Dashboard::PodDashboardService,
PREDEFINED_DASHBOARD_EXCLUSION_LIST = [ ::Metrics::Dashboard::SystemDashboardService
# This dashboard is only useful in the self monitoring project.
::Metrics::Dashboard::SelfMonitoringDashboardService,
# This dashboard is displayed on the K8s cluster settings health page.
::Metrics::Dashboard::ClusterDashboardService
].freeze ].freeze
class << self class << self
...@@ -90,11 +85,7 @@ module Gitlab ...@@ -90,11 +85,7 @@ module Gitlab
return [self_monitoring_service] return [self_monitoring_service]
end end
predefined_dashboard_services PREDEFINED_DASHBOARD_LIST
end
def predefined_dashboard_services
::Metrics::Dashboard::PredefinedDashboardService.descendants - PREDEFINED_DASHBOARD_EXCLUSION_LIST
end end
def system_service def system_service
......
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