Moved source groups for params, groups, etc. into its own column, to make it more visually obvious.
Signed-off-by: Nick Lewis <[email protected]> --- app/views/node_groups/show.html.haml | 8 +++++--- app/views/nodes/_nodes.html.haml | 6 +++++- app/views/shared/_classes.html.haml | 8 +++++--- app/views/shared/_groups.html.haml | 8 +++++--- app/views/shared/_parameters.html.haml | 12 +++++++----- 5 files changed, 27 insertions(+), 15 deletions(-) diff --git a/app/views/node_groups/show.html.haml b/app/views/node_groups/show.html.haml index 187b9a6..f593b5c 100644 --- a/app/views/node_groups/show.html.haml +++ b/app/views/node_groups/show.html.haml @@ -19,13 +19,15 @@ %table.inspector %thead %tr - %th.key Name + %th Group + %th Source groups %tbody - resource.node_group_child_list.each do |group,parents| %tr - %td.key + %td %strong= link_to(group.name,group) - = " via #{parents.map{|p| link_to(p.name,p)}.to_sentence}" unless parents.include?(resource) + %td + = parents.map{|p| link_to(p.name,p)}.join(", ") unless parents.include?(resource) - else = describe_no_matches_as 'No child groups' .item diff --git a/app/views/nodes/_nodes.html.haml b/app/views/nodes/_nodes.html.haml index 333e9ab..d83bdad 100644 --- a/app/views/nodes/_nodes.html.haml +++ b/app/views/nodes/_nodes.html.haml @@ -9,6 +9,8 @@ %th.status %th.hostname Hostname + - if defined? resource + %th Source groups %th.latest_report.desc ↓ Latest report %tbody @@ -23,7 +25,9 @@ = node_status_icon(node) %td.hostname = link_to h(node.name), node - = " via #{sources.map{|s| link_to(s.name,s)}.to_sentence}" unless sources.nil? or sources.include?(resource) + - if defined? resource + %td + = sources.map{|s| link_to(s.name,s)}.join(", ") unless sources.include?(resource) %td.latest_report = node.last_report ? node.last_report.time : "Has not reported" = pagination_for nodes, more_link diff --git a/app/views/shared/_classes.html.haml b/app/views/shared/_classes.html.haml index ffce6c8..6a7599b 100644 --- a/app/views/shared/_classes.html.haml +++ b/app/views/shared/_classes.html.haml @@ -4,12 +4,14 @@ %table.inspector %thead %tr - %th.key Name + %th.name Class + %th Source groups %tbody - resource.node_class_list.each do |node_class,parents| %tr - %td.key + %td.name %strong= link_to(node_class.name,node_class) - = " via #{parents.map{|p| link_to(p.name,p)}.to_sentence}" unless parents.include?(resource) + %td + = parents.map{|p| link_to(p.name,p)}.join(", ") unless parents.include?(resource) - else = describe_no_matches_as 'No classes' diff --git a/app/views/shared/_groups.html.haml b/app/views/shared/_groups.html.haml index 99e2b11..1d22793 100644 --- a/app/views/shared/_groups.html.haml +++ b/app/views/shared/_groups.html.haml @@ -4,12 +4,14 @@ %table.inspector %thead %tr - %th.key Name + %th Group + %th Source groups %tbody - resource.node_group_list.each do |group,parents| %tr - %td.key + %td %strong= link_to(group.name,group) - = " via #{parents.map{|p| link_to(p.name,p)}.to_sentence}" unless parents.include?(resource) + %td + = parents.map{|p| link_to(p.name,p)}.join(", ") unless parents.include?(resource) - else = describe_no_matches_as 'No groups' diff --git a/app/views/shared/_parameters.html.haml b/app/views/shared/_parameters.html.haml index 51e8c19..203db0d 100644 --- a/app/views/shared/_parameters.html.haml +++ b/app/views/shared/_parameters.html.haml @@ -10,16 +10,18 @@ %table.inspector %thead %tr - %th.key Key - %th.value{:colspan => 2} Value + %th Key + %th Value + %th Source groups %tbody - resource.compiled_parameters(true).each do |key,value_sources_pair| - value,sources = value_sources_pair %tr - %td.key{:style => ("background-color: pink;" if sources.size > 1)} + %td{:style => ("background-color: pink;" if sources.size > 1)} %tt= key - %td.value + %td %tt= value - = " from #{sources.map{|source| link_to(source.name,node_group_path(source.id))}.to_sentence}" unless sources == Set[resource] + %td + = sources.map{|source| link_to(source.name,node_group_path(source.id))}.join(", ") unless sources == Set[resource] - else = describe_no_matches_as 'No parameters' -- 1.7.2.1 -- 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.
