Author: Lars Michelsen <[email protected]>
Date: Tue Apr 30 15:58:34 2013 +0200
Committer: Lars Michelsen <[email protected]>
Commit-Date: Tue Apr 30 15:58:34 2013 +0200
Fixed some weathermap line absolute value parsing
---
ChangeLog | 2 +
.../frontend/nagvis-js/js/NagVisStatefulObject.js | 22 --------------------
2 files changed, 2 insertions(+), 22 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7072329..4d931d8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,8 @@ Automap:
Frontend:
* FIX: Fixed "Undefined index" error when changing backend_id of maps
+ * Reverted change from 1.7.5 (Weathermap lines with byte/bit values in
+ labels should print human) which broke the handling for some plugins
1.7.7
Core:
diff --git a/share/frontend/nagvis-js/js/NagVisStatefulObject.js
b/share/frontend/nagvis-js/js/NagVisStatefulObject.js
index d6d01a6..eaaf9ec 100644
--- a/share/frontend/nagvis-js/js/NagVisStatefulObject.js
+++ b/share/frontend/nagvis-js/js/NagVisStatefulObject.js
@@ -553,28 +553,6 @@ var NagVisStatefulObject = NagVisObject.extend({
if(setPerfdata[0][2] === null || setPerfdata[0][2] === ''
|| setPerfdata[1][2] === null || setPerfdata[1][2] === '') {
setPerfdata = this.calculateUsage(setPerfdata);
- } else {
- // Handle the case where a plugin like check_iftraffic.pl
or does not provide human readable
- // byte values. Calculate them.
- for(var i = 0; i < setPerfdata.length; i++) {
- if((setPerfdata[i][0] == 'inAbsolut' ||
setPerfdata[i][0] == 'outAbsolut')
- && (setPerfdata[i][2] === null || setPerfdata[i][2]
=== '' || setPerfdata[i][2] === 'B')) {
- // Hack: The following NagVis code assumes that
perfdata sets are structured as follows:
- // 0: in percentage
- // 1: out percentage
- // 2: in bytes/bits
- // 3: in bytes/bits
- // This rewrites the found indexes when needed. It
is kind of a hack, but works
- // for the moment and should not break existing
setups.
- var iNew = i;
- if(setPerfdata[i][0] == 'inAbsolut' && i != 2) {
- iNew = 2;
- } else if(setPerfdata[i][0] == 'outAbsolut' && i
!= 3) {
- iNew = 3;
- }
- setPerfdata[iNew] =
this.perfdataCalcBitsReadable(setPerfdata[i]);
- }
- }
}
// Get colorFill #1 (in)
------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins