--- trunk/network_topology/mypearls/vpn_map.pm 2005/02/16 15:02:10 12 +++ trunk/network_topology/mypearls/vpn_map.pm 2005/02/16 22:49:57 13 @@ -27,7 +27,7 @@ # Information about what this pearl will do sub info($){ #my $self = shift; - return "VPN map","Map of all VPN links and connecitons"; + return "VPN connections"," clustered by countries"; } # what information do I need to go into action @@ -44,7 +44,10 @@ # run the parent ( this will set the params) my $p = $self->{param}; - my $g = GraphViz->new(); + my $g = GraphViz->new( + width => 8, height => 5, + pagewidth => 8, pageheight => 5 + ); my $rep = DBIx::PearlReports::new ( @@ -76,7 +79,13 @@ -head => sub { $g->add_node( 'l'.$field{vpn_from_location_id}, - label => "$field{from_location}\n$field{from_country}\n$field{vpn_local_gw}" + label => "$field{from_location}\n$field{vpn_local_gw}", + cluster => { + name => $field{from_country}, + color => '#e0e0e0', + }, + color => '#e0e0ff', + style => 'filled', ); }, ); @@ -86,7 +95,13 @@ -head => sub { $g->add_node( 'l'.$field{vpn_to_location_id}, - label => "$field{to_location}\n$field{to_country}\n$field{vpn_remote_gw}" + label => "$field{to_location}\n$field{vpn_remote_gw}", + cluster => { + name => $field{to_country}, + color => '#e0e0e0', + }, + color => '#e0ffe0', + style => 'filled', ); }, ); @@ -94,6 +109,7 @@ $rep->body(-contents => sub { $g->add_edge( 'l'.$field{vpn_from_location_id} => 'l'.$field{vpn_to_location_id}, label => $field{link_name}, + color => '#c0c0c0', ); } );