summaryrefslogtreecommitdiffstats
path: root/tools/infra-dashboard/utils
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2016-06-07 00:36:43 +0200
committerjose.lausuch <jose.lausuch@ericsson.com>2016-06-07 10:17:30 +0200
commitc4441ddfd797a2a1eb68f582d98a2147af0d5440 (patch)
tree8409bf543324697836ffda5ca1307d5f11bd6946 /tools/infra-dashboard/utils
parentaf427a992a96519c00ac9f98db8745f9fc1198fb (diff)
Adaptations in the dashboard for the LF server
JIRA: RELENG-12 Removed DB information. Change-Id: I7a307a6f4b416837c9e0376764aeee58e2631657 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'tools/infra-dashboard/utils')
-rw-r--r--tools/infra-dashboard/utils/database.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/tools/infra-dashboard/utils/database.php b/tools/infra-dashboard/utils/database.php
index bacf3637..b72c3d12 100644
--- a/tools/infra-dashboard/utils/database.php
+++ b/tools/infra-dashboard/utils/database.php
@@ -1,13 +1,15 @@
<?php
-
+ include '../../../../auth-db.php';
date_default_timezone_set('UTC');
function connectDB() {
- $username = "root";
- $password = "opnfv";
- $hostname = "localhost";
+ global $username;
+ global $password;
+ global $hostname;
+ global $dbname;
+
$dbhandle = mysql_connect($hostname, $username, $password)
- or die("Unable to connect to MySQL.");
- $selected = mysql_select_db("opnfv_pharos",$dbhandle)
+ or die("Unable to connect to MySQL.".mysql_error());
+ $selected = mysql_select_db($dbname,$dbhandle)
or die("Could not select opnfv_pharos DB.");
}