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/views/clusters/clusters/_advanced_settings.html.haml | |
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/views/clusters/clusters/_advanced_settings.html.haml')
-rw-r--r-- | app/views/clusters/clusters/_advanced_settings.html.haml | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/views/clusters/clusters/_advanced_settings.html.haml b/app/views/clusters/clusters/_advanced_settings.html.haml new file mode 100644 index 00000000000..7037c80aa6b --- /dev/null +++ b/app/views/clusters/clusters/_advanced_settings.html.haml @@ -0,0 +1,15 @@ +- if can?(current_user, :admin_cluster, @cluster) + - if @cluster.managed? + .append-bottom-20 + %label.append-bottom-10 + = s_('ClusterIntegration|Google Kubernetes Engine') + %p + - link_gke = link_to(s_('ClusterIntegration|Google Kubernetes Engine'), @cluster.gke_cluster_url, target: '_blank', rel: 'noopener noreferrer') + = s_('ClusterIntegration|Manage your Kubernetes cluster by visiting %{link_gke}').html_safe % { link_gke: link_gke } + + .sub-section.form-group + %h4.text-danger + = s_('ClusterIntegration|Remove Kubernetes cluster integration') + %p + = s_("ClusterIntegration|Remove this Kubernetes cluster's configuration from this project. This will not delete your actual Kubernetes cluster.") + = link_to(s_('ClusterIntegration|Remove integration'), clusterable.cluster_path(@cluster), method: :delete, class: 'btn btn-danger', data: { confirm: s_("ClusterIntegration|Are you sure you want to remove this Kubernetes cluster's integration? This will not delete your actual Kubernetes cluster.")}) |