|
From: <buc...@us...> - 2016-03-11 11:47:04
|
Revision: 255
http://sourceforge.net/p/devmon/code/255
Author: buchanmilne
Date: 2016-03-11 11:47:02 +0000 (Fri, 11 Mar 2016)
Log Message:
-----------
Fix displaying of descriptions for sub-interfaces, and shorten by removing parenthesis
Modified Paths:
--------------
trunk/extras/devmongraphtitle.pl
Modified: trunk/extras/devmongraphtitle.pl
===================================================================
--- trunk/extras/devmongraphtitle.pl 2016-03-11 11:45:44 UTC (rev 254)
+++ trunk/extras/devmongraphtitle.pl 2016-03-11 11:47:02 UTC (rev 255)
@@ -22,7 +22,12 @@
print "Network Traffic $period\n";
exit 0
}
-my ($testname,$intname) = split(/\./,$files[0],3);
+my $rrd = $files[0];
+my ($testname,$intname);
+if ($rrd =~ /^([^\.]+)\.(.*)\.rrd$/) {
+ ($testname,$intname) = ($1,$2);
+}
+#my ($testname,$intname) = split(/\./,$files[0],3);
$intname =~ s/_/\//g if ($intname);
print "Looking for $intname\n" if $ENV{'DEBUG'};
@@ -73,11 +78,11 @@
$title = "$int ($descr) $period";
return $title if (length($title) <= $maxdesclen);
- $title = "$int ($descr)";
+ $title = "$int $descr";
if ( length($title) > $maxdesclen ) {
substr($descr,length($descr) - length($title) + $maxdesclen - 3,length($title) - $maxdesclen +3,"..");
#$title = "$int ($descr) $period";
- $title = "$int ($descr)";
+ $title = "$int $descr";
}
return $title;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|