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

Update multiple widgets with single HTTP Request #610

Open
ShalvinAbraham opened this issue Sep 2, 2015 · 1 comment
Open

Update multiple widgets with single HTTP Request #610

ShalvinAbraham opened this issue Sep 2, 2015 · 1 comment

Comments

@ShalvinAbraham
Copy link

Dear Team,

Is it possible to update multiple widgets with same HTTP API Call ?

My application is a Software Test Automation Framework, and I need to report the status using Dashboard. I am pretty much fine with the Meter gadget, and am using four of then to display different statuses as below.

<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
  <div data-id="pass" data-view="Meter" data-title="Pass" data-min="0" data-max="100" style="background-color:green" ></div>
</li>

<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
  <div data-id="fail" data-view="Meter" data-title="Fail" data-min="0" data-max="100" style="background-color:red" ></div>
</li>

<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
  <div data-id="norun" data-view="Meter" data-title="No Run" data-min="0" data-max="100" style="background-color:blue" ></div>
</li>

<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
  <div data-id="notcompleted" data-view="Meter" data-title="Not Completed" data-min="0" data-max="100" style="background-color:orange" ></div>
</li>

Currently, I need to update all four separately using four curl calls. Considering the fact that the dashboard is hosted in a different server, it is taking considerable time to get it updated, as need to execute 1000s of test cases and for each case, I need to update the status too.

Is there any way I can do this update with single HTTP Call?

Or

Is there any way to trigger a job with data being passed as JSON when HTTP request occurs? If so, I can get the values form the request and use send_event to update all four statuses.

Any help would be much appreciated.

Thanks,
Shalvin

@terraboops
Copy link
Contributor

This is hard because you are not doing things the way Dashing intends you to.

Dashing jobs are supposed to PULL data into the widgets. The API is more for fun or the odd use case here and there -- it certainly should not be the main way that you pass data to widgets. If you are unable to query your test framework for data, then store it somewhere and poll that thing in your jobs. MySQL, redis, MongoDB or any other Data-storage system would work just fine.

Also, please close this issue and direct all future Support Requests to StackOverflow, as defined in the Contribution Guidelines. When you create an issue or pull-request, it is shown in a big yellow box above where you type the title.

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

2 participants