Changeset 8456 in genesis
- Timestamp:
- Sep 14, 2010, 9:01:35 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
nodes/nodemap.html
r8454 r8456 30 30 nodeStatusImg['planned'] = 'http://www.google.com/mapfiles/kml/paddle/wht-stars-lv.png'; 31 31 nodeStatusImg['unknown'] = 'http://www.google.com/mapfiles/kml/paddle/wht-stars-lv.png'; 32 33 function isInterlink(feature) { 34 return (feature.attributes.name.indexOf('Interlink') != -1); 35 } 32 36 33 37 OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, { … … 118 122 //alert(OpenLayers.loadURL("./kmlfile.kml", "", null, parseKML)); 119 123 124 120 125 function ignoreInterlink(cluster, feature) { 121 if ( feature.attributes.name.indexOf('Interlink') != -1) {126 if (isInterlink(feature)) { 122 127 return(false); 123 128 } else { … … 298 303 299 304 305 300 306 function onKMLFeatureSelect(event) { 301 307 var feature = event.feature; … … 306 312 iconStatus = node.attributes.styleUrl.split('_')[2]; 307 313 iconImg = nodeStatusImg[iconStatus]; 308 varcontent = content + "<h4><img src='" + iconImg + "' />" + node.attributes.name + "</h4>" + node.attributes.description + "<br />";314 content = content + "<h4><img src='" + iconImg + "' />" + node.attributes.name + "</h4>" + node.attributes.description + "<br />"; 309 315 } 310 316 } else { 311 var content = "<h2>" + feature.attributes.name + "</h2>" + feature.attributes.description; 317 if (isInterlink(feature)) { 318 content = "<h4>" + feature.attributes.name + "</h4>" + "<br />" + "<em>Link information: " + feature.attributes.description + "</em>"; 319 } else { 320 var nodeName = feature.attributes.name.split(' ')[1]; 321 OpenLayers.Console.log(nodeName); 322 content = "<iframe frameborder='0' height='300px' width='700px' src='http://sunny.wleiden.net/nagios/cgi-bin/status.cgi?host=" + nodeName + "&servicestatustypes=28&hoststatustypes=15&noheader=true'></iframe><br />" + "<em>Locatie: " + feature.attributes.description + "</em>"; 323 } 312 324 } 313 325 popup = new OpenLayers.Popup.FramedCloud("chicken",
Note:
See TracChangeset
for help on using the changeset viewer.