diff options
Diffstat (limited to 'app/presenters/clusterable_presenter.rb')
-rw-r--r-- | app/presenters/clusterable_presenter.rb | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/app/presenters/clusterable_presenter.rb b/app/presenters/clusterable_presenter.rb index 5e669ff2e50..efb3cf7f348 100644 --- a/app/presenters/clusterable_presenter.rb +++ b/app/presenters/clusterable_presenter.rb @@ -13,8 +13,7 @@ class ClusterablePresenter < Gitlab::View::Presenter::Delegated end def can_add_cluster? - can?(current_user, :add_cluster, clusterable) && - (has_no_clusters? || multiple_clusters_available?) + can?(current_user, :add_cluster, clusterable) end def can_create_cluster? @@ -65,7 +64,11 @@ class ClusterablePresenter < Gitlab::View::Presenter::Delegated raise NotImplementedError end - # Will be overidden in EE + def metrics_dashboard_path(cluster) + raise NotImplementedError + end + + # Will be overridden in EE def environments_cluster_path(cluster) nil end @@ -81,17 +84,6 @@ class ClusterablePresenter < Gitlab::View::Presenter::Delegated def learn_more_link raise NotImplementedError end - - private - - # Overridden on EE module - def multiple_clusters_available? - false - end - - def has_no_clusters? - clusterable.clusters.empty? - end end ClusterablePresenter.prepend_if_ee('EE::ClusterablePresenter') |