Update of /export/home/ntop/ntop/utils
In directory unknown:/tmp/cvs-serv121/utils
Modified Files:
faqtohtml.awk
Added Files:
insertssi.awk
Log Message:
This change has two aspects
* External: Adaptive Menus
* Internal: SSIs
External (visible to users)
---------------------------
The adaptive menus mean that ntop's menus have become sensitive to the current
run-time configuration. For example, if interfaces are being merged, the
Switch NIC
menu item does not appear.
Other controlled menu items are:
Local | Routers: disappears when -o | --no-mac option is set
Local | Active TCP Sessions: disappears when -z | --disable-sessions is set
Local | Network Traffic Map: Not available under Windows
Media | (all items): appears unless --no-fc is set
Media | Fibre Channel | Sessions: disappears when -z | --disable-sessions is
set
Media | SCSI Sessions | (all items): disappears when -z | --disable-sessions
is set
Internal
--------
In order to provide a single point for menu changes and especially to insert the
menus into .html files, ntop now accepts a limited form of Server Side Includes
(plus has a mechanism for more in the future).
There are two defined SSIs, one for the <head> portion of the menus and one
for the <body> portion. To access the SSIs, code your page like this:
<head>
...
<!--#include virtual="/menuHead.html" -->
</head>
<body>
<!--#include virtual="/menuBody.html" -->
...
The meat of this code is in http.c in processSSI(). Like the present code
for identifying page requests, this contains an if() function tree:
if(strcasecmp(ssiURIstart, CONST_SSI_MENUBODY_HTML) == 0) {
ssiMenu_Body();
} else if(strcasecmp(ssiURIstart, CONST_SSI_MENUHEAD_HTML) == 0) {
ssiMenu_Head();
...
Within SSI handlers you should be careful to use sendStringWOssi() instead
of sendString() - this prevents recursion problems.
-----Burton (ref 560)
_______________________________________________
Ntop-dev mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev