Project

General

Profile

Actions

Bug #7804

closed

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

Added by NOYB NOYB over 6 years ago. Updated over 6 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);
};
Actions #1

Updated by Anonymous over 6 years ago

  • Assignee set to Anonymous
  • Target version set to 2.4.0
Actions #2

Updated by Anonymous over 6 years ago

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

Actions #3

Updated by Anonymous over 6 years ago

  • Status changed from New to Feedback
Actions #4

Updated by Anonymous over 6 years ago

  • % Done changed from 0 to 100
Actions #5

Updated by Bart K over 6 years ago

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

Actions #6

Updated by Anonymous over 6 years ago

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

Actions #7

Updated by Jim Pingle over 6 years ago

  • Status changed from Feedback to Resolved

Works in IE now

Actions

Also available in: Atom PDF