Project

General

Profile

Actions

Bug #7804

closed
NN

System info widget CPU usage not updating in IE. Needs Math.trunc() polyfill.

Bug #7804: System info widget CPU usage not updating in IE. Needs Math.trunc() polyfill.

Added by NOYB NOYB about 9 years ago. Updated almost 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Web Interface
Target version:
Start date:
08/23/2017
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.4
Affected Architecture:

Description

System info widget CPU usage not updating in IE. Needs Math.trunc() polyfill.

Also affected versions:
2.3.4 (gitsync), 2.3.5 (2.3)
2.4.0, 2.4.1 (2.4)

/usr/local/www/js/polyfills.js

/***
** 
** Polyfill for older browsers that don't yet have the newer "Math.trunc()" function implemented.
** Source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc#Polyfill
** Documentation: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc
** 
***/

Math.trunc = Math.trunc || function(x) {
  if (isNaN(x)) {
    return NaN;
  }
  if (x > 0) {
    return Math.floor(x);
  }
  return Math.ceil(x);
};

Updated by Anonymous about 9 years ago Actions #1

  • Assignee set to Anonymous
  • Target version set to 2.4.0

Updated by Anonymous about 9 years ago Actions #2

polyfill.js is included by foot.inc so should be available. I will attempt to reproduce. Which version of IE are you using?

Since the value in question can never be negative though, it is probably easier to just use Math.floor rather than Math.trunc

Updated by Anonymous about 9 years ago Actions #3

  • Status changed from New to Feedback

Updated by Anonymous about 9 years ago Actions #4

  • % Done changed from 0 to 100

Applied in changeset commit:ab5a3fa10e8dd2b88219a00ac410cb9ea8a0b5aa.

BK Updated by Bart K about 9 years ago Actions #5

IE 11.540 issue still present. "Retrieving CPU data" spinning gear.

Updated by Anonymous about 9 years ago Actions #6

Need to wait for the next snap. The fix has been applied but not built yet.

JP Updated by Jim Pingle almost 9 years ago Actions #7

  • Status changed from Feedback to Resolved

Works in IE now

Actions

Also available in: Atom