[openstack-dev] [Horizon][Tuskar-UI] Location for common dashboard code?
tzumainn at redhat.com
Mon Jun 9 12:45:21 UTC 2014
That makes sense. Just to take a concrete example - in tuskar-ui, our
flavors' table code (https://github.com/openstack/tuskar-ui/blob/master/tuskar_ui/infrastructure/flavors/tables.py)
uses the following code from openstack_dashboard.dashboards.admin.flavors.tables
1) extends CreateFlavor LinkAction to modify the linked url
2) extends DeleteFlavor DeleteAction to add an 'allowed' check
3) uses FlavorFilterAction FilterAction
4) uses get_size and get_disk_size methods for formatting a column value
Would it be suggested that all of the above from the admin dashboard go
I could see arguments for tuskar-ui not to extend 1) and simply create a
new LinkAction since we're using an entirely new url. 4) seems to me
that it might possibly belong in the api code. So would we just take
2) and 3) and stick it in openstack_dashboard/common/flavors/tables.py
or something. . . ?
----- Original Message -----
> I think this falls inline with other items we are working toward in
> Horizon, namely more pluggable components on panels.
> I think creating a directory in openstack_dashboard for these reusable
> components makes a lot of sense. And usage should eventually moved to
> I would suggest something as mundane as ³openstack_dashboard/common².
> On 5/28/14, 10:36 AM, "Tzu-Mainn Chen" <tzumainn at redhat.com> wrote:
> >Tuskar-UI is currently extending classes directly from
> >openstack-dashboard. For example, right now
> >our UI for Flavors extends classes in both
> >openstack_dashboard.dashboards.admin.flavors.tables and
> >openstack_dashboard.dashboards.admin.flavors.workflows. In the future,
> >this sort of pattern will
> >increase; we anticipate doing similar things with Heat code in
> >However, since tuskar-ui is intended to be a separate dashboard that has
> >the potential to live
> >away from openstack-dashboard, it does feel odd to directly extend
> >openstack-dashboard dashboard
> >components. Is there a separate place where such code might live?
> >Something similar in concept
> > ?
> >Tzu-Mainn Chen
> >OpenStack-dev mailing list
> >OpenStack-dev at lists.openstack.org
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
More information about the OpenStack-dev