Changeset 8456 in genesis


Ignore:
Timestamp:
Sep 14, 2010, 9:01:35 PM (14 years ago)
Author:
rick
Message:

Nagios node information if node is having issues.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nodes/nodemap.html

    r8454 r8456  
    3030      nodeStatusImg['planned'] = 'http://www.google.com/mapfiles/kml/paddle/wht-stars-lv.png';
    3131      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      }
    3236
    3337      OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {               
     
    118122        //alert(OpenLayers.loadURL("./kmlfile.kml", "", null, parseKML));
    119123
     124
    120125        function ignoreInterlink(cluster, feature) {
    121            if (feature.attributes.name.indexOf('Interlink') != -1) {
     126           if (isInterlink(feature)) {
    122127             return(false);
    123128           } else {
     
    298303
    299304
     305
    300306      function onKMLFeatureSelect(event) {
    301307        var feature = event.feature;
     
    306312             iconStatus = node.attributes.styleUrl.split('_')[2];
    307313             iconImg = nodeStatusImg[iconStatus];
    308              var content = 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 />";
    309315           }
    310316        } 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           }
    312324        }
    313325        popup = new OpenLayers.Popup.FramedCloud("chicken",
Note: See TracChangeset for help on using the changeset viewer.