[openstack-dev] [Horizon] naming of Javascript bits

Richard Jones r1chardj0n3s at gmail.com
Thu Jan 7 06:23:46 UTC 2016

Hi Horizon folks,

We've been pretty good about namespacing the new angular code (to the
extreme of having a bunch of very similar module files littered around, but
that's angular/JS for you, so I'm not going to go on about it <wink>).

Anyhoo. One thing I've noticed is that the services, factories and
controllers inside those modules aren't being consistently named. We have
got a mix of:

Launch Instance:

  .factory('launchInstanceModel', launchInstanceModel);

The new Images panel:

  .factory('horizon.app.core.images.row-actions.service', rowActions);

and in the same patch:

  .factory('horizon.app.core.images.actions.deleteService', deleteService);

I actually prefer the second form because it matches the filename
("row-actions.service.js") even though the module namespace doesn't match
the file path ("/static/app/core/images/table/").

Your thoughts?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20160107/f8c347a2/attachment.html>

More information about the OpenStack-dev mailing list