Author: jfthomps
Date: Wed Jul 26 13:24:09 2017
New Revision: 1803044

URL: http://svn.apache.org/viewvc?rev=1803044&view=rev
Log:
(no JIRA)

dashboard.php, dashboard.js: added image revision comments to data in list of 
failed imaging reservations

Modified:
    vcl/trunk/web/.ht-inc/dashboard.php
    vcl/trunk/web/js/dashboard.js

Modified: vcl/trunk/web/.ht-inc/dashboard.php
URL: 
http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/dashboard.php?rev=1803044&r1=1803043&r2=1803044&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/dashboard.php (original)
+++ vcl/trunk/web/.ht-inc/dashboard.php Wed Jul 26 13:24:09 2017
@@ -731,6 +731,7 @@ function getFailedImagingData() {
        $affilid = getDashboardAffilID();
        $query = "SELECT c.hostname AS computer, "
               .        "i.prettyname AS image, "
+              .        "ir.comments AS revisioncomments, "
               .        "rq.id, "
               .        "rq.start, "
               .        "o.installtype, "
@@ -741,6 +742,7 @@ function getFailedImagingData() {
               . "LEFT JOIN reservation rs ON (rs.requestid = rq.id) "
               . "LEFT JOIN computer c ON (c.id = rs.computerid) "
               . "LEFT JOIN image i ON (i.id = rs.imageid) "
+              . "LEFT JOIN imagerevision ir ON (ir.id = rs.imagerevisionid) "
               . "LEFT JOIN OS o ON (o.id = i.OSid) "
               . "LEFT JOIN managementnode m ON (m.id = rs.managementnodeid) "
               . "LEFT JOIN vmhost vh ON (c.vmhostid = vh.id) "
@@ -757,6 +759,8 @@ function getFailedImagingData() {
        $qh = doQuery($query, 101);
        $data = array();
        while($row = mysql_fetch_assoc($qh)) {
+               if(is_null($row['revisioncomments']))
+                       $row['revisioncomments'] = '(none)';
                $tmp = explode('.', $row['computer']);
                $row['computer'] = $tmp[0];
                $tmp = explode('.', $row['vmhost']);

Modified: vcl/trunk/web/js/dashboard.js
URL: 
http://svn.apache.org/viewvc/vcl/trunk/web/js/dashboard.js?rev=1803044&r1=1803043&r2=1803044&view=diff
==============================================================================
--- vcl/trunk/web/js/dashboard.js (original)
+++ vcl/trunk/web/js/dashboard.js Wed Jul 26 13:24:09 2017
@@ -247,6 +247,7 @@ function updateFailedImaging(data) {
            +  '<th>Image</th>'
            +  '<th>Owner</th>'
            +  '<th>Management Node</th>'
+           +  '<th>Comments</th>'
            +  '</tr>';
        for(var i = 0; i < data.length; i++) {
                if(i % 2)
@@ -271,6 +272,8 @@ function updateFailedImaging(data) {
                    + data[i].owner
                    + '</td><td style=\"padding: 1px; border-right: 1px 
solid;\">'
                    + data[i].managementnode
+                   + '</td><td style=\"padding: 1px; border-right: 1px 
solid;\">'
+                   + data[i].revisioncomments
                    + '</td></tr>';
        }
        txt += '</table>';


Reply via email to