File tree Expand file tree Collapse file tree 2 files changed +17
-10
lines changed Expand file tree Collapse file tree 2 files changed +17
-10
lines changed Original file line number Diff line number Diff line change 11module ServiceHelper
22 include TextualSummary
3+
4+ def child_service_summary ( child_services )
5+ rows = [ ]
6+ data = { :title => _ ( "Child Services" ) , :mode => "miq_child_services" }
7+ child_services . sort_by { |o | o . name . downcase } . each do |service |
8+ rows . push (
9+ {
10+ :cells => [ { :icon => 'pficon pficon-service' , :value => service . name } ] ,
11+ :title => _ ( "View this Service" ) ,
12+ :onclick => { :url => "/service/show/#{ service . id } " } ,
13+ }
14+ )
15+ end
16+ data [ :rows ] = rows
17+ miq_structured_list ( data )
18+ end
319end
Original file line number Diff line number Diff line change 2222 - unless child_services.blank?
2323 .row
2424 .col-md-12.col-lg-6
25- %h3
26- = _('Child Services')
27- %table.table.table-striped.table-bordered.table-hover
28- %tbody
29- - child_services.sort_by { |o| o.name.downcase }.each do |s|
30- %tr{:onclick => " miqTreeSelect('s-#{ s.id } ');" , :title => _(" View this Service" )}
31- %td.table-view-pf-select
32- %i.pficon.pficon-service
33- %td
34- = h(s.name)
25+ = child_service_summary(child_services)
3526 .row
3627 .col-md-12
3728 %h3
You can’t perform that action at this time.
0 commit comments