Commit 980009e6 authored by Kamil Trzcinski's avatar Kamil Trzcinski Committed by Grzegorz Bizon

Fix auto loading of constants for Ci Statuses

parent f0cd73bf
......@@ -100,8 +100,8 @@ module Ci
end
end
def detailed_status
Gitlab::Ci::Status::Build::Factory.new(self).fabricate!
def detailed_status(current_user)
Gitlab::Ci::Status::Build::Factory.new(self, current_user).fabricate!
end
def manual?
......@@ -156,7 +156,7 @@ module Ci
end
def environment_action
self.options.fetch(:environment, {}).fetch(:action, 'start')
self.options.fetch(:environment, {}).fetch(:action, 'start') if self.options
end
def outdated_deployment?
......
......@@ -336,8 +336,8 @@ module Ci
.select { |merge_request| merge_request.head_pipeline.try(:id) == self.id }
end
def detailed_status
Gitlab::Ci::Status::Pipeline::Factory.new(self).fabricate!
def detailed_status(current_user)
Gitlab::Ci::Status::Pipeline::Factory.new(self, current_user).fabricate!
end
private
......
......@@ -22,8 +22,8 @@ module Ci
@status ||= statuses.latest.status
end
def detailed_status
Gitlab::Ci::Status::Stage::Factory.new(self).fabricate!
def detailed_status(current_user)
Gitlab::Ci::Status::Stage::Factory.new(self, current_user).fabricate!
end
def statuses
......
......@@ -132,7 +132,7 @@ class CommitStatus < ActiveRecord::Base
false
end
def detailed_status
Gitlab::Ci::Status::Factory.new(self).fabricate!
def detailed_status(current_user)
Gitlab::Ci::Status::Factory.new(self, current_user).fabricate!
end
end
- details_path = subject.details_path if subject.has_details?(current_user)
- klass = "ci-status ci-#{subject.status}"
- detailed_status = subject.detailed_status(current_user)
- details_path = detailed_status.details_path if detailed_status.has_details?
- klass = "ci-status ci-#{detailed_status}"
- if details_path
= link_to details_path, class: klass do
= custom_icon(status.icon)
= status.text
= custom_icon(detailed_status.icon)
= detailed_status.text
- else
%span{ class: klass }
= custom_icon(status.icon)
= status.text
= custom_icon(detailed_status.icon)
= detailed_status.text
module Gitlab
module Ci
module Status
module Status
module Build
class Cancelable < SimpleDelegator
include Status::Extended
......
module Gitlab
module Ci
module Status
module Status
module Build
class Play < SimpleDelegator
include Status::Extended
......
module Gitlab
module Ci
module Status
module Status
module Build
class Retryable < SimpleDelegator
include Status::Extended
......
module Gitlab
module Ci
module Status
module Status
class Play < SimpleDelegator
module Build
class Stop < SimpleDelegator
include Status::Extended
def text
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment