Commit graph

8 commits

Author SHA1 Message Date
Mayra Cabrera
01ed3a1511 Allow users to add cluster with ancestors
Include a new policy in Clusterables
(projects and groups), which checks if another cluster
can be added

clusterable_has_cluster? and multiple_clusters_available
private methods will be overriden in EE

Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/34758
2018-12-24 10:28:40 -06:00
Thong Kuah
ecb4a29fc0 Reverse view override as EE has an override too
Use presenters instead otherwise we will have x2 overides in EE
2018-11-08 23:28:30 +13:00
Thong Kuah
b019224ff2 Refactor to use presenter
Refacotr project or group specific `if` logic to be contained within
each presenter instead.

Also add :override to ensure super method exists.
2018-11-08 23:28:30 +13:00
Mike Greiling
83b8321aea Rename is_project? to project? 2018-11-08 23:28:30 +13:00
Mike Greiling
1dba5dbc3a Update empty state for group clusters index 2018-11-08 23:28:30 +13:00
Thong Kuah
fec21f5542 Use polymorphic_paths where we can
To reduce the number of abstract methods, use polymorphic_paths for
collection routes. Unfortunately for member routes, polymorphic_paths
does not support namespaced classes, so still continue to override
methods.
2018-11-02 10:41:53 +13:00
Thong Kuah
3e7d483173 Add missing specs for Presenter
Also add missing interface in abstract class.
2018-11-02 09:49:52 +13:00
Thong Kuah
1163b23539 Move view and path concerns to presenters
- Move show path for cluster to ClusterPresenter

- Create ClusterablePresenter to encapsulate logic. Consolidates
scattered methods from BaseController and ClustersHelper into an object.
2018-11-01 19:37:32 +13:00