Author:   Lars Michelsen <[email protected]>
Date:     Thu Jun 14 09:56:15 2012 +0200
Committer:   Lars Michelsen <[email protected]>
Commit-Date: Thu Jun 14 09:56:15 2012 +0200

Added docs for geomap parameters

---

 TODO                                         |    5 ++-
 docs/en_US/automap.html                      |   14 ++++++++--
 docs/en_US/geomap.html                       |   34 ++++++++++++++++++++++---
 etc/maps/{demo-map.cfg => demo-automap2.cfg} |    4 ++-
 share/server/core/sources/automap.php        |    6 ++--
 5 files changed, 50 insertions(+), 13 deletions(-)

diff --git a/TODO b/TODO
index ad854ec..0251655 100644
--- a/TODO
+++ b/TODO
@@ -1,7 +1,9 @@
 This is a small file for storing quick thoughts about new features and needed 
changes:
 ===============================================================================
 
-Zu tun:
+- Add getHostNamesInHostgroup to demo Backend
+
+Offene Punkte:
   - Automap zu source umbauen
     - filter_by_state neu implementieren (Und evtl. auch für alle Ansichten)
       Das ist ein Problem. Denn die Objekte werden ja schon positioniert, wenn 
der
@@ -24,7 +26,6 @@ Zu tun:
 
   - Doku:
     - View Parameter für geomap
-    - View Parameter für automap
     - Alte zu neuen Automap Parametern
     - Automap Migration
 
diff --git a/docs/en_US/automap.html b/docs/en_US/automap.html
index 7c0ba33..21042aa 100644
--- a/docs/en_US/automap.html
+++ b/docs/en_US/automap.html
@@ -31,11 +31,11 @@
         The values like iconset etc. are inherited to all objects on the map.
         
         <h2> URL Parameters </h2>
-        The automap can be called with several url parameters. Here is a list 
of all available options:
-        
+        The automap can be called with several url parameters. Since NagVis 
1.7 these options can be put into the
+        global section of the map configuration to persist those parameters. 
Here is a list of the automap options:
         <table style="width:100%">
         <tr>
-            <th>parameter</th><th> default </th><th> description </th>
+            <th>Parameter</th><th>Default</th><th>Description</th>
         </tr>
         <tr>
             <td>show</td><td></td><td>The name of the automap. Since NagVis 
1.5 different automap configuration files can be defined. The automap to view 
needs to be set here.</td>
@@ -68,12 +68,17 @@
             <td>filter_by_state 
<strike>filterByState</strike></td><td>none</td><td>Set to 1 to enable the 
&quot;problem automap&quot; mode. When it is set to 1 it will filter all 
branches out which have only OK/UP hosts. This will result in a "problem 
automap" which only shows up a tree where each branch has at least one 
problem.</td>
         </tr>
         <tr>
+            <td>filter_by_id</td><td></td><td>Filter out given object_ids, is 
mostly used internal <font color="#ff0000">(New in 1.7)</font></td>
+        <tr>
             <td>filter_group 
<strike>filterGroup</strike></td><td>none</td><td>Provide a hostgroup name. 
Only hosts in this hostgroup will be shown on the map.</td>
         </tr>
         <tr>
             <td>search</td><td>none</td><td>Search for a map object on map 
load. Matching objects will be highlighted.</td>
         </tr>
         <tr>
+            <td>rankdir</td><td>LR</td><td>Configure direction of directed 
automaps, can be set to TB (Top/Bottom) and LR (Left/Right)<font 
color="#ff0000">(New in 1.7)</font></td>
+        </tr>
+        <tr>
             <td>rotation</td><td>none</td><td>Rotate in the given rotation 
pool when the map is a step in the pool.</td>
         </tr>
         <tr>
@@ -88,6 +93,9 @@
         <tr>
             <td>margin</td><td>50</td><td>Sets the free space border of the 
automap graph on all sides. Has to be given in pixels.</td>
         </tr>
+        <tr>
+            <td>overlap</td><td>true</td><td>Configure collision handling of 
objects (Take a look at the graphviz docs for explanations of the values)<font 
color="#ff0000">(New in 1.7)</font></td>
+        </tr>
         </table>
         
         <a name=root/object/definition></a>
