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:
authorMayra Cabrera <mcabrera@gitlab.com>2018-03-30 05:11:36 +0300
committerMayra Cabrera <mcabrera@gitlab.com>2018-04-07 05:20:16 +0300
commit345ac03b7afb1dc9b941c53bc45cc3dfcf22e61c (patch)
tree42da609254928d746a961465d9ecfbff3ab71ad4 /app/controllers/projects/deploy_tokens_controller.rb
parent370fc05da7f95bf6621867a71d51493cf3899e25 (diff)
Address UX review
- Keep 'Deploy Section' open upon save, otherwise the token might get lost - When an error appears, display the error inside the form and also keep the Deploy Section open - Changue copy of revoke modal
Diffstat (limited to 'app/controllers/projects/deploy_tokens_controller.rb')
-rw-r--r--app/controllers/projects/deploy_tokens_controller.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/app/controllers/projects/deploy_tokens_controller.rb b/app/controllers/projects/deploy_tokens_controller.rb
index ecc6db50f2f..1b1bd461b27 100644
--- a/app/controllers/projects/deploy_tokens_controller.rb
+++ b/app/controllers/projects/deploy_tokens_controller.rb
@@ -3,16 +3,12 @@ class Projects::DeployTokensController < Projects::ApplicationController
def create
@token = DeployTokens::CreateService.new(@project, current_user, deploy_token_params).execute
- token_params = {}
if @token.valid?
flash[:notice] = 'Your new project deploy token has been created.'
- else
- token_params = @token.attributes.slice("name", "scopes", "expires_at")
- flash[:alert] = @token.errors.full_messages.join(', ').html_safe
end
- redirect_to project_settings_repository_path(project, deploy_token: token_params)
+ redirect_to project_settings_repository_path(project)
end
def revoke