diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-01-26 09:50:28 -0800 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-01-26 09:50:28 -0800 |
commit | 057a401be45b10529bb7111328f3260edf62dbf1 (patch) | |
tree | 9cc57d5398706013070f267d819f4aae893d1da9 | |
parent | 2bd55384354c50f0b2bb8074b0ce23a99293281b (diff) | |
parent | 01558acc5ba5c2162fc10a33046d98133e363a0f (diff) | |
download | gitlab-ci-057a401be45b10529bb7111328f3260edf62dbf1.tar.gz |
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ci
-rw-r--r-- | app/controllers/services_controller.rb | 8 | ||||
-rw-r--r-- | app/views/services/index.html.haml | 25 |
2 files changed, 23 insertions, 10 deletions
diff --git a/app/controllers/services_controller.rb b/app/controllers/services_controller.rb index 6852895..655d959 100644 --- a/app/controllers/services_controller.rb +++ b/app/controllers/services_controller.rb @@ -28,9 +28,13 @@ class ServicesController < ApplicationController def test last_build = @project.builds.last - @service.execute(last_build) + if @service.execute(last_build) + message = { notice: 'We successfully tested the service' } + else + message = { alert: 'We tried to test the service but error occured' } + end - redirect_to :back + redirect_to :back, message end private diff --git a/app/views/services/index.html.haml b/app/views/services/index.html.haml index 634b681..f0fecad 100644 --- a/app/views/services/index.html.haml +++ b/app/views/services/index.html.haml @@ -1,13 +1,22 @@ %h3.page-title Project services %p.light Project services allow you to integrate GitLab CI with other applications -%hr -%ul.bordered-list +%table.table + %thead + %tr + %th + %th Service + %th Desription + %th Last edit - @services.sort_by(&:title).each do |service| - %li - %h4 + %tr + %td + = boolean_to_icon service.activated? + %td = link_to edit_project_service_path(@project, service.to_param) do - = service.title - .pull-right - = boolean_to_icon service.activated? - %p= service.description + %strong= service.title + %td + = service.description + %td.light + = time_ago_in_words service.updated_at + ago |