Adaptations in the dashboard for the LF server 39/15239/3
authorjose.lausuch <jose.lausuch@ericsson.com>
Mon, 6 Jun 2016 22:36:43 +0000 (00:36 +0200)
committerjose.lausuch <jose.lausuch@ericsson.com>
Tue, 7 Jun 2016 08:17:30 +0000 (10:17 +0200)
JIRA: RELENG-12

Removed DB information.

Change-Id: I7a307a6f4b416837c9e0376764aeee58e2631657
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
tools/infra-dashboard/css/opnfv.css
tools/infra-dashboard/index.php
tools/infra-dashboard/pages/slaves.php
tools/infra-dashboard/utils/database.php

index 8b2711a..da8aa44 100644 (file)
@@ -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;
index 56c765a..afd18b9 100644 (file)
@@ -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 ) {
index 4eb2add..25fafd2 100644 (file)
@@ -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>';
-
-
 ?>
index bacf363..b72c3d1 100644 (file)
@@ -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.");
     }