Optimize "Customer has a referring customer" condition, RT#74452
[freeside.git] / httemplate / view / Status.html
index 6c73617..7fb03eb 100644 (file)
@@ -1,4 +1,7 @@
 <& /elements/header.html, 'System Status' &>
+
+<& /elements/init_overlib.html &>
+
 % foreach my $section ( keys %status ) {
 <FONT CLASS="fsinnerbox-title"><% mt($section) |h %></FONT>
 <TABLE CLASS="fsinnerbox">
@@ -11,6 +14,7 @@
 </TABLE>
 <BR><BR>
 % }
+
 <& /elements/footer.html &>
 <%init>
 
@@ -40,8 +44,13 @@ if ( $db eq 'PostgreSQL' && $db_ver =~ /^\s*PostgreSQL\s+([\w\.]+)\s+on\s+/ ) {
 my $db_size = 'Unknown';
 if ( $db eq 'PostgreSQL' ) {
   $db_size = FS::Record->scalar_sql(qq(
-    SELECT pg_size_pretty(pg_database_size('freeside'))
-  ));
+               SELECT pg_size_pretty(pg_database_size('freeside'))
+             )). ' '.
+             include('/elements/popup_link.html',
+                       'action'      => 'Status-db_size_detail.html',
+                       'label'       => '(details)',
+                       'actionlabel' => 'Database size details',
+             );
 }
 
 tie my %status, 'Tie::IxHash',
@@ -227,8 +236,9 @@ foreach my $agent (
     'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
   })
 ) {
-  my $gateway = $agent->payment_gateway('method'=>'VISA card');
-  next unless $gateway->gateway_namespace eq 'Business::OnlinePayment';
+  my $gateway = $agent->payment_gateway('method'=>'VISA card', 'nofatal'=>1, );
+  next unless $gateway
+           && $gateway->gateway_namespace eq 'Business::OnlinePayment';
   eval "use Business::OnlinePayment";
   die $@ if $@; #die?
   my $bop = new Business::OnlinePayment( $gateway->gateway_module,