svn commit: r661 - trunk/mapbender/http/php/mod_monitorCapabilities_read.php
christoph at osgeo.org
christoph at osgeo.org
Tue Jul 18 07:41:02 EDT 2006
Author: christoph
Date: 2006-07-18 11:41:02+0000
New Revision: 661
Modified:
trunk/mapbender/http/php/mod_monitorCapabilities_read.php
Log:
fixed minor bug: sort order for avg. response time was STRING, now INT
Modified: trunk/mapbender/http/php/mod_monitorCapabilities_read.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/php/mod_monitorCapabilities_read.php?view=diff&rev=661&p1=trunk/mapbender/http/php/mod_monitorCapabilities_read.php&p2=trunk/mapbender/http/php/mod_monitorCapabilities_read.php&r1=660&r2=661
==============================================================================
--- trunk/mapbender/http/php/mod_monitorCapabilities_read.php (original)
+++ trunk/mapbender/http/php/mod_monitorCapabilities_read.php 2006-07-18 11:41:02+0000
@@ -81,10 +81,10 @@
$t = array('i');
$res = db_prep_query($sql,$v,$t);
if (db_result($res,0,1) == 0 && db_result($res,0,0) == 0) {
- $avg_response_time[$wms[$i]] = "n/a";
+ $avg_response_time[$wms[$i]] = NULL;
}
else {
- $avg_response_time[$wms[$i]] = strval(round(db_result($res,0,1)-db_result($res,0,0), 1)) . " s";
+ $avg_response_time[$wms[$i]] = round(db_result($res,0,1)-db_result($res,0,0), 1);
}
$sql = "SELECT status, status_comment, timestamp_begin, timestamp_end, upload_url, updated FROM mb_monitor ";
@@ -180,7 +180,14 @@
$str .= "\n\t\t\t<td valign='top'><b>" . $wms_id[$k] . "</b><br>" . $admin->getWmsTitleByWmsId($wms_id[$k]) . "</td>";
$str .= "\n\t\t\t<td valign='top'><a href='".$upload_url[$k]."' target=_blank><img title='Connect to service' border=0 src = '../img/trafficlights/". $img. "'></a></td>";
$str .= "\n\t\t\t<td valign='top'>" . $comment[$k] . "<br><div style='font-size:12'>".date("F j, Y, G:i:s", $upload_id[$k])."</div></td>";
- $str .= "\n\t\t\t<td valign='top' align = 'left'>" . $avg_response_time[$k] . "</td>";
+ $str .= "\n\t\t\t<td valign='top' align = 'left'>";
+ if ($avg_response_time[$k] == NULL) {
+ $str .= "n/a";
+ }
+ else {
+ $str .= $avg_response_time[$k] . " s";
+ }
+ $str .= "</td>";
$str .= "\n\t\t\t<td valign='top'><b>" . $percentage[$k] . " %</b> <span style='font-size:12'>(" . $total[$k] . " cycles)</span><br>";
$str .= "<table bgcolor='black' border=1 cellspacing=1 cellpadding=0><tr>";
$val = $percentage[$k];
More information about the Mapbender_commits
mailing list