X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fview%2FStatus.html;h=dbe08b5bc08f9519c72a6a84bdc2f2f9884a7161;hp=1ea19e94ae844c4f36687af9986acfd1d2669865;hb=a284ef4c8d9d43db336a77db4c34996344cd5717;hpb=96af02574ea6b1b59f81a1215330b682a8dee635 diff --git a/httemplate/view/Status.html b/httemplate/view/Status.html index 1ea19e94a..dbe08b5bc 100644 --- a/httemplate/view/Status.html +++ b/httemplate/view/Status.html @@ -1,4 +1,7 @@ -<& /elements/header.html &> +<& /elements/header.html, 'System Status' &> + +<& /elements/init_overlib.html &> + % foreach my $section ( keys %status ) { <% mt($section) |h %> @@ -11,6 +14,7 @@


% } + <& /elements/footer.html &> <%init> @@ -26,6 +30,14 @@ if ( ! $@ && $os =~ /^\s*Description:\s*(.+)$/ ) { $os = "Debian $deb_version"; } +my $pkg_version = ''; +-e '/usr/bin/dpkg-query' + and run( ['/usr/bin/dpkg-query', + '--showformat=${Version}', '--show', 'freeside' + ], + '>', \$pkg_version + ); + ( my $perl_ver = $^V ) =~ s/^v//; my $db = driver_name; @@ -40,8 +52,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', @@ -49,6 +66,13 @@ tie my %status, 'Tie::IxHash', { 'title' => 'Freeside version', 'value' => $FS::VERSION, }, + ( length($pkg_version) + ? ( { 'title' => 'Package version', + 'value' => $pkg_version, + }, + ) + : () + ), { 'title' => 'Operating System', 'value' => $os, }, @@ -112,7 +136,7 @@ if ( $db eq 'PostgreSQL' ) { && FS::Record->scalar_sql('SHOW archive_mode') eq 'on'; my $slave = - FS::Record->scalar_sql('SHOW archive_command') =~ / postgres\@([\w\.\-]+): / + FS::Record->scalar_sql('SHOW archive_command') =~ / postgres\@([\w\.\-]+):/ ? $1 : ''; $status{'Replication'} = [ @@ -132,11 +156,11 @@ if ( $db eq 'PostgreSQL' ) { # http://www.keithf4.com/monitoring_streaming_slave_lag/ # except pg_stat_replication still doesn't fill in the columns we need as # non-Pg user :/ - push @{ $status{'Replication'} }, - { 'title' => 'Slave', - 'value' => $slave || '(Missing, or unparseable archive_command)', - }, - ; + #push @{ $status{'Replication'} }, + # { 'title' => 'Slave', + # 'value' => $slave || '(Missing, or unparseable archive_command)', + # }, + #; } } @@ -227,8 +251,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, @@ -244,8 +269,6 @@ foreach my $agent ( } } -warn $tokenize; -warn $store; if ( $tokenize && ! $store ) {