Ask Your Question
0

How to pass data to horizon datatable

asked 2013-04-22 11:58:16 -0600

neumerance gravatar image

updated 2013-06-11 10:18:11 -0600

fifieldt gravatar image

I am having a problem passing a data to a horizon datatable. Can you please have me some example fetching a data from openstack_dashboard.api.nova and pass it to a table. I have tried to do this but it always gives me an error telling the object is not itterable, i am using

usage = api.nova.usage_get(self.request, self.tenant_id, start, end)

and also , i would like to know how am i going to test what will be the the return of the above line of code, so that i could put the right key on every tables column.

I hope someone who could help me on this.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2013-04-25 10:08:46 -0600

jpichon gravatar image

Datatables are used all over the Horizon dashboards which should give you plenty of examples, for instance:

See also http://docs.openstack.org/developer/horizon/ref/tables.html#class-based-views for the documentation.

To figure out what this API returns, you have several options:

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

Stats

Asked: 2013-04-22 11:58:16 -0600

Seen: 249 times

Last updated: Apr 25 '13