Project

General

Profile

Actions

Bug #9321

closed

Traffic Graphs on Dashboard not loading with certain types of interfaces

Added by Flole Systems about 5 years ago. Updated over 4 years ago.

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

0%

Estimated time:
Plus Target Version:
Release Notes:
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.

Actions #1

Updated by Jim Pingle over 4 years 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 .

Actions #2

Updated by Flole Systems over 4 years 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.

Actions

Also available in: Atom PDF