fix the title of certain graph in Multihost mode

This commit is contained in:
Jordi Sanfeliu 2014-03-03 14:50:36 +01:00
parent f81aed0f0e
commit b4b0ef93d0
1 changed files with 5 additions and 3 deletions

View File

@ -382,12 +382,14 @@ if(!$silent) {
$str = substr($graph, 0, 5);
my $p = substr($graph, 5, 1);
$title = $config{graphs}->{$str};
$p = (split(',', $config{port_list}))[$p];
$p = (split(',', $config{port}->{list}))[$p];
$title .= " " . trim($p);
$p = (split(',', $config{port_desc}->{$p}))[0];
$p = (split(',', $config{port}->{desc}->{$p}))[0];
$title .= " (" . trim($p) . ")";
} else {
$title = $config{graphs}->{$graph};
my ($g1, $g2) = ($graph =~ /(_\D+).*?(\d)$/);
$g2 = "" if $g1 eq "_proc"; # '_procn' must be converted to '_proc'
$title = $config{graphs}->{$g1 . $g2};
}
}
$title =~ s/ / /g;