Netgate SG-1000 microFirewall

Author Topic: Traffic Graphs Broken in 2.4.0.b.20170512.1940?  (Read 2826 times)

0 Members and 1 Guest are viewing this topic.

Offline PiBa

  • Hero Member
  • *****
  • Posts: 840
  • Karma: +133/-1
  • PiBa-NL(on IRC)
    • View Profile
Re: Traffic Graphs Broken in 2.4.0.b.20170512.1940?
« Reply #30 on: January 30, 2018, 02:20:35 pm »
Is it possible to click on the "Uncaught SyntaxError: Invalid or unexpected token" line? Does it show some other file/script where that syntax error is present.?

The second error where 'nv' is not defined is probably caused by the first syntax error skipping parts of code that is available..

Offline shimano

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Traffic Graphs Broken in 2.4.0.b.20170512.1940?
« Reply #31 on: January 30, 2018, 05:29:52 pm »
No, i can only click on nv.d3.js:9656  right next to invalid or unexpected token and is shows this.

Offline shimano

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Traffic Graphs Broken in 2.4.0.b.20170512.1940?
« Reply #32 on: January 31, 2018, 11:36:11 am »
Any ideas what i should do so i can have a working traffic graph ?

Offline PiBa

  • Hero Member
  • *****
  • Posts: 840
  • Karma: +133/-1
  • PiBa-NL(on IRC)
    • View Profile
Re: Traffic Graphs Broken in 2.4.0.b.20170512.1940?
« Reply #33 on: January 31, 2018, 12:41:14 pm »
What does line 9656 of that file look like?

And a bit around it.

Offline shimano

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Traffic Graphs Broken in 2.4.0.b.20170512.1940?
« Reply #34 on: January 31, 2018, 02:14:43 pm »
Code: [Select]
  function mouseover_line(evt) {
                var yaxis = data[evt.seriesIndex].yAxis === 2 ? yAxis2 : yAxis1;
                evt.value = evt.point.x;
                evt.series = {
                    value: evt.point.y,
                    color: evt.point.color,
                    key: evt.series.key
                };
                tooltip
                    .duration(0)
                    .headerFormatter(function(d, i) {
                        return xAxis.tickFormat()(d, i);
                    })
                    .valueFormatter(function(d, i) {
                        return yaxis.tickFormat()(d, i);
                    })
                    .data(evt)
                    .hidden(false);
            }

            function mouseover_scatter(evt) {
                var yaxis = data[evt.seriesIndex].yAxis === 2 ? yAxis2 : yAxis1;
                evt.value = evt.point.x;
                evt.series = {
                    value: evt.point.y,
                    color: evt.point.color,
                    key: evt.series.key
                };
                tooltip
                    .duration(100)
                    .headerFormatter(function(d, i) {
                        return xAxis.tickFormat()(d, i);
                    })
                    .valueFormatter(function(d, i) {
                        return yaxis.tickFormat()(d, i);
                    })
                    .data(evt)
                    .hidden(false);
            }

            function mouseover_stack(evt) {
                var yaxis = data[evt.s

Offline PiBa

  • Hero Member
  • *****
  • Posts: 840
  • Karma: +133/-1
  • PiBa-NL(on IRC)
    • View Profile
Re: Traffic Graphs Broken in 2.4.0.b.20170512.1940?
« Reply #35 on: January 31, 2018, 02:24:30 pm »
Not sure what happened there.. that line should be longer.:
https://github.com/pfsense/pfsense/blob/ad1e294ce5a735b680aa9ef93f25906077c8812d/src/usr/local/www/vendor/nvd3/nv.d3.js#L9656 and should be still quite a few lines after it as well..


Can you check with diagnostics\editfile or perhaps your favorite SCP client what the file "/usr/local/www/vendor/nvd3/nv.d3.js" on pfSense itself looks like? Is it complete?


If the file is incomplete you could try and run:  pkg install -f pfSense-base    on the pfSense console or ssh connection to re-install it..

Offline shimano

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Traffic Graphs Broken in 2.4.0.b.20170512.1940?
« Reply #36 on: January 31, 2018, 03:32:37 pm »
I don't know if its complete or not, but this is how it looks like, can you tell me if it is ok ?

I added to a text file as i cannot paste it here to long.
« Last Edit: January 31, 2018, 03:37:50 pm by shimano »

Offline PiBa

  • Hero Member
  • *****
  • Posts: 840
  • Karma: +133/-1
  • PiBa-NL(on IRC)
    • View Profile
Re: Traffic Graphs Broken in 2.4.0.b.20170512.1940?
« Reply #37 on: January 31, 2018, 03:43:49 pm »
Looks like its only 9656 lines, while there should be 14354 like in the link so definitely not ok.. https://github.com/pfsense/pfsense/blob/ad1e294ce5a735b680aa9ef93f25906077c8812d/src/usr/local/www/vendor/nvd3/nv.d3.js#L14354

Can you run the pkg command mentioned, and check again.?

Offline shimano

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Traffic Graphs Broken in 2.4.0.b.20170512.1940?
« Reply #38 on: January 31, 2018, 03:59:57 pm »
Thank you ever so much ! now it works perfectly !!

Thanks so so much for your effort to help i so appreciate it you earn a lot of respect, if i can ever repay you for your help just le me know:

Code: [Select]
[2.4.2-RELEASE][root@pfSense.shimano.home]/root: pkg install -f pfSense-base
Updating pfSense-core repository catalogue...
pfSense-core repository is up to date.
Updating pfSense repository catalogue...
pfSense repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The following 1 package(s) will be affected (of 0 checked):

Installed packages to be REINSTALLED:
        pfSense-base-2.4.2_1 [pfSense-core]

Number of packages to be reinstalled: 1

Proceed with this action? [y/N]: y
[1/1] Reinstalling pfSense-base-2.4.2_1...
[1/1] Extracting pfSense-base-2.4.2_1: 100%
===> Keeping a copy of current version mtree
===> Removing schg flag from base files
===> Extracting new base tarball
===> Removing static obsoleted files
[2.4.2-RELEASE][root@pfSense.shimano.home]/root:

Offline PiBa

  • Hero Member
  • *****
  • Posts: 840
  • Karma: +133/-1
  • PiBa-NL(on IRC)
    • View Profile
Re: Traffic Graphs Broken in 2.4.0.b.20170512.1940?
« Reply #39 on: January 31, 2018, 05:00:07 pm »
Ok great :).
Next issue, please do fill in a different 'monitor ip' on your wan gateway, one that that responds to ping, so the gateway wont show as 'down' with 100% loss, and the quality monitoring rrd's will contain some better data ;). But well that should probably go into a different topic 8).

Offline shimano

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Traffic Graphs Broken in 2.4.0.b.20170512.1940?
« Reply #40 on: January 31, 2018, 05:02:08 pm »
Ok i will open another topic for that i don't know how to do it and would be really nice to work, but i am not sure if it will work since i have a pppoe with dynamic ip gateway and ip always changes