diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-01-24 07:50:17 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-01-24 07:50:17 +0300 |
commit | a6bdf7d8769c1726084f42a510b6aed097fffbf2 (patch) | |
tree | 15a0c494e28acdf9dffd6b5cd6ac154691d26cb9 /app/controllers/projects/services_controller.rb | |
parent | d3d64a4512566015d4ee523cddef4f393c194b45 (diff) |
Show success/error message for test services button
Diffstat (limited to 'app/controllers/projects/services_controller.rb')
-rw-r--r-- | app/controllers/projects/services_controller.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/projects/services_controller.rb b/app/controllers/projects/services_controller.rb index b2ce99aeb45..5ac6947c5de 100644 --- a/app/controllers/projects/services_controller.rb +++ b/app/controllers/projects/services_controller.rb @@ -25,9 +25,13 @@ class Projects::ServicesController < Projects::ApplicationController def test data = Gitlab::PushDataBuilder.build_sample(project, current_user) - @service.execute(data) + if @service.execute(data) + message = { notice: 'We sent a request to the provided URL' } + else + message = { alert: 'We tried to send a request to the provided URL but error occured' } + end - redirect_to :back + redirect_to :back, message end private |