diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-22 03:06:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-22 03:06:08 +0300 |
commit | 157f9a451a428f66666ba85d8b880df78aff6cc4 (patch) | |
tree | 7c38cacafb9720d144a6add0a170a07a7cc376f6 /app/presenters | |
parent | 7f15e74dae019ac96c65ec769eae2d67aae65a8c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/presenters')
-rw-r--r-- | app/presenters/clusters/cluster_presenter.rb | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/app/presenters/clusters/cluster_presenter.rb b/app/presenters/clusters/cluster_presenter.rb index 1634d2479a0..97771d84031 100644 --- a/app/presenters/clusters/cluster_presenter.rb +++ b/app/presenters/clusters/cluster_presenter.rb @@ -18,8 +18,20 @@ module Clusters end end - def gke_cluster_url - "https://console.cloud.google.com/kubernetes/clusters/details/#{provider.zone}/#{name}" if gcp? + def provider_label + if aws? + s_('ClusterIntegration|Elastic Kubernetes Service') + elsif gcp? + s_('ClusterIntegration|Google Kubernetes Engine') + end + end + + def provider_management_url + if aws? + "https://console.aws.amazon.com/eks/home?region=#{provider.region}\#/clusters/#{name}" + elsif gcp? + "https://console.cloud.google.com/kubernetes/clusters/details/#{provider.zone}/#{name}" + end end def can_read_cluster? |