svn commit: r137 - trunk/mapbender/http/php/mod_monitorCapabilities.php
arnulf at osgeo.org
arnulf at osgeo.org
Sun Apr 23 20:30:52 EDT 2006
Author: arnulf
Date: 2006-04-24 00:30:51+0000
New Revision: 137
Modified:
trunk/mapbender/http/php/mod_monitorCapabilities.php
Log:
added caps as link and short description
Modified: trunk/mapbender/http/php/mod_monitorCapabilities.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/php/mod_monitorCapabilities.php?view=diff&rev=137&p1=trunk/mapbender/http/php/mod_monitorCapabilities.php&p2=trunk/mapbender/http/php/mod_monitorCapabilities.php&r1=136&r2=137
==============================================================================
--- trunk/mapbender/http/php/mod_monitorCapabilities.php (original)
+++ trunk/mapbender/http/php/mod_monitorCapabilities.php 2006-04-24 00:30:51+0000
@@ -78,18 +78,22 @@
} // end function
//for ($k=0; $k<count($wms_id_own) && 0 == 1; $k++) {
+echo "Starting monitoring cycle...<br><br>";
+echo "WMS services are requested for availabiltiy. ";
+echo "Capabilities documents are requested and all changes synchronized with the database cache.<br><br>";
echo "<table cellspacing=10 cellpadding = 8 border = 1>";
for ($k=0; $k<count($wms_id_own); $k++) {
$wmsId = $wms_id_own[$k];
- echo "<tr><td><b>Processing WMS Id </b>" . $wmsId . "<br>";
+ echo "<tr><td><b>Processing WMS</b> (ID = " . $wmsId . ")<br>";
// get the wms version, capabilities, capabilities_doc
- $sql = "SELECT wms_version, wms_getcapabilities, wms_getcapabilities_doc FROM wms WHERE wms_id = '" . $wmsId . "'";
+ $sql = "SELECT wms_title, wms_version, wms_getcapabilities, wms_getcapabilities_doc FROM wms WHERE wms_id = '" . $wmsId . "'";
$res = db_query($sql);
$someArray = db_fetch_row($res);
- $version = $someArray[0];
- $capabilities = $someArray[1];
- $capabilities_doc = $someArray[2];
-
+ $wms_title = $someArray[0];
+ $version = $someArray[1];
+ $capabilities = $someArray[2];
+ $capabilities_doc = $someArray[3];
+ echo "WMS Title: <b><i>" . $wms_title . "</i></b><br>";
// construct capabilities URL
if ($version == "1.1.1" || $version == "1.1.0") {
$myURL = $capabilities . "REQUEST=GetCapabilities&SERVICE=wms&VERSION=" . $version;
@@ -98,13 +102,14 @@
$myURL = $capabilities . "REQUEST=capabilities&WMTVER=1.0.0";
}
else {
- echo "Unknown wms version '" . $version . "'! No update possible.</td><td><img src ='../img/trafficlights/stop.bmp'></td></tr>";
+ echo "Version '" . $version . "' cannot be handled! Update process terminated.</td><td><img src ='../img/trafficlights/stop.bmp'></td></tr>";
}
if (($version == "1.1.1" || $version == "1.1.0" ||$version == "1.0.0") && $myURL) {
// compare the capabilities XML documents
$localXml = $capabilities_doc;
set_time_limit(30);
+ echo "<a href='" . $myURL . "'>Get Capabilities Link</a><br>";
$remoteXml = implode("", file($myURL));
$localXmlArray = explode("\n", $localXml);
$remoteXmlArray = explode("\n", $remoteXml);
@@ -127,7 +132,7 @@
else {
if ($localXml == $remoteXml) {
$result = 1;
- echo "No update necessary.</td><td><img src ='../img/trafficlights/go.bmp'></td></tr>";
+ echo "WMS is stable.</td><td><img src ='../img/trafficlights/go.bmp'></td></tr>";
}
else {
$result = 0;
@@ -143,7 +148,7 @@
}
}
echo "</table>";
-echo "<br><br>done!";
+echo "<br>Monitoring Cycle completed.";
?>
</body>
</html>
\ No newline at end of file
More information about the Mapbender_commits
mailing list