[freeside-commits] branch FREESIDE_3_BRANCH updated. 793469a327de6182ca2f2e21dacf835a7e10b94f
Ivan
ivan at 420.am
Fri Oct 7 07:19:08 PDT 2016
The branch, FREESIDE_3_BRANCH has been updated
via 793469a327de6182ca2f2e21dacf835a7e10b94f (commit)
from 612e58b49d5f1b9421d6bc33e4e63232a9cd4f49 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 793469a327de6182ca2f2e21dacf835a7e10b94f
Author: Ivan Kohler <ivan at freeside.biz>
Date: Fri Oct 7 07:19:05 2016 -0700
show DB size
diff --git a/httemplate/view/Status.html b/httemplate/view/Status.html
index eb7df68..7fd019e 100644
--- a/httemplate/view/Status.html
+++ b/httemplate/view/Status.html
@@ -25,14 +25,23 @@ if ( ! $@ && $os =~ /^\s*Description:\s*(.+)$/ ) {
( my $perl_ver = $^V ) =~ s/^v//;
my $db = driver_name;
-$db = 'PostgreSQL' if $db =~ /^Pg/;
-$db = 'MySQL' if $db =~ /^mysql/;
+$db = 'PostgreSQL' if $db =~ /^Pg/;
+$db = 'MySQL/MariaDB' if $db =~ /^mysql/;
my $db_ver = FS::Record->scalar_sql('SELECT VERSION()');
if ( $db eq 'PostgreSQL' && $db_ver =~ /^\s*PostgreSQL\s+([\w\.]+)\s+on\s+/ ) {
$db_ver = $1;
}
+my $db_size = 'Unknown';
+if ( $db eq 'PostgreSQL' ) {
+ $db_size = FS::Record->scalar_sql(qq(
+ SELECT pg_size_pretty(pg_database_size(datname))
+ FROM pg_catalog.pg_database
+ WHERE datname = 'freeside'
+ ));
+}
+
tie my %status, 'Tie::IxHash',
'Basics' => [
{ 'title' => 'Freeside version',
@@ -50,6 +59,9 @@ tie my %status, 'Tie::IxHash',
{ 'title' => 'Database version',
'value' => $db_ver,
},
+ { 'title' => 'Database size',
+ 'value' => $db_size,
+ },
],
'Required Daemons' => [
{ 'title' => 'Queue daemon',
-----------------------------------------------------------------------
Summary of changes:
httemplate/view/Status.html | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
More information about the freeside-commits
mailing list