From 1186a6fd5408737f1995ac16ffc18f6aaf431cce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Cunha?= Date: Mon, 4 Mar 2019 10:08:53 +0000 Subject: Sends update route to the client - extends presenters to include update endpoint path - sends path to the client on clusters clusters show view. --- app/presenters/clusterable_presenter.rb | 4 ++++ app/presenters/group_clusterable_presenter.rb | 5 +++++ app/presenters/project_clusterable_presenter.rb | 5 +++++ 3 files changed, 14 insertions(+) (limited to 'app/presenters') diff --git a/app/presenters/clusterable_presenter.rb b/app/presenters/clusterable_presenter.rb index d94d9118eee..34bdf156623 100644 --- a/app/presenters/clusterable_presenter.rb +++ b/app/presenters/clusterable_presenter.rb @@ -44,6 +44,10 @@ class ClusterablePresenter < Gitlab::View::Presenter::Delegated raise NotImplementedError end + def update_applications_cluster_path(cluster, application) + raise NotImplementedError + end + def cluster_path(cluster, params = {}) raise NotImplementedError end diff --git a/app/presenters/group_clusterable_presenter.rb b/app/presenters/group_clusterable_presenter.rb index ef6bbc0d109..f5b0bb64487 100644 --- a/app/presenters/group_clusterable_presenter.rb +++ b/app/presenters/group_clusterable_presenter.rb @@ -14,6 +14,11 @@ class GroupClusterablePresenter < ClusterablePresenter install_applications_group_cluster_path(clusterable, cluster, application) end + override :update_applications_cluster_path + def update_applications_cluster_path(cluster, application) + update_applications_group_cluster_path(clusterable, cluster, application) + end + override :cluster_path def cluster_path(cluster, params = {}) group_cluster_path(clusterable, cluster, params) diff --git a/app/presenters/project_clusterable_presenter.rb b/app/presenters/project_clusterable_presenter.rb index 63e69b91b11..8661ee02b68 100644 --- a/app/presenters/project_clusterable_presenter.rb +++ b/app/presenters/project_clusterable_presenter.rb @@ -14,6 +14,11 @@ class ProjectClusterablePresenter < ClusterablePresenter install_applications_project_cluster_path(clusterable, cluster, application) end + override :update_applications_cluster_path + def update_applications_cluster_path(cluster, application) + update_applications_project_cluster_path(clusterable, cluster, application) + end + override :cluster_path def cluster_path(cluster, params = {}) project_cluster_path(clusterable, cluster, params) -- cgit v1.2.3