diff --git a/app/views/clusters/clusters/show.html.haml b/app/views/clusters/clusters/show.html.haml
index d1cb0f185dbeceab690b625d899f75d794dee2a9..68d9510e1bf75cd0d4101907d3af9aa3ac67c452 100644
--- a/app/views/clusters/clusters/show.html.haml
+++ b/app/views/clusters/clusters/show.html.haml
@@ -34,9 +34,7 @@
= render 'banner'
= render 'form'
- -# EE-specific
- - if @cluster.project_type? && @cluster.project.feature_available?(:cluster_health)
- = render 'health'
+ = render_if_exists 'health'
.cluster-applications-table#js-cluster-applications
diff --git a/ee/app/views/projects/clusters/_health.html.haml b/ee/app/views/projects/clusters/_health.html.haml
index e7985e2192adda8cb4bd9804f1c5378d454d9c5a..6a5c7021ebd21cfa021b7189dda9cfd2d50545df 100644
--- a/ee/app/views/projects/clusters/_health.html.haml
+++ b/ee/app/views/projects/clusters/_health.html.haml
@@ -1,17 +1,18 @@
-%section.settings.no-animate.expanded.cluster-health-graphs#cluster-health
- %h4= s_('ClusterIntegration|Cluster health')
+- if @cluster.project_type? && @cluster.project.feature_available?(:cluster_health)
+ %section.settings.no-animate.expanded.cluster-health-graphs#cluster-health
+ %h4= s_('ClusterIntegration|Cluster health')
- - if @cluster&.application_prometheus_available?
- #prometheus-graphs{ data: { "settings-path": edit_project_service_path(@project, 'prometheus'),
- "clusters-path": project_clusters_path(@project),
- "documentation-path": help_page_path('administration/monitoring/prometheus/index.md'),
- "empty-getting-started-svg-path": image_path('illustrations/monitoring/getting_started.svg'),
- "empty-loading-svg-path": image_path('illustrations/monitoring/loading.svg'),
- "empty-no-data-svg-path": image_path('illustrations/monitoring/no_data.svg'),
- "empty-unable-to-connect-svg-path": image_path('illustrations/monitoring/unable_to_connect.svg'),
- "metrics-endpoint": metrics_namespace_project_cluster_path( format: :json ),
- "project-path": project_path(@project),
- "tags-path": project_tags_path(@project) } }
+ - if @cluster&.application_prometheus_available?
+ #prometheus-graphs{ data: { "settings-path": edit_project_service_path(@project, 'prometheus'),
+ "clusters-path": project_clusters_path(@project),
+ "documentation-path": help_page_path('administration/monitoring/prometheus/index.md'),
+ "empty-getting-started-svg-path": image_path('illustrations/monitoring/getting_started.svg'),
+ "empty-loading-svg-path": image_path('illustrations/monitoring/loading.svg'),
+ "empty-no-data-svg-path": image_path('illustrations/monitoring/no_data.svg'),
+ "empty-unable-to-connect-svg-path": image_path('illustrations/monitoring/unable_to_connect.svg'),
+ "metrics-endpoint": metrics_namespace_project_cluster_path( format: :json ),
+ "project-path": project_path(@project),
+ "tags-path": project_tags_path(@project) } }
- - else
- %p.settings-message.text-center= s_("ClusterIntegration|In order to view the health of your cluster, you must first install Prometheus below.")
+ - else
+ %p.settings-message.text-center= s_("ClusterIntegration|In order to view the health of your cluster, you must first install Prometheus below.")