Daniel Albaugh wrote:
> Does anyone know of a way to write a custom web page to include a router and
> it's associated interface strip charts and have it appear on the same web
> page? 
> 
> What I'd like to do is have a map that is guest accessible that has a
> background image of the campus with the routers/switches of the various
> buildings and at the bottom have a strip chart of outgoing and incoming
> traffic so people can have a quick glance of the state of the network.
> 
> I can do this by running mrtg on the same machine and including the
> appropriate graph but would prefer to do this completely from within IM.

Yes. This is possible (and easy). You'll need to create a custom web page that 
specifies the chart titles by name.

1. Locate "PerMapHTML/map.html" in your Web Pages folder, duplicate this file, 
and rename the new copy mapinfo.html

2. To include a chart with the title "Default" (from the desired map), append 
this text to the mapinfo.html page:

  <img src="/${httpdocument}/chart/Default/*chart.png">

3. To include additional charts or to use a different chart name, replace 
"Default" with the URL-escaped representation
of your chart's title. For example, for a chart named "Current Activity", the 
URL should be:

  <img src="/${httpdocument}/chart/Current%20Activity/*chart.png">

4. Stop and restart the web server to load your changes.  Then go to your 
desired map page in InterMapper, but
substitute "mapinfo.html" for the end part of the URL (!index.html).

The *chart.png link generates the chart image on the fly, so you can include 
parameters to alter its appearance. You can
include multiple copies of the same chart with different timescales by using 
the timescale parameter. There are also
width and height parameters.

  <h2>Daily</h2>
  <img 
src="/${httpdocument}/chart/Default/*chart.png?timescale=daily&height=150">

  <h2>Weekly</h2>
  <img 
src="/${httpdocument}/chart/Default/*chart.png?timescale=weekly&height=150">

  <h2>Monthly</h2>
  <img 
src="/${httpdocument}/chart/Default/*chart.png?timescale=monthly&height=150">


5. Finally, it is also possible to modify !index.html so references to that 
page load your modified mapinfo.html
instead. Edit the !index.html file so it redirects to mapinfo.html instead.

  #version "1.1"
  #redirect "mapinfo.html"

Regards,

Bill Fisher
Dartware, LLC
____________________________________________________________________
List archives: 
http://www.mail-archive.com/intermapper-talk%40list.dartware.com/
To unsubscribe: send email to: [EMAIL PROTECTED]

Reply via email to