Module: nagvis
Branch: master
Commit: 04e22a995cf54e10e60ea87bd189485f5cf58e37
URL:    
http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=04e22a995cf54e10e60ea87bd189485f5cf58e37

Author: Lars Michelsen <[email protected]>
Date:   Wed Jun  9 21:27:22 2010 +0200

#312 Added new macro [backend_id] to <objecttype>url parameters

---

 docs/en_US/nagvis_config_format_description.html   |   28 ++++++++++++++++++-
 etc/nagvis.ini.php-sample                          |    2 +-
 .../frontend/nagvis-js/js/NagVisStatefulObject.js  |    4 +++
 3 files changed, 31 insertions(+), 3 deletions(-)

diff --git a/docs/en_US/nagvis_config_format_description.html 
b/docs/en_US/nagvis_config_format_description.html
index e377510..360629a 100644
--- a/docs/en_US/nagvis_config_format_description.html
+++ b/docs/en_US/nagvis_config_format_description.html
@@ -74,7 +74,7 @@
                - <i>user</i>: Explict user selected language<br />
                - <i>session</i>: When the user selects a language it is stored 
in the current session<br />
                - <i>browser</i>: NagVis tries to detect the user language by 
the browser agent<br />
-               - <i>config</if>: The installation default language<br />
+               - <i>config</i>: The installation default language<br />
                The order you set the options determines how NagVis uses the 
different mechanisms. (<font color="#ff0000">New in 1.5</font>)</td>
                </tr>
                <tr>
@@ -221,7 +221,31 @@
                <td> urltarget </td><td> _self </td><td> Target of the Icon 
link, this option adapts <code>&lt;a target=""></code> (_self is same window) 
</td>
                </tr>
                <tr>
-               <td> <strike>usegdlibs</strike> </td><td> <strike>1</strike> 
</td><td> <strike>Use gdlibs (if set to 0, lines will not work, all other types 
should work fine)</strike> <font color="#ff0000">(Deprecated in 1.4)</font></td>
+               
<td>hosturl</td><td>[htmlcgi]/status.cgi?host=[host_name]</td><td>The default 
url to follow when a user left-clicks on an host object. Available Macros: 
[htmlcgi], [htmlbase], [host_name], [backend_id]</td>
+               </tr>
+               <tr>
+                       <td>hostgroupurl</td>
+           <td>[htmlcgi]/status.cgi?hostgroup=[hostgroup_name]</td>
+         <td>The default url to follow when a user left-clicks on an hostgroup 
object.
+          Available Macros: [htmlcgi], [htmlbase], [hostgroup_name], 
[backend_id]</td>
+               </tr>
+               <tr>
+                       <td>serviceurl</td>
+           
<td>[htmlcgi]/extinfo.cgi?type=2&host=[host_name]&service=[service_description]</td>
+         <td>The default url to follow when a user left-clicks on an service 
object.
+          Available Macros: [htmlcgi], [htmlbase], [host_name], 
[service_description], [backend_id]</td>
+               </tr>
+               <tr>
+                       <td>servicegroupurl</td>
+           <td>[htmlcgi]/status.cgi?servicegroup=[servicegroup_name]</td>
+         <td>The default url to follow when a user left-clicks on an 
servicegroup object.
+          Available Macros: [htmlcgi], [htmlbase], [servicegroup_name], 
[backend_id]</td>
+               </tr>
+               <tr>
+                       <td>mapurl</td>
+           <td>[htmlbase]/index.php?mod=Map&act=view&show=[map_name]</td>
+         <td>The default url to follow when a user left-clicks on an map 
object.
+          Available Macros: [htmlcgi], [htmlbase], [map_name]</td>
                </tr>
                </table>
                
diff --git a/etc/nagvis.ini.php-sample b/etc/nagvis.ini.php-sample
index c1e7473..cf20530 100644
--- a/etc/nagvis.ini.php-sample
+++ b/etc/nagvis.ini.php-sample
@@ -186,7 +186,7 @@
 ; URL template for servicegroup object links
 
;servicegroupurl="[htmlcgi]/status.cgi?servicegroup=[servicegroup_name]&style=detail"
 ; URL template for nested map links
-;mapurl="[htmlbase]/index.php?map=[map_name]"
+;mapurl="[htmlbase]/index.php?mod=Map&act=view&show=[map_name]"
 
 ; Options to configure the Overview page of NagVis
 [index]
diff --git a/share/frontend/nagvis-js/js/NagVisStatefulObject.js 
b/share/frontend/nagvis-js/js/NagVisStatefulObject.js
index 7865bb1..90ab22b 100644
--- a/share/frontend/nagvis-js/js/NagVisStatefulObject.js
+++ b/share/frontend/nagvis-js/js/NagVisStatefulObject.js
@@ -385,6 +385,10 @@ var NagVisStatefulObject = NagVisObject.extend({
                        if(this.conf.type == 'service') {
                                this.conf.url = this.conf.url.replace(new 
RegExp('\\[service_description\\]', 'g'), this.conf.service_description);
                        }
+
+                       if(this.conf.type != 'map') {
+                               this.conf.url = this.conf.url.replace(new 
RegExp('\\[backend_id\\]', 'g'), this.conf.backend_id);
+                       }
                        
                        // Replace special chars in url
                        this.conf.url = this.conf.url.replace(new RegExp('#', 
'g'), '%23');


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to