Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions app/helpers/service_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
module ServiceHelper
include TextualSummary

def child_service_summary(child_services)
rows = []
data = {:title => _("Child Services"), :mode => "miq_child_services"}
child_services.sort_by { |o| o.name.downcase }.each do |service|
rows.push(
{
:cells => [{:icon => 'pficon pficon-service', :value => service.name}],
:title => _("View this Service"),
:onclick => {:url => "/service/show/#{service.id}"},
}
)
end
data[:rows] = rows
miq_structured_list(data)
end
end
11 changes: 1 addition & 10 deletions app/views/service/_svcs_show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,7 @@
- unless child_services.blank?
.row
.col-md-12.col-lg-6
%h3
= _('Child Services')
%table.table.table-striped.table-bordered.table-hover
%tbody
- child_services.sort_by { |o| o.name.downcase }.each do |s|
%tr{:onclick => "miqTreeSelect('s-#{s.id}');", :title => _("View this Service")}
%td.table-view-pf-select
%i.pficon.pficon-service
%td
= h(s.name)
= child_service_summary(child_services)
.row
.col-md-12
%h3
Expand Down