diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2019-02-07 16:38:15 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2019-02-07 16:38:15 +0300 |
commit | 43de4993efd33f99801a9b00a32c69c1eb6b1125 (patch) | |
tree | 8047f6623cfc3bc42079ea3af424b0cd165b850d /app/helpers | |
parent | 5fc522ed4fabaedb67e010706336868fb2095122 (diff) | |
parent | d9af3752fcfa6e97bcec82515b0cbc1ab88285de (diff) |
Merge branch '52363-ui-changes-to-cluster-and-ado-pages' into 'master'
Moves domain setting to Clusters page
Closes #52363
See merge request gitlab-org/gitlab-ce!24580
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/auto_devops_helper.rb | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/app/helpers/auto_devops_helper.rb b/app/helpers/auto_devops_helper.rb index 516c8a353ea..67e7e475920 100644 --- a/app/helpers/auto_devops_helper.rb +++ b/app/helpers/auto_devops_helper.rb @@ -9,41 +9,4 @@ module AutoDevopsHelper !project.repository.gitlab_ci_yml && !project.ci_service end - - def auto_devops_warning_message(project) - if missing_auto_devops_service?(project) - params = { - kubernetes: link_to('Kubernetes cluster', project_clusters_path(project)) - } - - if missing_auto_devops_domain?(project) - _('Auto Review Apps and Auto Deploy need a domain name and a %{kubernetes} to work correctly.') % params - else - _('Auto Review Apps and Auto Deploy need a %{kubernetes} to work correctly.') % params - end - elsif missing_auto_devops_domain?(project) - _('Auto Review Apps and Auto Deploy need a domain name to work correctly.') - end - end - - # rubocop: disable CodeReuse/ActiveRecord - def cluster_ingress_ip(project) - project - .cluster_ingresses - .where("external_ip is not null") - .limit(1) - .pluck(:external_ip) - .first - end - # rubocop: enable CodeReuse/ActiveRecord - - private - - def missing_auto_devops_domain?(project) - !(project.auto_devops || project.build_auto_devops)&.has_domain? - end - - def missing_auto_devops_service?(project) - !project.deployment_platform&.active? - end end |