pfSense Forum

pfSense English Support => webGUI => Topic started by: mgittelman on January 11, 2018, 11:58:38 am

Title: Traffic Graph Inverse Reversed?
Post by: mgittelman on January 11, 2018, 11:58:38 am
This may seem like a nit picky thing, but in the live graph for traffic graph (on the dashboard and in status - traffic graph) I really like the inverse view because it's nice and clear in terms of filling out the graph so I can see what's inbound and outbound.  However, it really is inverting the directions for me!  It's displaying inbound traffic in the upward direction and outbound traffic on the bottom. 

How can I use this view, but have the direction on the graph be correct?

Title: Re: Traffic Graph Inverse Reversed?
Post by: johnpoz on January 11, 2018, 02:35:46 pm
So you want the out to be on top and the in to be on the bottom..   Sure that could be done - just have to put ina feature request or bounty to get someone to code it.
Title: Re: Traffic Graph Inverse Reversed?
Post by: mgittelman on January 11, 2018, 02:39:27 pm
Ok, just wanted to make sure I wasn't crazy and missing something.  Will do as you suggest!  Thanks!
Title: Re: Traffic Graph Inverse Reversed?
Post by: KOM on January 11, 2018, 02:49:01 pm
Or you could just accept that in this graph, north is inbound, south is outbound.  How do you determine which way is "correct"??  Is there an IEEE or ISO spec on traffic graph axes?  ;D
Title: Re: Traffic Graph Inverse Reversed?
Post by: johnpoz on January 11, 2018, 03:18:23 pm
You could turn the monitor upside down ;)  But then it will be flowing right to left...

It should be a real simple change to do what he wants, prob nobody ever asked for it before is all..

Title: Re: Traffic Graph Inverse Reversed?
Post by: mgittelman on January 11, 2018, 04:14:09 pm
Yeah, it's probably unfair of me to say what is "correct."  It's obviously just a preference.  I have always thought of inbound traffic as "down" like "downloads" or flowing down to me with uploads going up up away and out.

I'm sure many other people think of it differently or don't care.  I figured it doesn't hurt to ask though!
Title: Re: Traffic Graph Inverse Reversed?
Post by: kpa on January 12, 2018, 04:06:14 am
Network interfaces have very natural in and out directions and that is where the pfSense conventions and terminology come from.
Title: Re: Traffic Graph Inverse Reversed?
Post by: johnpoz on January 12, 2018, 04:55:10 am
he is not talking about the convention of in out.. The data would be the same - he just want to flip the graph over.. So that the out is shown on the top and in is shown on the bottom.. That is my understanding..

Its just a cosmetic thing to the graph, not changing in out data on the interface.. Just which variable gets graphed on top and which on bottom when you pick inverse.
Title: Re: Traffic Graph Inverse Reversed?
Post by: KOM on January 12, 2018, 08:56:42 am
Quote
I figured it doesn't hurt to ask though!

It certainly doesn't.  In fact, that's how some new features and fixes have appeared over the years.
Title: Re: Traffic Graph Inverse Reversed?
Post by: johnpoz on January 12, 2018, 10:36:59 am
^ exactly... I don't see how you can change colors either - which would nice eye candy as well. That way you could use fav sportsball team colors...
Title: Re: Traffic Graph Inverse Reversed?
Post by: Gertjan on January 12, 2018, 11:32:35 am
Hi,

Inversing "In" and "Out" when using Status => Traffic Graph on WAN ?

Quick and dirty (means : I didn't look for side effects) solution  :

/usr/local/www/js/traffic-graphs.js
Goto line 290.
See
Code: [Select]
if(window.invert) {
trafficOut = 0 - trafficOut;
}
Change for
Code: [Select]
if(window.invert) {
trafficOut = 0 + trafficOut;
trafficIn = 0 - trafficIn;
}

valid for version pfSense
2.4.2-RELEASE-p1 (amd64)
built on Tue Dec 12 13:45:26 CST 2017

Works doe me :
Title: Re: Traffic Graph Inverse Reversed?
Post by: KOM on January 12, 2018, 11:53:20 am
Quote
Quick and dirty (means : I didn't look for side effects) solution

You are a stable genius.
Title: Re: Traffic Graph Inverse Reversed?
Post by: mgittelman on January 12, 2018, 07:47:12 pm
Hey look at that!  It works!

Thanks so much Gertjan!!