Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1690502 - hardcoded angular data file paths
Summary: hardcoded angular data file paths
Status: NEW
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-octavia-ui
Version: 14.0 (Rocky)
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: Assaf Muller
QA Contact: Alexander Stafeyev
Depends On:
TreeView+ depends on / blocked
Reported: 2019-03-19 15:17 UTC by Arie Bregman
Modified: 2019-04-11 04:39 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed:
Target Upstream Version:

Attachments (Terms of Use)

Description Arie Bregman 2019-03-19 15:17:30 UTC
Description of problem:

Our Octavia UI unit tests are failing with:

PhantomJS 2.1.1 (Linux 0.0.0) ERROR
  ReferenceError: Can't find variable: angular

Looking at what files are packaged in 'python-XStatic-Angular' I can't find angular.js in the list:


Is that a packaging issue?
What package should provide '/usr/lib/python2.7/site-packages/xstatic/pkg/angular/data/angular.js' ?

Comment 2 Radomir Dopieralski 2019-03-19 16:01:22 UTC
The JavaScript files are provided by XStatic-Angular-common, on which python-XStatic-Angular depends, because they are independent from the Python version and thus shared between Python 2 and 3.
Also, you should use XStatic's mechanism to get the path to those files, instead of hardcoding it.

Comment 3 Arie Bregman 2019-03-19 17:13:21 UTC
Thank you Radomir. I have changed the component to Octavia UI since these files are packaged and available to us.

Comment 4 Carlos Goncalves 2019-03-22 10:31:39 UTC
Beth, did you intend to assign this BZ to yourself? If not, let's revert status to NEW and remove Triaged keyword.

Comment 5 Carlos Goncalves 2019-03-22 10:35:51 UTC
Thanks for the input, Radomir. What is "XStatic's mechanism to get the path to those files"? We're not much familiar with web front-end development.

Comment 6 Radomir Dopieralski 2019-03-22 11:05:21 UTC
There is some documentation with examples here:

Horizon has a little bit more involved code to do that:

I think that plugins can simply add to ADD_XSTATIC_MODULES setting to use that mechanism.

Comment 7 Radomir Dopieralski 2019-03-22 11:08:25 UTC
You want to just define ADD_XSTATIC_MODULES in

Comment 8 Radomir Dopieralski 2019-03-22 11:16:47 UTC
But then again, I'm pretty certain Horizon already has the Angular module in its list, so you probably just need to inherit from the right template to have it included.

Note You need to log in before you can comment on or make changes to this bug.