diff --git a/docs/en_US/geomap.html b/docs/en_US/geomap.html
index b19b9c0..2309e79 100644
--- a/docs/en_US/geomap.html
+++ b/docs/en_US/geomap.html
@@ -16,7 +16,7 @@
 
         <h2>Prerequisites</h2>
         <p>There is no special software needed on the NagVis host. But there 
is one special requirement. To
-        be able to use this feature, NagVis needs to be able to access the 
host <code>dev.openstreetmap.org</code>
+        be able to use this feature, NagVis needs to be able to access the 
host <code>geomap.nagvis.org</code>
         via port 80. NagVis uses a simple HTTP based API to get the map image 
and the coordinates of that image.</p>
         <p>In most cases the NagVis host does not have direct internet access. 
You can configure the <code>http_proxy</code>
         option in the <code>[global]</code> section of your NagVis main 
configuration to tell NagVis to use
@@ -56,9 +56,35 @@ muc-srv1;Munich Server1;48.1448353;11.5580067</pre>
         the fourth then LONG coordinate.</p>
         
         <h2>Configuring geomaps</h2>
-        <p>There are no special map config attributes for the geomaps. The 
geomap source uses view parameters for
-        configuration. For details take a look at the modify view dialog which 
can be opened using the header
-        menu "Actions -> Modify view".</p>
+        <p>The geomap source uses view parameters for configuration. For 
details take a look at the modify view
+         dialog which can be opened using the header menu "Actions -> Modify 
view".</p>
         <p>The view parameters can also be given as map configuration 
attributes in the global section of the maps.</p>
+        <table style="width:100%">
+        <tr>
+            <th>Parameter</th><th>Default</th><th>Description</th>
+        </tr>
+        <tr>
+            <td>geomap_type</td>
+            <td>mapnik</td>
+            <td>Define the render mode of the geomap. Can be osmarender, 
mapnik and cycle.</td>
+        </tr>
+        <tr>
+            <td>geomap_zoom</td>
+            <td></td>
+            <td>Configure the zoom level of the geomap durint map request.
+                Take a look at the <a href="">OSM zoom documentation</a> for 
further details.</td>
+        </tr>
+        <tr>
+            <td>source_file</td>
+            <td></td>
+            <td>The name of the file CSV file to use as source for rendering 
the geomap.</td>
+        </tr>
+        <tr>
+            <td>width</td><td></td><td> width of the geomap in pixels </td>
+        </tr>
+        <tr>
+            <td>height</td><td></td><td> height of the geomap in pixels </td>
+        </tr>
+        </table>
     </body>
 </html>
diff --git a/etc/maps/demo-map.cfg b/etc/maps/demo-automap2.cfg
similarity index 82%
rename from etc/maps/demo-map.cfg
rename to etc/maps/demo-automap2.cfg
index 96b996e..db9dd18 100644
--- a/etc/maps/demo-map.cfg
+++ b/etc/maps/demo-automap2.cfg
@@ -1,5 +1,7 @@
 define global {
-    alias=Demo Overview Automap
+    alias=Demo: 6 Automap 2
+    parent_map=demo-overview
+
     iconset=std_small
     hover_childs_sort=s
     hover_childs_order=asc
diff --git a/share/server/core/sources/automap.php 
b/share/server/core/sources/automap.php
index 23553ff..7fd82a7 100644
--- a/share/server/core/sources/automap.php
+++ b/share/server/core/sources/automap.php
@@ -372,7 +372,7 @@ function automap_filter_object_ids(&$allowed_ids, $obj) {
 function automap_filter_by_ids($obj, $params = null) {
     if(isset($params['filter_by_ids']) && $params['filter_by_ids'] != '') {
         $allowed_ids = explode(',', $params['filter_by_ids']);
-        print_r($allowed_ids);
+        //print_r($allowed_ids);
         automap_filter_object_ids($allowed_ids, $obj);
     }
 }
@@ -396,9 +396,9 @@ function automap_filter_by_group($obj, $params) {
     $_BACKEND->checkBackendFeature($params['backend_id'], 
'getHostNamesInHostgroup', true);
     $hosts = 
$_BACKEND->getBackend($params['backend_id'])->getHostNamesInHostgroup($params['filter_group']);
 
-    print_r($hosts);
+    //print_r($hosts);
     $allowed_ids = automap_hostnames_to_object_ids($hosts);
-    print_r($allowed_ids);
+    //print_r($allowed_ids);
 
     automap_filter_object_ids($allowed_ids, $obj);
 }


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to