| 303 | | my $hash = shift || return undef; |
|---|
| 304 | | my $category = shift; |
|---|
| 305 | | my $ret = []; |
|---|
| 306 | | my $link = "index.html"; |
|---|
| 307 | | my $parent = munin_get_parent ($hash) || return undef; |
|---|
| 308 | | my $me = munin_get_node_name ($hash); |
|---|
| 309 | | |
|---|
| 310 | | foreach my $peer (sort keys %$parent) { |
|---|
| 311 | | next unless defined $peer and defined $parent->{$peer} and ref ($parent->{$peer}) eq "HASH"; |
|---|
| 312 | | next if $peer =~ /^#%#/; |
|---|
| 313 | | next if defined $category and lc (munin_get ($parent->{$peer}, "graph_category", "other")) ne $category; |
|---|
| 314 | | if ($peer eq $me) { |
|---|
| 315 | | unshift @$ret, { "name" => munin_get_node_name ($parent->{$peer}), "link" => undef }; |
|---|
| | 298 | my $hash = shift || return undef; |
|---|
| | 299 | my $category = shift; |
|---|
| | 300 | my $ret = []; |
|---|
| | 301 | my $link = "index.html"; |
|---|
| | 302 | my $parent = munin_get_parent ($hash) || return undef; |
|---|
| | 303 | my $me = munin_get_node_name ($hash); |
|---|
| | 304 | my $pchildren = munin_get_children ($parent); |
|---|
| | 305 | |
|---|
| | 306 | foreach my $peer (sort {munin_get_node_name($a) <=> munin_get_node_name($b)} @$pchildren) { |
|---|
| | 307 | next unless defined $peer and ref ($peer) eq "HASH"; |
|---|
| | 308 | next if defined $category and lc (munin_get ($peer, "graph_category", "other")) ne $category; |
|---|
| | 309 | logger ("FNORD! ". munin_get_node_name ($peer)." -- ".munin_get_node_name ($parent)); |
|---|
| | 310 | my $peername = munin_get_node_name ($peer); |
|---|
| | 311 | next if $peername eq "contact" and munin_get_node_name ($parent) eq "root"; |
|---|
| | 312 | if ($peername eq $me) { |
|---|
| | 313 | unshift @$ret, { "name" => $peername, "link" => undef }; |
|---|