summaryrefslogtreecommitdiff
path: root/app/presenters/clusters
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2017-10-23 11:36:35 +0300
committerShinya Maeda <shinya@gitlab.com>2017-10-23 11:36:35 +0300
commitd0cff7f5855f91b5479f9fdaa39d8d95ec691a9e (patch)
tree892e9ce3d95fdc19d3b258bac2a0cbb4705cf35f /app/presenters/clusters
parente1d12ba9b988e61afb9317f3a132d6e2caa93923 (diff)
downloadgitlab-ce-d0cff7f5855f91b5479f9fdaa39d8d95ec691a9e.tar.gz
This works
Diffstat (limited to 'app/presenters/clusters')
-rw-r--r--app/presenters/clusters/cluster_presenter.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/presenters/clusters/cluster_presenter.rb b/app/presenters/clusters/cluster_presenter.rb
new file mode 100644
index 00000000000..01cb59d0d44
--- /dev/null
+++ b/app/presenters/clusters/cluster_presenter.rb
@@ -0,0 +1,9 @@
+module Clusters
+ class ClusterPresenter < Gitlab::View::Presenter::Delegated
+ presents :cluster
+
+ def gke_cluster_url
+ "https://console.cloud.google.com/kubernetes/clusters/details/#{provider.zone}/#{name}" if gcp?
+ end
+ end
+end