@@ -42,7 +42,7 @@ class Projects::Clusters::GcpController < Projects::ApplicationController
...
@@ -42,7 +42,7 @@ class Projects::Clusters::GcpController < Projects::ApplicationController
when'true'
when'true'
return
return
when'false'
when'false'
flash[:alert]=_('Please <a href=%{link_to_billing} target="_blank" rel="noopener noreferrer">enable billing for one of your projects to be able to create a cluster</a>, then try again.').html_safe%{link_to_billing: "https://console.cloud.google.com/freetrial?utm_campaign=2018_cpanel&utm_source=gitlab&utm_medium=referral"}
flash[:alert]=_('Please <a href=%{link_to_billing} target="_blank" rel="noopener noreferrer">enable billing for one of your projects to be able to create a Kubernetes cluster</a>, then try again.').html_safe%{link_to_billing: "https://console.cloud.google.com/freetrial?utm_campaign=2018_cpanel&utm_source=gitlab&utm_medium=referral"}
else
else
flash[:alert]=_('We could not verify that one of your projects on GCP has billing enabled. Please try again.')
flash[:alert]=_('We could not verify that one of your projects on GCP has billing enabled. Please try again.')
@@ -152,9 +152,10 @@ class KubernetesService < DeploymentService
...
@@ -152,9 +152,10 @@ class KubernetesService < DeploymentService
end
end
defdeprecation_message
defdeprecation_message
content=<<-MESSAGE.strip_heredoc
content=_("Kubernetes service integration has been deprecated. %{deprecated_message_content} your Kubernetes clusters using the new <a href=\"%{url}\"/>Kubernetes Clusters</a> page")%{
Kubernetes service integration has been deprecated. #{deprecated_message_content} your clusters using the new <a href=\'#{Gitlab::Routing.url_helpers.project_clusters_path(project)}'/>Clusters</a> page
=s_("ClusterIntegration|Remove this cluster's configuration from this project. This will not delete your actual cluster.")
=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'),namespace_project_cluster_path(@project.namespace,@project,@cluster.id),method: :delete,class: 'btn btn-danger',data: {confirm: s_("ClusterIntegration|Are you sure you want to remove this cluster's integration? This will not delete your actual cluster.")})
=link_to(s_('ClusterIntegration|Remove integration'),namespace_project_cluster_path(@project.namespace,@project,@cluster.id),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.")})
=s_('ClusterIntegration|Cluster was successfully created on Google Kubernetes Engine. Refresh the page to see cluster\'s details')
=s_("ClusterIntegration|Kubernetes cluster was successfully created on Google Kubernetes Engine. Refresh the page to see Kubernetes cluster's details")
%p=s_('ClusterIntegration|Control how your cluster integrates with GitLab')
%p=s_('ClusterIntegration|Control how your Kubernetes cluster integrates with GitLab')
=link_to(s_('ClusterIntegration|Create cluster on Google Kubernetes Engine'),gcp_new_namespace_project_clusters_path(@project.namespace,@project))
=link_to(s_('ClusterIntegration|Create Kubernetes cluster on Google Kubernetes Engine'),gcp_new_namespace_project_clusters_path(@project.namespace,@project))
%li
%li
=link_to(s_('ClusterIntegration|Add an existing cluster'),user_new_namespace_project_clusters_path(@project.namespace,@project))
=link_to(s_('ClusterIntegration|Add an existing Kubernetes cluster'),user_new_namespace_project_clusters_path(@project.namespace,@project))
-link_to_help_page=link_to(s_('ClusterIntegration|Learn more about Clusters'),help_page_path('user/project/clusters/index'),target: '_blank',rel: 'noopener noreferrer')
-link_to_help_page=link_to(s_('ClusterIntegration|Learn more about Kubernetes'),help_page_path('user/project/clusters/index'),target: '_blank',rel: 'noopener noreferrer')
%p=s_('ClusterIntegration|Clusters allow you to use review apps, deploy your applications, run your pipelines, and much more in an easy way. %{link_to_help_page}').html_safe%{link_to_help_page: link_to_help_page}
%p=s_('ClusterIntegration|Kubernetes clusters allow you to use review apps, deploy your applications, run your pipelines, and much more in an easy way. %{link_to_help_page}').html_safe%{link_to_help_page: link_to_help_page}
=s_('ClusterIntegration|Cluster integration is enabled for this project. Disabling this integration will not affect your cluster, it will only temporarily turn off GitLab\'s connection to it.')
=s_('ClusterIntegration|Kubernetes cluster integration is enabled for this project. Disabling this integration will not affect your Kubernetes cluster, it will only temporarily turn off GitLab\'s connection to it.')
-else
-else
=s_('ClusterIntegration|Cluster integration is enabled for this project.')
=s_('ClusterIntegration|Kubernetes cluster integration is enabled for this project.')
-else
-else
=s_('ClusterIntegration|Cluster integration is disabled for this project.')
=s_('ClusterIntegration|Kubernetes cluster integration is disabled for this project.')
=s_('ClusterIntegration|With a cluster associated to this project, you can use review apps, deploy your applications, run your pipelines, and much more in an easy way.')
=s_('ClusterIntegration|With a Kubernetes cluster associated to this project, you can use review apps, deploy your applications, run your pipelines, and much more in an easy way.')
=s_('ClusterIntegration|Enter the details for your cluster')
=s_('ClusterIntegration|Enter the details for your Kubernetes cluster')
%p
%p
=s_('ClusterIntegration|Please make sure that your Google account meets the following requirements:')
=s_('ClusterIntegration|Please make sure that your Google account meets the following requirements:')
%ul
%ul
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
=s_('ClusterIntegration|Your account must have %{link_to_kubernetes_engine}').html_safe%{link_to_kubernetes_engine: link_to_kubernetes_engine}
=s_('ClusterIntegration|Your account must have %{link_to_kubernetes_engine}').html_safe%{link_to_kubernetes_engine: link_to_kubernetes_engine}
%li
%li
-link_to_requirements=link_to(s_('ClusterIntegration|meets the requirements'),'https://cloud.google.com/kubernetes-engine/docs/quickstart?utm_campaign=2018_cpanel&utm_source=gitlab&utm_medium=referral',target: '_blank',rel: 'noopener noreferrer')
-link_to_requirements=link_to(s_('ClusterIntegration|meets the requirements'),'https://cloud.google.com/kubernetes-engine/docs/quickstart?utm_campaign=2018_cpanel&utm_source=gitlab&utm_medium=referral',target: '_blank',rel: 'noopener noreferrer')
=s_('ClusterIntegration|Make sure your account %{link_to_requirements} to create clusters').html_safe%{link_to_requirements: link_to_requirements}
=s_('ClusterIntegration|Make sure your account %{link_to_requirements} to create Kubernetes clusters').html_safe%{link_to_requirements: link_to_requirements}
=s_('ClusterIntegration|This account must have permissions to create a cluster in the %{link_to_container_project} specified below').html_safe%{link_to_container_project: link_to_container_project}
=s_('ClusterIntegration|This account must have permissions to create a Kubernetes cluster in the %{link_to_container_project} specified below').html_safe%{link_to_container_project: link_to_container_project}
=s_('ClusterIntegration|Please enter access information for your cluster. If you need help, you can read our %{link_to_help_page} on clusters').html_safe%{link_to_help_page: link_to_help_page}
=s_('ClusterIntegration|Please enter access information for your Kubernetes cluster. If you need help, you can read our %{link_to_help_page} on Kubernetes').html_safe%{link_to_help_page: link_to_help_page}
=link_tos_("ClusterIntegration|Add cluster"),new_project_cluster_path(project),class: "btn btn-success btn-add-cluster disabled has-tooltip js-add-cluster",title: s_("ClusterIntegration|Multiple clusters are available in GitLab Enterprise Edition Premium and Ultimate")
=link_tos_("ClusterIntegration|Add Kubernetes cluster"),new_project_cluster_path(project),class: "btn btn-success btn-add-cluster disabled has-tooltip js-add-cluster",title: s_("ClusterIntegration|Multiple Kubernetes clusters are available in GitLab Enterprise Edition Premium and Ultimate")
expect(document.querySelector('.js-cluster-application-notice .flash-text').textContent.trim()).toEqual('Helm Tiller was successfully installed on your cluster');
expect(document.querySelector('.js-cluster-application-notice .flash-text').textContent.trim()).toEqual('Helm Tiller was successfully installed on your Kubernetes cluster');
});
});
it('shows an alert when multiple things gets newly installed',()=>{
it('shows an alert when multiple things gets newly installed',()=>{
expect(document.querySelector('.js-cluster-application-notice .flash-text').textContent.trim()).toEqual('Helm Tiller, Ingress was successfully installed on your cluster');
expect(document.querySelector('.js-cluster-application-notice .flash-text').textContent.trim()).toEqual('Helm Tiller, Ingress was successfully installed on your Kubernetes cluster');