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

Rotating dashboards #369

Closed
GreatPotato opened this issue Jun 3, 2014 · 5 comments
Closed

Rotating dashboards #369

GreatPotato opened this issue Jun 3, 2014 · 5 comments

Comments

@GreatPotato
Copy link

We've setup lots of dashing dashboards - different departments need different data. This all works great out of the box.

What we'd really like to do is have our management to rotate between all dashboards - is there anyway to do this? Would this be something to make the browser do instead? Not sure on the best approach for this...

Would love your thoughts!

@Havelock-Vetinari
Copy link

It would be great to include those nice transitions https://gist.github.com/jwalton/6670630 and to create aggregating dashboard which would take list of rotating dashboards as parameter, ie.
http://dashing/cycle/20/dash1/dash2/dash3
where first argument is a time of each slide and following arguments are names of dashboards
It may be also suitable to allow passing arguments to dashboards
http://dashing/cycle/20/dash1,param1=foo,param2=bar/dash2,paramFoo=1/dash3,paramBar=true

@m87h
Copy link

m87h commented Jun 3, 2014

@GreatPotato It's unclear to me whether you wanted per-request control over which dashboards are shown, but let me describe our setup. We use a combination of the aforementioned gist and PR #306 (purely to keep things organized).

Pretty straightforward:

dashboards
├── layout.slim
├── department1
│   ├── dash1.slim
│   ├── dash2.slim
└── department1.slim
├── department2
│   ├── dash1.slim
│   ├── dash2.slim
└── department2.slim
└── company.slim

department1.slim, department2.slim, [...departmentN.slim] and company.slim are all aggregating dashboards. For example (company.slim):

script type="text/javascript"
  | Dashing.on('ready', function() {
  |   Dashing.cycleDashboards({timeInSeconds: 60});
  | });

== Slim::Template.new('dashboards/department1/dash1.slim').render
== Slim::Template.new('dashboards/department1/dash2.slim').render
== Slim::Template.new('dashboards/department2/dash1.slim').render
== Slim::Template.new('dashboards/department2/dash2.slim').render

We can trigger individual dashboards (e.g. /department1/dash1) as well as aggregating ones (e.g. /department1). At this point you could add per-request control (e.g. /company?dashboards=department1/dash2,department2/dash1) via a parameter like so:

script type="text/javascript"
  | Dashing.on('ready', function() {
  |   Dashing.cycleDashboards({timeInSeconds: 60});
  | });

- (params["dashboards"] || "").split(",").each do |dashboard|
  == Slim::Template.new("dashboards/#{dashboard.gsub(/(\.\./)+/, '')}.slim").render

Note: better escaping of dashboard is necessary. Example is purposely simplistic for brevity.

@yonbergman
Copy link

@GreatPotato did you check out cyclist? https://github.com/vrish88/sinatra_cyclist

@terraboops
Copy link
Contributor

There are a number of options in this list: https://github.com/Shopify/dashing/wiki/Additional-Widgets#other-third-party-tools

Please close this issue.

@cpg
Copy link

cpg commented Oct 26, 2015

@protomouse Did you (or anyone else) document anywhere how to run dashboards with slim? I could not find much about that and it would be very useful.

I tried the obvious, adding slim to the Gemfile and renaming the dashbaords to .html.slim or just .slim,and it does not seem to work. I see that you include the parts of a dashboard, however, how does the layout and the main entry point for a dashboard?

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

No branches or pull requests

7 participants