summaryrefslogtreecommitdiffstats
path: root/tools/infra-dashboard
diff options
context:
space:
mode:
Diffstat (limited to 'tools/infra-dashboard')
-rw-r--r--tools/infra-dashboard/css/opnfv.css4
-rw-r--r--tools/infra-dashboard/index.php4
-rw-r--r--tools/infra-dashboard/pages/slaves.php6
-rw-r--r--tools/infra-dashboard/utils/database.php14
4 files changed, 15 insertions, 13 deletions
diff --git a/tools/infra-dashboard/css/opnfv.css b/tools/infra-dashboard/css/opnfv.css
index 8b2711ae..da8aa448 100644
--- a/tools/infra-dashboard/css/opnfv.css
+++ b/tools/infra-dashboard/css/opnfv.css
@@ -1140,12 +1140,12 @@ body {
.collaborative-projects .gray-diagonal {
min-height: 30px;
width: 100%;
- background: url(/opnfv-dashboard/media/diagonal-white.png) transparent repeat scroll top left;
+ background: url(../media/diagonal-white.png) transparent repeat scroll top left;
}
.collaborative-projects #collaborative-projects-logo {
margin-top: 10px;
height: 14px;
- background: url(/opnfv-dashboard/media/collaborative-projects-logo.png) no-repeat scroll 10px center transparent;
+ background: url(../media/collaborative-projects-logo.png) no-repeat scroll 10px center transparent;
width: 100%;
max-width: 400px;
float: left;
diff --git a/tools/infra-dashboard/index.php b/tools/infra-dashboard/index.php
index 56c765a9..afd18b98 100644
--- a/tools/infra-dashboard/index.php
+++ b/tools/infra-dashboard/index.php
@@ -98,7 +98,9 @@
$(function() {
var dialog, form,
- allFields = $( [] ).add( login_email ).add( login_password );
+ login_email = $( "#login_email" ),
+ login_password = $( "#login_password" ),
+ allFields = $( [] ).add( login_email ).add( login_password ),
emailRegex = /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
function checkLength( o, n, min, max ) {
diff --git a/tools/infra-dashboard/pages/slaves.php b/tools/infra-dashboard/pages/slaves.php
index 4eb2add9..25fafd26 100644
--- a/tools/infra-dashboard/pages/slaves.php
+++ b/tools/infra-dashboard/pages/slaves.php
@@ -8,6 +8,7 @@
<?php
include '../utils/jenkinsAdapter.php';
+ $array = $SLAVES->xpath('computer');
echo '<table id="example" class="table table-striped table-bordered" cellspacing="0" width="100%">';
echo "<thead>";
@@ -18,8 +19,7 @@
echo "</tr>";
echo "</thead>";
echo "<tbody>";
-
- foreach ($SLAVES->xpath('computer') as &$value) {
+ foreach ($array as &$value) {
$slave = $value->displayName;
$idle = $value->idle;
@@ -55,6 +55,4 @@
}
echo '</tbody>';
echo '</table>';
-
-
?>
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.");
}