Changeset 890


Ignore:
Timestamp:
07/26/06 15:29:41 (7 years ago)
Author:
mglb1
Message:
  • Re-enable GPolyLine generation for the network map
  • Allow loading zoomin key from a separate file
Location:
ccsweb/trunk/ccs_mods/host
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ccsweb/trunk/ccs_mods/host/host.php

    r680 r890  
    2424require("lib/ccs_init.php"); 
    2525require("host/host_common.php"); 
     26@include("host/zoominkey.php"); 
     27if (!isset($zoominkey)) { 
     28    $zoominkey=""; 
     29} 
    2630 
    2731if (!isset($_REQUEST["do"]) || $_REQUEST["do"] == "") { 
     
    279283        $hosts[$idx]["gps_lat"] = $bits[0]; 
    280284        $hosts[$idx]["gps_long"] = $bits[1]; 
    281         //$hosts[$idx]["ifaces"] = getHostInterfaces($hosts[$idx]["host_id"]); 
     285        $hosts[$idx]["ifaces"] = getHostInterfaces($hosts[$idx]["host_id"]); 
    282286    } 
    283287    $smarty->assign("hosts", $hosts); 
    284288    $smarty->assign("sheets", array("host.css")); 
    285289    $smarty->assign("scripts",  
    286         //array("/js/zoomin2.js", "map.js")); 
    287         array("http://mapapi.zoomin.co.nz/?v=4&apikey=foo", "map.js")); 
     290        array("/js/zoomin2.js", 
     291        //array("http://mapapi.zoomin.co.nz/?v=4&apikey=".$zoominkey, 
     292        "map.js")); 
    288293    display_page("mods/host/map.tpl"); 
    289294 
  • ccsweb/trunk/ccs_mods/host/map.js

    r680 r890  
    6363            marker.addEventListener('mouseout', siteHoverOff); 
    6464        } 
    65         /*for (i in links) { 
     65        for (i in links) { 
     66            d= document.getElementById("debug"); 
     67            debug("link: " + i); 
    6668            point1 = sites[links[i][0]]; 
     69            debug("point 1"); 
    6770            point2 = sites[links[i][1]]; 
     71            debug("point 2"); 
    6872            points = new Array(point1, point2); 
     73            debug("points"); 
    6974            var line = new GPolyLine(points, "#ff0000", 2, 100); 
     75            debug("line " + line.icon + " " + line.icon.style); 
    7076            map.addOverlay(line); 
    71         }*/ 
     77            debug(" overlaid"); 
     78        } 
    7279    } 
    7380} 
     81function debug(msg) { 
     82    d= document.getElementById("debug"); 
     83    ts = new Date(); 
     84    d.innerHTML = d.innerHTML + ts +": " + msg + "<br />"; 
     85} 
  • ccsweb/trunk/ccs_mods/host/map.tpl

    r680 r890  
    7272{$host.host_name} = new GPoint({$host.gps_lat}, {$host.gps_long}); 
    7373sites["{$host.host_name}"] = new Array({$host.host_name}, "{$host.host_name}", "{$host.description} at {$host.location}"); 
    74 {* 
    7574{foreach from=$host.ifaces item=iface} 
    7675{if $iface.link_id != ""} 
     
    8180{/if} 
    8281{/foreach} 
    83 *} 
    8482{/if} 
    8583{/foreach} 
Note: See TracChangeset for help on using the changeset viewer.