Module: nagvis Branch: master Commit: a00f372a18687aba3409928557258b738c6716f5 URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis/commit/?id=a00f372a18687aba3409928557258b738c6716f5
Author: Roman Kyrylych <[email protected]> Date: Mon Aug 17 13:12:19 2009 +0300 gmap: Added more nagvis config vars to Settings Signed-off-by: Roman Kyrylych <[email protected]> --- share/netmap/Settings.php | 13 +++++++++++-- uifx/src/modules/gmap/domain/Settings.as | 6 ++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/share/netmap/Settings.php b/share/netmap/Settings.php index c4f2dc9..cb7b984 100644 --- a/share/netmap/Settings.php +++ b/share/netmap/Settings.php @@ -26,6 +26,8 @@ class Settings public $googleMapsKey; public $defaultLocationAction; public $openLinksInNewWindow; + public $htmlbase; + public $htmlcgi; public $hosturl; public $hostgroupurl; public $serviceurl; @@ -33,12 +35,14 @@ class Settings public $mapurl; public function __construct($googleMapsKey = '', $defaultLocationAction = '', - $openLinksInNewWindow = false, $hosturl = '', $hostgroupurl = '', - $serviceurl = '', $servicegroupurl = '', $mapurl = '') + $openLinksInNewWindow = false, $htmlbase = '', $htmlcgi = '', + $hosturl = '', $hostgroupurl = '', $serviceurl = '', $servicegroupurl = '', $mapurl = '') { $this->googleMapsKey = $googleMapsKey; $this->defaultLocationAction = $defaultLocationAction; $this->openLinksInNewWindow = $openLinksInNewWindow; + $this->htmlbase = $htmlbase; + $this->htmlcgi = $htmlcgi; $this->hosturl = $hosturl; $this->hostgroupurl = $hostgroupurl; $this->serviceurl = $serviceurl; @@ -64,6 +68,10 @@ class Settings $CORE = new GlobalCore(); $CORE->MAINCFG->setRuntimeValue('user', getUser()); + if (($htmlbase = $CORE->MAINCFG->getValue('paths', 'htmlbase')) === false) + throw new Exception('Error in NagVis configuration'); + if (($htmlcgi = $CORE->MAINCFG->getValue('paths', 'htmlcgi')) === false) + throw new Exception('Error in NagVis configuration'); if (($hosturl = $CORE->MAINCFG->getValue('defaults', 'hosturl')) === false) throw new Exception('Error in NagVis configuration'); if (($hostgroupurl = $CORE->MAINCFG->getValue('defaults', 'hostgroupurl')) === false) @@ -81,6 +89,7 @@ class Settings return new Settings((string)$xml['googleMapsKey'], (string)$xml['defaultLocationAction'], (boolean)$xml['openLinksInNewWindow'], + $htmlbase, $htmlcgi, $hosturl, $hostgroupurl, $serviceurl, $servicegroupurl, $mapurl); } diff --git a/uifx/src/modules/gmap/domain/Settings.as b/uifx/src/modules/gmap/domain/Settings.as index b794b08..b68e564 100644 --- a/uifx/src/modules/gmap/domain/Settings.as +++ b/uifx/src/modules/gmap/domain/Settings.as @@ -7,6 +7,8 @@ package modules.gmap.domain public var googleMapsKey : String; public var defaultLocationAction : String; public var openLinksInNewWindow : Boolean; + public var htmlbase : String; + public var htmlcgi : String; public var hosturl : String; public var hostgroupurl : String; public var serviceurl : String; @@ -16,6 +18,8 @@ package modules.gmap.domain public function Settings(googleMapsKey : String = "", defaultLocationAction : String = "", openLinksInNewWindow : Boolean = false, + htmlbase : String = "", + htmlcgi : String = "", hosturl : String = "", hostgroupurl : String = "", serviceurl : String = "", @@ -25,6 +29,8 @@ package modules.gmap.domain this.googleMapsKey = googleMapsKey; this.defaultLocationAction = defaultLocationAction; this.openLinksInNewWindow = openLinksInNewWindow; + this.htmlbase = htmlbase; + this.htmlcgi = htmlcgi; this.hosturl = hosturl; this.hostgroupurl = hostgroupurl; this.serviceurl = serviceurl; ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
