summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValery Sizov <valery@gitlab.com>2015-01-25 05:24:11 +0000
committerValery Sizov <valery@gitlab.com>2015-01-25 05:24:11 +0000
commit01558acc5ba5c2162fc10a33046d98133e363a0f (patch)
tree07692cdc39a90f7b002fc3e6cb59d22ff70fd891
parent10b0df9b30d3e03545da4bdceeadc132a0193b5f (diff)
parent01a4c05ba5f0e1de9fd67e97c21456ec081be8db (diff)
downloadgitlab-ci-01558acc5ba5c2162fc10a33046d98133e363a0f.tar.gz
Merge branch 'redesign-services' into 'master'
Redesign services I'm just copycat here, but it looks really nice. ![Screen Shot 2015-01-24 at 12.14.02](https://gitlab.com/uploads/ayufan/gitlab-ci/c5cf8c4f75/Screen_Shot_2015-01-24_at_12.14.02.png) See merge request !31
-rw-r--r--app/controllers/services_controller.rb8
-rw-r--r--app/views/services/index.html.haml25
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