add multi DB support to the Postgres app (#6222)

* now creates a component with all the DBs in it

* add the function get_postgres_databases

* add multi DB support to the Postgres device app page

* add multi DB support to the Postgres graphs

* whoops removed the udpate bit, readd it

* white space cleanup

* now use json for storing DB names

* provide the list of DBs in a cleaner manner

* Update postgres.inc.php
This commit is contained in:
VVelox
2017-04-12 04:45:12 -05:00
committed by Neil Lathwood
parent 4b0972628f
commit c222aa41a0
9 changed files with 183 additions and 6 deletions

View File

@@ -12,7 +12,14 @@ $printtotal = 0;
$addarea = 1;
$transparency = 15;
$rrd_filename = rrd_name($device['hostname'], array('app', $name, $app_id));
if (isset($vars['database'])) {
$rrd_name_array=array('app', $name, $app_id, $vars['database']);
} else {
$rrd_name_array=array('app', $name, $app_id);
}
$rrd_filename = rrd_name($device['hostname'], $rrd_name_array);
if (is_file($rrd_filename)) {
$rrd_list = array(