New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use more width for rows of graphs #2461
Conversation
fixed powerdns snmp checks
Updated default crons
Removed ping + performance graphs and tab if skip ping check
Centralised the date selector for graphs for re-use
Detect vcsa as vmware instead of generic
then fallback to the older OID subtree.
since all those fields are defined as "NOT NULL" they must be set before inserting into mysql.
Interface port permissions table (ports_perms) requires 'access_level' field to be NOT NULL
…annot defer until the end due to successive tests). Replicated EXTEND handling into freebsd branch.
change default solver to hierarchicalRepulsion, some default presets …
Updated to use env in distro script
De-dupe checks for hostname when adding hosts
fix percent bar also for quota bills
…oc/General/Contributing.md
fixes librenms#2197 Cannot insert new Bill
fix: setting user port permissions fails
Avoid having horizontal scrollbars.
Auto-Deploy finished, Test PR at http://2461.ci.librenms.org or https://2461.ci.librenms.org |
Hum, does the rebase should look like this ? |
:) Don't worry about the rebase for now. Let's test some more and see if it's all ok. We can fix the rebase later. |
Ok. I have noticed an issue with graphs that have a lot of text in their legends in resolutions between 800x600 and 1024x768. But to solve this, it would probably require to dynamically scale the text font in the graphs legend. |
Slightly reduced the height of rows of graphs
Auto-Deploy finished, Test PR at http://2461.ci.librenms.org or https://2461.ci.librenms.org |
If you just put a min height / width in at the value we use now then no one is worse off but the people with larger screens will gain. |
Auto-Deploy finished, Test PR at http://2461.ci.librenms.org or https://2461.ci.librenms.org |
Auto-Deploy finished, Test PR at http://2461.ci.librenms.org or https://2461.ci.librenms.org |
Ok actually the lazy loading has been made to remove the height/width in the img tag. I have modified the lazy loading to just remove the height tag, this way the width of each graph is the width expected and the graphs is not compressed if the legend is long. This avoid having weird padding to accommodate the unexpected extra width of some graphs. There is still a default size set to the old value if it tries to render a graphs with smaller value. Feedback ? |
I get the opposite now without the height. On graphs that looked ok as they are now, they become squashed looking as the height is calculated too big. The default images are: 215w 100h. I can shrink my browser with this now to get 215w but the height is then 176h which then looks odd :( |
Ok, I'll think about how to solve that. But my initial feeling is that it would require conserving the 215/100 ratio or similar to avoid weird looking graphs in resolution were the width x height ratio is reversed. |
Yes that sounds good. Thanks for tackling this :) |
Only display two graphs per line for resolution with width between 700x and 1024px
Auto-Deploy finished, Test PR at http://2461.ci.librenms.org or https://2461.ci.librenms.org |
I have implemented a solution that makes the height always width/2.15. I also changed the code to only fit two graphs per row on resolution with width between 700px and 1024px. I also hooked a refresh after the resize event has updated the new browser size. |
It looks good for me even on tiny screens. However: I dont want this commit-mess to be merged, if this is the final version I will rebase it for @Alucardfh and re-submit it if that's OK for you |
I agree, this PR is not good to merged (I possibly tracked my error to a merge I did instead of a rebase). The only thing that will probably need tuning at this point is the size of the tooltip on large and small screen, but that can be dealt with in another PR. @f0o : As you wish, I can also put all my changes in another PR if needed. |
OK I have made another PR #2510 which should be less painful to merge. |
Hi,
This is an attempt to allow the php code to size the graphs according the available width and height.
It uses an ajax call to populate the width and height of the browser.
To determine the size of each graph I divide the width by the number of graph to be drawn minus an arbitrary number of pixel to account for both side margins.
I have also decided to make graphs take the whole row if there is less than 800px available.
This is related to issue #2410.
Without modification :
With modification :