You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 7, 2018. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 7, 2018. It is now read-only.
I have been working very recently with the dashing framework. I was displaying a list of tasks assigned to a team. Till now, It was only one team to list and no issues so far. Now I have a set of teams & I want to display data based on data-id from .erb file. For example, the below is my erb sample.
<html>
<li data-switcher-interval="20000" data-row="2" data-col="3" data-sizex="2" data-sizey="1">
<div data-id="Team A" data-view="List" data-title="Bugs Trend for Team A" data-moreinfo="" data-top-margin="10"></div></li>
</html>
I wrote a scheduled job to get the list of all teams into an array in jobs.rb. Is there a way to send data-id to jobs.rb file, so I can filter the values from the array and call the event.
Hi Kalyan,
maybe I missed it, but where is the dynamic part of it?
If you specify a static ID in your .erb file, then you always will see the data for that ID, e.g. Team A in your example.
What is your goal?
A single widget showing the tasks of all teams, e.g. rotating (showing one team at a time)
A dedicated widget for each team
A widget on a universal dashboard that displays the tasks of a team based on some context information
(1) and (2) are trivial. For (1) you can send the corresponding data by the server's background job on a schedule. For (2) you would have a dedicated widget ID for each widget and the job sends the corresponding data to the widget IDs.
For (3) you could work with a request parameter that dynamically sets the ID of the widget in the .erb file, e.g. data-id="tasklist_<%= params[:team] %>". The background job would send data (send_event) to IDs it can generate from the data it read, e.g. targetWidgetID = "tasklist_" + $team.
Activity
slowjoe007 commentedon Jul 13, 2017
Hi Kalyan,
maybe I missed it, but where is the dynamic part of it?
If you specify a static ID in your .erb file, then you always will see the data for that ID, e.g. Team A in your example.
What is your goal?
(1) and (2) are trivial. For (1) you can send the corresponding data by the server's background job on a schedule. For (2) you would have a dedicated widget ID for each widget and the job sends the corresponding data to the widget IDs.
For (3) you could work with a request parameter that dynamically sets the ID of the widget in the .erb file, e.g.
data-id="tasklist_<%= params[:team] %>". The background job would send data (send_event) to IDs it can generate from the data it read, e.g.targetWidgetID = "tasklist_" + $team.Hope this helps,
Johannes
Diluke commentedon Sep 23, 2017
Check this Dashing Workshop from Monitorama, Part about data binding at ~30min mark might solve your question.
https://vimeo.com/95307499