summaryrefslogtreecommitdiff
path: root/FS/FS
diff options
context:
space:
mode:
authorivan <ivan>2011-03-02 18:04:56 +0000
committerivan <ivan>2011-03-02 18:04:56 +0000
commitacdcfc79977617610989a3a5eee39c63e373a546 (patch)
tree197995d9697d00da196a5cb8efcfae0530692f6c /FS/FS
parent09c2892518ff1ad120af230b7a695ef1b7637ac8 (diff)
fix freeside-daily w/Torrus :)
Diffstat (limited to 'FS/FS')
-rw-r--r--FS/FS/NetworkMonitoringSystem/Torrus_Internal.pm7
1 files changed, 6 insertions, 1 deletions
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";