ripienaar/gdash

Center align dashboard body

keymon opened this issue · 10 comments

In last changes the alignment of the dashboard body is on the left, instead of centre as it was before. Probably it is easy to change, but I am not a web developer and probably it will take me a while find out how.

Can anybody change the alignment as it was before?

Not sure what you mean. Looks sort of centered to me (a bit more to the right). Which view are you referring to?

I'm seeing this as well. See attached image.

There's a relatively easy fix (using span and offset) but I think a bit more refactoring of dashboard.rb is in order. I'm taking a stab at it.
offset

54a8dec uses the bootstrap grid rather than a table to lay out the graphs. @falkenbt and @keymon, would you guys be willing to test out that branch? At a minimum it fixed the alignment problem.

I will test tomorrow.

@bwhaley 54a8dec works fine for me.
+1

@bwhaley tested 54a8dec and also works fine for me!

Unfortunately I don't think this works well for layouts with anything other than 2 columns. With 1 column it is not centered, and with 3 columns the graphs are too small. I'm going to hold off on merging this until I can test bootstrap 2.1, which apparently has support for offsets with fluid layout.

Ok, I resolved the centering problem for other column counts in the bootstrapped_grid branch. The graphs are really small for layouts with > 2 columns, but that's unavoidable for now. Any more comments on this?

+1 Works OK for me.

👍
Work fine for me with three columns using a width of 480px per graph (on a 1920px screen).