Author:   Lars Michelsen <[email protected]>
Date:     Wed Jul 17 17:39:46 2013 +0200
Committer:   Lars Michelsen <[email protected]>
Commit-Date: Wed Jul 17 17:39:46 2013 +0200

several small fixes after latest changes

---

 .f12                                               |    2 +-
 .../frontend/nagvis-js/js/NagVisStatefulObject.js  |    8 +++++---
 share/server/core/sources/automap.php              |    2 +-
 share/server/core/sources/filter.php               |    6 +++---
 4 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/.f12 b/.f12
index 5968719..3c9b353 100755
--- a/.f12
+++ b/.f12
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-[ -z $SITE ] && SITE=event
+[ -z $SITE ] && SITE=$(omd sites --bare | head -n1)
 which sudo >/dev/null 2>&1 && SUDO=sudo || SUDO=
 BASE=$(pwd)
 
diff --git a/share/frontend/nagvis-js/js/NagVisStatefulObject.js 
b/share/frontend/nagvis-js/js/NagVisStatefulObject.js
index e91421d..b646498 100644
--- a/share/frontend/nagvis-js/js/NagVisStatefulObject.js
+++ b/share/frontend/nagvis-js/js/NagVisStatefulObject.js
@@ -824,9 +824,11 @@ var NagVisStatefulObject = NagVisObject.extend({
      * @author Lars Michelsen <[email protected]>
      */
     updateLabel: function () {
-        var label  = document.getElementById(this.conf.object_id + '-label');
-        this.updateLabelPos(label);
-        label  = null;
+        var label = document.getElementById(this.conf.object_id + '-label');
+        if (label) {
+            this.updateLabelPos(label);
+            label = null;
+        }
     },
 
     /**
diff --git a/share/server/core/sources/automap.php 
b/share/server/core/sources/automap.php
index ff1a62e..b02c4a7 100644
--- a/share/server/core/sources/automap.php
+++ b/share/server/core/sources/automap.php
@@ -407,7 +407,7 @@ function automap_get_object_tree($MAPCFG, $params, 
&$saved_config) {
     if(isset($params['parent_layers']) && $params['parent_layers'] != 0) {
         global $_BACKEND;
         
-        if($_BACKEND->checkBackendFeature($params['backend_id'], 
'getDirectParentNamesByHostName')) {
+        if($_BACKEND->checkBackendFeature($params['backend_id'][0], 
'getDirectParentNamesByHostName')) {
             automap_fetch_tree('parents', $MAPCFG, $params, $saved_config, 
$root_name, $params['parent_layers'], $root_obj['.parents']);
         }
     }
diff --git a/share/server/core/sources/filter.php 
b/share/server/core/sources/filter.php
index 83219f0..859e011 100644
--- a/share/server/core/sources/filter.php
+++ b/share/server/core/sources/filter.php
@@ -47,10 +47,10 @@ function filter_hostgroup(&$map_config, $p) {
 
     // Initialize the backend
     global $_BACKEND;
-    $_BACKEND->checkBackendExists($p['backend_id'], true);
-    $_BACKEND->checkBackendFeature($p['backend_id'], 
'getHostNamesInHostgroup', true);
+    $_BACKEND->checkBackendExists($p['backend_id'][0], true);
+    $_BACKEND->checkBackendFeature($p['backend_id'][0], 
'getHostNamesInHostgroup', true);
 
-    $hosts = 
$_BACKEND->getBackend($p['backend_id'])->getHostNamesInHostgroup($p['filter_group']);
+    $hosts = 
$_BACKEND->getBackend($p['backend_id'][0])->getHostNamesInHostgroup($p['filter_group']);
 
     // Remove all hosts not found in the hostgroup
     $hosts = array_flip($hosts);


------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to