Bizzare behaviour after deleting and moving widgets around

30 views
Skip to first unread message

Sid Young

unread,
Feb 18, 2014, 1:04:49 AM2/18/14
to team_da...@googlegroups.com

G'Day all,

I set up a dashboard which was running for a few minutes, then I manualy edited the widget data file to set the "enableSpinner" to true (no doco so I was testing it).. deleted 2 widgets and moved a third, after which the name of every widget changed to the dashboard name and the AJAX calls suddenly started firing continuously.

To replicate I deleted a status_table first , then an alert widget then moved a meter widget, its very repeatable!

Here is the widget initial layout:

[{"id":38323,"name":"Memory","kind":"meter","size":null,"source":"demo","targets":null,"range":"30-minutes","dashboard_id":222,"created_at":"2014-02-17T23:55:23.778Z","updated_at":"2014-02-17T23:55:23.778Z","update_interval":10,"col":3,"row":4,"size_x":1,"size_y":2,"min":0,"max":100,"aggregate_function":"average","label":"Free Memory","enableSpinner":true},
{"id":38333,"name":"HTTP","kind":"number","size":null,"source":"demo","targets":null,"range":"30-minutes","dashboard_id":222,"created_at":"2014-02-17T23:55:54.401Z","updated_at":"2014-02-17T23:55:54.401Z","update_interval":10,"col":3,"row":1,"size_x":1,"size_y":1,"use_metric_suffix":true,"graph_type":"area","aggregate_function":"average","label":"Requests","enableSpinner":false},
{"id":38353,"name":"Stats Gathering","kind":"ci","size":null,"source":"demo","targets":null,"range":null,"dashboard_id":222,"created_at":"2014-02-17T23:57:40.659Z","updated_at":"2014-02-17T23:57:40.659Z","update_interval":10,"col":3,"row":3,"size_x":1,"size_y":1,"enableSpinner":false},
{"id":38363,"name":"Status-Table","kind":"status_table","size":null,"source":"demo","targets":null,"range":null,"dashboard_id":222,"created_at":"2014-02-17T23:58:32.581Z","updated_at":"2014-02-17T23:58:32.581Z","update_interval":60,"col":4,"row":1,"size_x":1,"size_y":3,"enableSpinner":false},
{"id":38373,"name":"Alert!","kind":"alert","size":null,"source":"demo","targets":null,"range":null,"dashboard_id":222,"created_at":"2014-02-17T23:58:52.579Z","updated_at":"2014-02-17T23:58:52.579Z","update_interval":10,"col":1,"row":5,"size_x":2,"size_y":1,"enableSpinner":false},
{"id":38383,"name":"System Health","kind":"boolean","size":null,"source":"demo","targets":null,"range":null,"dashboard_id":222,"created_at":"2014-02-17T23:59:12.453Z","updated_at":"2014-02-17T23:59:12.453Z","update_interval":10,"col":3,"row":2,"size_x":1,"size_y":1,"label":"Bool-1","enableSpinner":false},
{"id":38393,"name":"Process Activity","kind":"graph","size":null,"source":"demo","targets":"target","range":"30-minutes","dashboard_id":222,"created_at":"2014-02-18T00:00:22.855Z","updated_at":"2014-02-18T00:00:22.855Z","update_interval":10,"col":1,"row":1,"size_x":2,"size_y":2,"graph_type":"line","max":100,"enableSpinner":false},
{"id":38403,"name":"Area Graph","kind":"graph","size":null,"source":"demo","targets":"Target A","range":"30-minutes","dashboard_id":222,"created_at":"2014-02-18T00:01:52.962Z","updated_at":"2014-02-18T00:01:52.962Z","update_interval":10,"col":1,"row":3,"size_x":2,"size_y":2,"graph_type":"area","max":250,"enableSpinner":false}]

Sid Young

unread,
Feb 18, 2014, 1:26:44 AM2/18/14
to team_da...@googlegroups.com
I have done some more testing and on my installation I dont need to delete widgets to replicate this, just moving them around appears to kick off the AJAX fetches andcorrupt the widget names.

Sid

Frederik Dietz

unread,
Feb 23, 2014, 4:55:14 AM2/23/14
to team_da...@googlegroups.com
Hi Sid,

I was not able to reproduce this behaviour, when creating widgets via the rails app. 

How did you create the widgets? And in what way did you modify the sources?

Please, see my last mail with pointers to documentation.

Cheers,
Frederik


--
You received this message because you are subscribed to the Google Groups "Team Dashboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to team_dashboar...@googlegroups.com.
To post to this group, send email to team_da...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/team_dashboard/2d73fde1-cbdc-410d-93fe-12c10072c2a8%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

Sid Young

unread,
Feb 27, 2014, 12:55:45 AM2/27/14
to team_da...@googlegroups.com
G'Day Frederik,

We dont do Ruby so I wrote very simple PHP scripts to provide the JSON data for the dashboard and widgets to prove it could be done. I have not modified the javascript code, just the JSON data going to it to enable the options below, the HTML file used was the demo one which I suspect is quite old.


Sid

Frederik Dietz

unread,
Feb 28, 2014, 4:18:46 AM2/28/14
to team_da...@googlegroups.com
Hi Sid,

let me summarize to check if I understand correctly what you have done.

You copied the html/javascript and pointed it to your php backend which serves the dashboards and widgets services. That way you were able to render a dashboard with widgets defined by your widgets php service.

Then you used the frontend to delete widgets and/or move them around. This does calls to the team dashboard widgets service and changes the widgets configuration in mysql. But, your php service is not aware of the changes, I assume. 

I'm not 100 percent certain if that is what you have done, but I feels like you are approaching this in the wrong way. I would suggest to use the REST API to create dashboards and widgets instead.

Cheers,
Frederik


Reply all
Reply to author
Forward
0 new messages