Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/ci/status/build/waiting_for_approval.rb')
-rw-r--r--lib/gitlab/ci/status/build/waiting_for_approval.rb28
1 files changed, 26 insertions, 2 deletions
diff --git a/lib/gitlab/ci/status/build/waiting_for_approval.rb b/lib/gitlab/ci/status/build/waiting_for_approval.rb
index 59869a947a9..ac3f5838d26 100644
--- a/lib/gitlab/ci/status/build/waiting_for_approval.rb
+++ b/lib/gitlab/ci/status/build/waiting_for_approval.rb
@@ -9,11 +9,35 @@ module Gitlab
{
image: 'illustrations/manual_action.svg',
size: 'svg-394',
- title: 'Waiting for approval',
- content: "This job deploys to the protected environment \"#{subject.deployment&.environment&.name}\" which requires approvals. Use the Deployments API to approve or reject the deployment."
+ title: _('Waiting for approval'),
+ content: _("This job deploys to the protected environment \"%{environment}\" which requires approvals.") % { environment: subject.deployment&.environment&.name }
}
end
+ def has_action?
+ true
+ end
+
+ def action_icon
+ nil
+ end
+
+ def action_title
+ nil
+ end
+
+ def action_button_title
+ _('Go to environments page to approve or reject')
+ end
+
+ def action_path
+ project_environments_path(subject.project)
+ end
+
+ def action_method
+ :get
+ end
+
def self.matches?(build, user)
build.waiting_for_deployment_approval?
end