gdash icon indicating copy to clipboard operation
gdash copied to clipboard

Auto-adjust column number to browser width

Open criemen opened this issue 12 years ago • 3 comments

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.

criemen avatar Apr 23 '13 12:04 criemen

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 avatar Apr 25 '13 03:04 bwhaley

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.

bwhaley avatar Apr 27 '13 23:04 bwhaley

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?

karmalicious avatar Mar 12 '15 11:03 karmalicious