Project

General

Profile

Bug #9321

Traffic Graphs on Dashboard not loading with certain types of interfaces

Added by Flole Systems about 1 year ago. Updated 3 months ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
Traffic Graphs
Target version:
-
Start date:
02/13/2019
Due date:
% Done:

0%

Estimated time:
Affected Version:
Affected Architecture:

Description

Traffic Graph is not loading at all when GRE, OpenVPN or IPSec graphs are enabled because it doesn't receive data for those.

The JS Console logs this

Uncaught TypeError: Cannot read property 'update' of undefined
    at Array.<anonymous> (traffic-graphs.js?v=1542803994:332)
    at Function.each (jquery-1.12.0.min.js?v=1542803994:2)
    at traffic-graphs.js?v=1542803994:271
    at Object.<anonymous> (d3.min.js?v=1542803994:1)
    at Object.t (d3.min.js?v=1542803994:1)
    at XMLHttpRequest.i (d3.min.js?v=1542803994:1)

It would be fine if only that one graph wouldn't load, but all graphs refuse to load then. An additional check here to make sure that only one graph fails in case something similar happens again would be a great addition aswell.

History

#1 Updated by Jim Pingle 6 months ago

  • Category set to Traffic Graphs
  • Status changed from New to Rejected

I've tried those interfaces here and graphs work fine. Might be something specific to your environment. If you still have this issue, please post on the Netgate Forum .

#2 Updated by Flole Systems 3 months ago

This seems to be a race condition somehow, it doesn't always happen and I think it was loading for me before after disabling a few because they were less graphs and they took less time to load, maybe the JS is running before the browser rendered the Graphs properly. My fix to this is line 332 of traffic-graphs.js to

if (charts[key]) { charts[key].update(); }

It would be great if someone could update the "official" traffic graphs with this little enhancement.

Also available in: Atom PDF