[pkg-nagios-changes] [Git][nagios-team/pkg-nagvis][upstream] New upstream version 1.9.19

Bas Couwenberg gitlab at salsa.debian.org
Wed Apr 29 09:42:02 BST 2020



Bas Couwenberg pushed to branch upstream at Debian Nagios Maintainer Group / pkg-nagvis


Commits:
1f1883ad by Bas Couwenberg at 2020-04-29T10:34:04+02:00
New upstream version 1.9.19
- - - - -


5 changed files:

- ChangeLog
- share/frontend/nagvis-js/js/ElementLine.js
- share/frontend/nagvis-js/js/ViewMap.js
- share/server/core/classes/GlobalMapCfg.php
- share/server/core/defines/global.php


Changes:

=====================================
ChangeLog
=====================================
@@ -1,3 +1,10 @@
+1.9.19
+Frontend:
+  * FIX: Fix weathermap lines displaying byte/s instead of bit/s for Checkmk
+         interface checks (issue #230)
+  * FIX: New textboxes introduced with 1.9.18 broke the map configs (issue #245)
+  * FIX: Fix potential javascript error when zooming (issue #242)
+
 1.9.18
 Core:
   * Add new map global option "ignore_linked_maps_summary_state" (issue #223)


=====================================
share/frontend/nagvis-js/js/ElementLine.js
=====================================
@@ -764,7 +764,7 @@ var ElementLine = Element.extend({
         // and maximum values given to be able to calculate the percentage usage
         if (perf[0][2] === null || perf[0][2] === ''
            || perf[1][2] === null || perf[1][2] === '') {
-            perf = this.calculateUsage(perf);
+            perf = this.calculateUsage(perf, this.obj.conf.output);
         }
 
         this.perfdata = perf;
@@ -813,7 +813,7 @@ var ElementLine = Element.extend({
      * with an empty UOM. If found it uses the current value and max value
      * for calculating the percentage usage and also the current usage.
      */
-    calculateUsage: function(oldPerfdata) {
+    calculateUsage: function(oldPerfdata, output) {
         var newPerfdata = [];
         var foundNew = false;
         var line_label_in = 'in';
@@ -823,8 +823,10 @@ var ElementLine = Element.extend({
         // can be made by some curios hack. The most hackish hack I've ever seen. From hell.
         // Well, let's deal with it.
         var display_bits = false;
-        if(oldPerfdata.length >= 11 && oldPerfdata[10][5] == '0.0')
-            display_bits = true;
+        output = output.match("In: [0-9](.*)Out: [0-9]")[1] || "";
+        if(output.includes("bit/s")){
+            display_bits=true;
+        }
 
         // This loop takes perfdata with the labels "in" and "out" and uses the current value
         // and maximum values to parse the percentage usage of the line


=====================================
share/frontend/nagvis-js/js/ViewMap.js
=====================================
@@ -237,7 +237,7 @@ var ViewMap = View.extend({
         var parents = obj.getParentObjectIds();
         if (parents) {
             for (var parentObjId in parents) {
-                this.objects[parentObjId].addChild(obj);
+                if (isset(this.objects[parentObjId])) this.objects[parentObjId].addChild(obj);
             }
         }
     },


=====================================
share/server/core/classes/GlobalMapCfg.php
=====================================
@@ -301,7 +301,7 @@ class GlobalMapCfg {
         // here.
         if(version_compare(PHP_VERSION, '5.1.2', '==')) {
             $file = file($this->configFile);
-        } else { 
+        } else {
             $file = file($this->configFile, FILE_SKIP_EMPTY_LINES | FILE_IGNORE_NEW_LINES);
         }
 
@@ -624,7 +624,7 @@ class GlobalMapCfg {
             } else {
                 $val = $_REQUEST[$key];
             }
-                
+
             if(!$only_customized || ($val != $this->getValue(0, $key))) {
                 return $val;
             }
@@ -634,7 +634,7 @@ class GlobalMapCfg {
             $userParams = $USERCFG->getValue('params-' . $this->name);
             if(isset($userParams[$key])) {
                 return $userParams[$key];
-                
+
             } elseif(!$only_user_supplied) {
                 // Otherwise use the map global value (if allowed)
                 return $this->getValue(0, $key);
@@ -1545,6 +1545,8 @@ class GlobalMapCfg {
             if(is_array($val))
                 $val = implode(',', $val);
 
+            $val = str_replace( "\n", '<br/>', $val );
+
             $newLine = $key.'='.$val."\n";
 
             if($lineNum !== null && $newLine !== '') {


=====================================
share/server/core/defines/global.php
=====================================
@@ -23,7 +23,7 @@
  *****************************************************************************/
  
 // NagVis Version
-define('CONST_VERSION', '1.9.18');
+define('CONST_VERSION', '1.9.19');
 
 // Set PHP error handling to standard level
 // Different levels for php versions below 5.1 because PHP 5.1 reports



View it on GitLab: https://salsa.debian.org/nagios-team/pkg-nagvis/-/commit/1f1883adb88a9a8320eacc20caf2756f41fedd56

-- 
View it on GitLab: https://salsa.debian.org/nagios-team/pkg-nagvis/-/commit/1f1883adb88a9a8320eacc20caf2756f41fedd56
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-nagios-changes/attachments/20200429/076895f6/attachment-0001.html>


More information about the pkg-nagios-changes mailing list