diff options
author | Thong Kuah <tkuah@gitlab.com> | 2018-11-01 13:39:01 +1300 |
---|---|---|
committer | Thong Kuah <tkuah@gitlab.com> | 2018-11-01 19:37:33 +1300 |
commit | 1a1fdf8efe1923ba781e978e858c009264020e72 (patch) | |
tree | df98af221d7a722e4c67db450b78a5488bff6a3c /app/presenters | |
parent | 28dabc67f4db8271ac20c0db458ae2c86a906eee (diff) | |
download | gitlab-ce-1a1fdf8efe1923ba781e978e858c009264020e72.tar.gz |
Resolve controller sharing concern
Use ClustersController as base while having Projects::ClustersController
to inform what `clusterable` is. Thanks @ayufan for the great suggestion
!
- View changes to work with new approach
- Fix javascript for new approach
- Fix feature specs for new approach
- Fix QA
Diffstat (limited to 'app/presenters')
-rw-r--r-- | app/presenters/project_clusterable_presenter.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/app/presenters/project_clusterable_presenter.rb b/app/presenters/project_clusterable_presenter.rb index f986b5584a3..bd149cdcc70 100644 --- a/app/presenters/project_clusterable_presenter.rb +++ b/app/presenters/project_clusterable_presenter.rb @@ -9,6 +9,26 @@ class ProjectClusterablePresenter < ClusterablePresenter new_project_cluster_path(clusterable) end + def create_user_clusters_path + create_user_project_clusters_path(clusterable) + end + + def create_gcp_clusters_path + create_gcp_project_clusters_path(clusterable) + end + + def cluster_status_cluster_path(cluster, params = {}) + cluster_status_project_cluster_path(clusterable, cluster, params) + end + + def install_applications_cluster_path(cluster, application) + install_applications_project_cluster_path(clusterable, cluster, application) + end + + def cluster_path(cluster, params = {}) + project_cluster_path(clusterable, cluster, params) + end + def clusterable_params { project_id: clusterable.to_param, namespace_id: clusterable.namespace.to_param } end |