[freeside-commits] branch FREESIDE_4_BRANCH updated. dc59b913ffd2498cd43926eb38d776cb22a7204f
Ivan
ivan at 420.am
Fri Oct 7 07:19:04 PDT 2016
The branch, FREESIDE_4_BRANCH has been updated
via dc59b913ffd2498cd43926eb38d776cb22a7204f (commit)
from 6654e2207a768e27bc85a74e02ae66d53c0248b3 (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 dc59b913ffd2498cd43926eb38d776cb22a7204f
Author: Ivan Kohler <ivan at freeside.biz>
Date: Fri Oct 7 07:19:04 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