We introduced hidden_clusterable_fields in this MR but it is no longer
needed as we have gone back to nested resource routes which should
provide the params such as `project_id`.
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
- Move show path for cluster to ClusterPresenter
- Create ClusterablePresenter to encapsulate logic. Consolidates
scattered methods from BaseController and ClustersHelper into an object.
To the extent possible swap out `project` with `clusterable`
- Abstract paths for showing cluster or clusters. This will allow us to
swap in alternative paths for group level cluster
- Push :project_id and :namespace_id params from the URL to the POST
body.
- Create a nice helper for to generate links for the destroy
action
For some reason, spec :project_id and :namespace_id param are not going
through `to_param` for a JSON format. Manually call `to_param` to fix
specs.
- Move :layout to BaseController
In preparation so that we can create both cluster attached to project
and cluster attached to group.
- Move ClustersController to top level
- Move Clusters::ApplicationsController to top-level too
- Creates a Clusters::BaseController to share common functions
- Do not rely on @project ivar. Anything could set the ivar.
- Fix Vue page components due to new data-page value
Because of the controller change we have gone from
`projects:clusters:new` to `clusters:new`, so we need to update the file
location of the page components. There is somewhere a function that will
convert data-page to a file location.
On that note, projects/clusters/gcp/new/, translate to
Projects::Clusters::Gcp#new doesn't exist so replace that with
clusters/create_gcp/ and clusters/create_user/
Now that Auto DevOps can run in a RBAC enabled cluster from
https://gitlab.com/gitlab-org/gitlab-ce/issues/51942, we can now remove
the FF.
As the flag only governed if UI elements would appear or not when
creating/adding existing clusters; the effect of removing the FF would
be that the checkbox to choose to enable RBAC clusters will now always
appear.
Remove FF stubs from specs
Improve spec context names