Project

General

Profile

« Previous | Next » 

Revision f62e9a91

Added by Hamish Coleman about 14 years ago

  • ID f62e9a91e3d588f67b8606b38c441cefe8f42a72

Change munin sorting to be slightly less annoying

View differences:

mrtg.cgi
}
}
for my $i (sort keys %{$d}) {
my $title = $d->{$i}{title};
my $category = lc $d->{$i}{category};
# sort by title, then by internal name
# this keeps comparable graphs together
my @sorted = sort {
($d->{$a}{title}||'NONE') cmp ($d->{$b}{title}||'NONE') ||
$a cmp $b
} keys %{$d};
for my $i (@sorted) {
my $title = $d->{$i}{title} || 'NONE';
my $category = lc $d->{$i}{category} || 'NOCATEGORY';
$i =~ m/^([^;]+);([^:]+):(([^.]+)\.?([^.]+)?)/;
#print "group=$1\n";

Also available in: Unified diff