From: Nick Lewis <[email protected]> Reviewed-by: Paul Berry <[email protected]> and Max Martin <[email protected]>
Signed-off-by: Paul Berry <[email protected]> --- Local-branch: maint/next/add-registry app/views/node_groups/show.html.haml | 2 ++ app/views/nodes/show.html.haml | 2 ++ app/views/reports/_report.html.haml | 4 ++++ app/views/reports/_report_status_icon.html.haml | 5 +---- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/views/node_groups/show.html.haml b/app/views/node_groups/show.html.haml index 0d9a7ae..7fcdc6c 100644 --- a/app/views/node_groups/show.html.haml +++ b/app/views/node_groups/show.html.haml @@ -42,6 +42,8 @@ .section .header %h2 Nodes for this group + - Registry.each_hook :core, :node_group_view_widgets do |thing| + = thing.call self, @node_group - if @node_group.all_nodes.present? = render 'nodes/nodes', :nodes => @node_group.all_nodes, :container => @node_group - else diff --git a/app/views/nodes/show.html.haml b/app/views/nodes/show.html.haml index f472392..cb3bd71 100644 --- a/app/views/nodes/show.html.haml +++ b/app/views/nodes/show.html.haml @@ -71,6 +71,8 @@ .actionbar = link_to "More »", reports_node_path(@node, :kind => "apply"), :class => 'button' + - Registry.each_hook :core, :node_view_widgets do |thing| + = thing.call self, @node - if @node.reports.inspections.count > 0 .section %h3 diff --git a/app/views/reports/_report.html.haml b/app/views/reports/_report.html.haml index c27899f..2ec775c 100644 --- a/app/views/reports/_report.html.haml +++ b/app/views/reports/_report.html.haml @@ -3,9 +3,13 @@ = render 'report_title', :report => report - unless SETTINGS.enable_read_only_mode %ul.actions + - Registry.each_hook :report, :actions do |thing| + = thing.call self, report %li= link_to 'Destroy', report, :confirm => 'Are you sure?', :method => :delete, :class => "delete button" .item + - Registry.each_hook :core, :report_view_widgets do |thing| + = thing.call self, report - if report.resource_statuses.present? .section %h3 diff --git a/app/views/reports/_report_status_icon.html.haml b/app/views/reports/_report_status_icon.html.haml index 603d9bf..6db777c 100644 --- a/app/views/reports/_report_status_icon.html.haml +++ b/app/views/reports/_report_status_icon.html.haml @@ -1,8 +1,5 @@ %span{:title => report ? report_title_text(report) : 'No reports'} - if report - - if report.kind == "inspect" - = icon(:inspect) - - else - = icon(report.status) + = icon(Registry.find_first_hook(:report, :status_icon) { |thing| thing.call(report) } || (report.kind == "inspect" ? :inspect : report.status)) - else = icon(:error) -- 1.7.2 -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
