From: ivan Date: Wed, 2 Mar 2011 18:04:56 +0000 (+0000) Subject: fix freeside-daily w/Torrus :) X-Git-Tag: freeside_2_3_0~532 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=acdcfc79977617610989a3a5eee39c63e373a546 fix freeside-daily w/Torrus :) --- diff --git a/FS/FS/NetworkMonitoringSystem/Torrus_Internal.pm b/FS/FS/NetworkMonitoringSystem/Torrus_Internal.pm index f436e3bb9..63a93268c 100644 --- a/FS/FS/NetworkMonitoringSystem/Torrus_Internal.pm +++ b/FS/FS/NetworkMonitoringSystem/Torrus_Internal.pm @@ -11,7 +11,7 @@ use FS::Record qw(qsearch qsearchs dbh); use FS::svc_port; use FS::torrus_srvderive; use FS::torrus_srvderive_component; -use Torrus::ConfigTree; +#use Torrus::ConfigTree; #$DEBUG = 0; #$me = '[FS::NetworkMonitoringSystem::Torrus_Internal]'; @@ -108,6 +108,11 @@ sub port_graphs_link { my @keys = keys %$hash; # yeah this is weird... my $host = $keys[0]; my $iface = $hash->{$keys[0]}; + + #Torrus::ConfigTree is only available when running under the web UI + eval 'use Torrus::ConfigTree;'; + die $@ if $@; + my $config_tree = new Torrus::ConfigTree( -TreeName => 'main' ); my $token = $config_tree->token("/Routers/$host/Interface_Counters/$iface/InOut_bps"); return $Torrus::Freeside::FSURL."/torrus/main?token=$token";