summaryrefslogtreecommitdiff
path: root/app/models/environment_status.rb
diff options
context:
space:
mode:
authorThong Kuah <tkuah@gitlab.com>2019-07-01 21:40:59 +1200
committerThong Kuah <tkuah@gitlab.com>2019-07-08 09:13:21 +1200
commitd2ba2951f737082edd568505f985ebf9a0808be7 (patch)
tree7da25a607c16810546f6ea57e5354ba145029918 /app/models/environment_status.rb
parent1b5b0dea5228ae7fd520c8bca3f03c4799a4d31d (diff)
downloadgitlab-ce-d2ba2951f737082edd568505f985ebf9a0808be7.tar.gz
Extract deployment_metrics into own object
We can now share project so that we don't have to load project twice. Also, this extracts non-relevant logic out of Deployment. Update DeploymentsController accordingly
Diffstat (limited to 'app/models/environment_status.rb')
-rw-r--r--app/models/environment_status.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/environment_status.rb b/app/models/environment_status.rb
index 2c71520cec1..1b3c094901b 100644
--- a/app/models/environment_status.rb
+++ b/app/models/environment_status.rb
@@ -33,6 +33,10 @@ class EnvironmentStatus
end
end
+ def has_metrics?
+ DeploymentMetrics.new(project, deployment).has_metrics?
+ end
+
def changes
return [] if project.route_map_for(sha).nil?