Skip to content
This repository has been archived by the owner on Dec 7, 2021. It is now read-only.

Auto-adjust column number to browser width #100

Open
criemen opened this issue Apr 23, 2013 · 3 comments
Open

Auto-adjust column number to browser width #100

criemen opened this issue Apr 23, 2013 · 3 comments

Comments

@criemen
Copy link

criemen commented Apr 23, 2013

Hello,
after switching to the latest HEAD, the auto-adjustment of the number of columns to the width of the browser doesn't work anymore.
We display some graphs on a dashboard in the office on a big fullhd screen in portrait orientation, and only he right half of the screen is reserved for gdash. Until the update, gdash automatically only displayed one column of graphes, now it shows the default two.
We'd also be fine with an URL parameter (which is not fullscreen, as we dislike all that black as background, it makes the graphs hard to read), but we'd like to keep the default column size to two, as the developers on their computers obviously don't want just one graph above the other.

@bwhaley
Copy link
Collaborator

bwhaley commented Apr 25, 2013

Yeah, we can add # columns as a query parameter. I can't get to it just now but will put it on the radar.

@bwhaley
Copy link
Collaborator

bwhaley commented Apr 27, 2013

Note that in the full view, you can add /1 at the end of the URL path to display just one column. This only works in the full view.

@karmalicious
Copy link

Very much later this just became an issue as more people started using gdash at my office. Some wanted two columns, others larger graphs in one columns. This is not as fancy as the auto adjust but suits the needs for us.

I patched sinatra_app.rb to accomodate columns under graph_options in the dash.yaml file in the directory.

dash.yaml
:graph_properties:
:columns: 1

sintra_app.rb
get '/:category/:dash/?*' do
...
dash_parse = YAML.load_file("#{@graph_templates}/#{params[:category]}/#{params[:dash]}/dash.yaml")
@graph_columns = dash_parse[:graph_properties][:columns] unless dash_parse[:graph_properties][:columns].nil?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants