Panels get broken with COMPRESS_OFFLINE = True

Bug #1659620 reported by Leandro Reox
52
This bug affects 12 people
Affects Status Importance Assigned to Milestone
Designate Dashboard
Invalid
Critical
Unassigned
Newton
Invalid
High
Unassigned
designate-dashboard (Ubuntu)
Invalid
Undecided
Unassigned
openstack-dashboard (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Horizon version: newton from ubuntu packages

Tested designate-dashboard:

- newton (since mitaka doesnt support v2)
- master

Behaviour

After installing the panel, the JS of the forms is broken, for example the "create zone" button shows nothing on the form. With COMPRESS ENABLE = False, the designate panel works fine, but we need this to speed up usage of the interface

Steps to reproduce the bug

- Install openstack-dashboard package newton version on Ubuntu 16.04
- Configure the flag COMPRESS_OFFLINE = True on the local_settings.py file
- Install the designate dashboard - pip install "git+https://github.com/openstack/designate-dashboard@stable/newton" or pip install "git+https://github.com/openstack/designate-dashboard"
- Copy panel files to horizon path: cp _1710_project_dns_panel_group.py _1721_dns_zones_panel.py _1722_dns_reversedns_panel.py /usr/share/openstack-dashboard/openstack_dashboard/local/enabled/
- Collect the designate panel static files - python manage.py collectstatic
- Compress blocks - python manage.py compress
- Restart webserver service apache2 reload
- Access the dasboard -> DNS -> Zones -> Create zone (its empty, following error on the browser console )

TypeError: args.fieldFrag.firstChild.setAttribute is not a function
    at sfField (http://192.168.90.200/static/dashboard/js/c2f138901968.js:6557:619)
    at http://192.168.90.200/static/dashboard/js/c2f138901968.js:6566:311
    at Array.forEach (native)
    at http://192.168.90.200/static/dashboard/js/c2f138901968.js:6566:290
    at Array.reduce (native)
    at build (http://192.168.90.200/static/dashboard/js/c2f138901968.js:6563:222)
    at Object.build (http://192.168.90.200/static/dashboard/js/c2f138901968.js:6568:103)
    at internalRender (http://192.168.90.200/static/dashboard/js/c2f138901968.js:6673:153)
    at render (http://192.168.90.200/static/dashboard/js/c2f138901968.js:6671:906)
    at http://192.168.90.200/static/dashboard/js/c2f138901968.js:6674:326

Changed in designate-dashboard:
importance: Undecided → Critical
status: New → Triaged
milestone: none → ocata-rc1
Changed in designate-dashboard (Ubuntu):
status: New → Confirmed
status: Confirmed → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in designate-dashboard (Ubuntu):
status: New → Confirmed
Revision history for this message
Graham Hayes (grahamhayes) wrote :

I think this is an issue with the Ubuntu package for the main dashboard package - there is wierdness in the manage.py collect and compress steps.

From scratch source, this works

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in openstack-dashboard (Ubuntu):
status: New → Confirmed
Revision history for this message
Dr. Jens Harbott (j-harbott) wrote :

Yes, openstack-dashboard is broken with respect to additional dashboard packages in Newton or earlier. This was fixed for Ocata, please try with a newer UCA version whether the issue still exists there. The fix cannot be backported to Newton without breaking existing installations.

Revision history for this message
György Szombathelyi (gyurco) wrote :

Seems it is broken in Pike.

Revision history for this message
Burkhard Linke (blinke) wrote :

Also broken in queens:

Error: args.fieldFrag.firstChild.setAttribute is not a function
sfField@https://cloud.computational.bio.uni-giessen.de/horizon/static/dashboard/js/732ce617825a.js:7011:593
build/</<@https://cloud.computational.bio.uni-giessen.de/horizon/static/dashboard/js/732ce617825a.js:7020:311
build/<@https://cloud.computational.bio.uni-giessen.de/horizon/static/dashboard/js/732ce617825a.js:7020:280
build@https://cloud.computational.bio.uni-giessen.de/horizon/static/dashboard/js/732ce617825a.js:7017:216
build@https://cloud.computational.bio.uni-giessen.de/horizon/static/dashboard/js/732ce617825a.js:7022:103
internalRender@https://cloud.computational.bio.uni-giessen.de/horizon/static/dashboard/js/732ce617825a.js:7127:143
render/<@https://cloud.computational.bio.uni-giessen.de/horizon/static/dashboard/js/732ce617825a.js:7125:862
processQueue@https://cloud.computational.bio.uni-giessen.de/horizon/static/dashboard/js/732ce617825a.js:1469:260
scheduleProcessQueue/<@https://cloud.computational.bio.uni-giessen.de/horizon/static/dashboard/js/732ce617825a.js:1470:135
$eval@https://cloud.computational.bio.uni-giessen.de/horizon/static/dashboard/js/732ce617825a.js:1516:537
$digest@https://cloud.computational.bio.uni-giessen.de/horizon/static/dashboard/js/732ce617825a.js:1510:184
$apply@https://cloud.computational.bio.uni-giessen.de/horizon/static/dashboard/js/732ce617825a.js:1517:266
done@https://cloud.computational.bio.uni-giessen.de/horizon/static/dashboard/js/732ce617825a.js:1244:112
completeRequest@https://cloud.computational.bio.uni-giessen.de/horizon/static/dashboard/js/732ce617825a.js:1259:20
requestLoaded@https://cloud.computational.bio.uni-giessen.de/horizon/static/dashboard/js/732ce617825a.js:1253:1
732ce617825a.js:1336:114

openstack-dashboard and python-heat-dashboard from queens UCA repository, using Ubuntu 16.04.

Revision history for this message
Brosky (brosky) wrote :

The dashboard acts weird in Rocky too, Ubuntu 18.04 LTS

Installed via: apt install python-designate-dashboard, it deleted a lot of files

Preparing to unpack .../python-designate-dashboard_7.0.0-0ubuntu1~cloud0_all.deb ...
Unpacking python-designate-dashboard (7.0.0-0ubuntu1~cloud0) ...
Setting up python-designate-dashboard (7.0.0-0ubuntu1~cloud0) ...
Deleting 'js/horizon.networktopology.js'
....
Copying '/usr/share/openstack-dashboard/openstack_dashboard/themes/ubuntu/_styles.scss'
...
Copying '/usr/lib/python2.7/dist-packages/horizon/static/framework/widgets/contenteditable/contenteditable.directive.js'

1981 static files copied to '/var/lib/openstack-dashboard/static'.
Found 'compress' tags in:
        /usr/share/openstack-dashboard/openstack_dashboard/templates/serial_console.html
        /usr/share/openstack-dashboard/openstack_dashboard/templates/horizon/_conf.html
        /usr/share/openstack-dashboard/openstack_dashboard/templates/_stylesheets.html
        /usr/share/openstack-dashboard/openstack_dashboard/templates/horizon/_scripts.html
Compressing... done
Compressed 9 block(s) from 4 template(s) for 3 context(s).

After apache restart the dashboard behaves weird, especially the "Material Theme" where the "X / Close" icon is replaced with the text: xf24c and the asterisk (*) is replaced with xf5bc
See screenshot: https://snag.gy/oCcWLX.jpg

Revision history for this message
Jared Baker (shubjero) wrote :

Running Ubuntu 18.04 with openstack-dashboard 14.0.3-0ubuntu1~cloud0 and having issues with certain modals not working (create object container, create keypair, upload keypair, create server group) all popping up as blank modals. This has been a chronic issue for us for Ubuntu 16.04 and also 18.04 spanning multiple OpenStack releases but when we first upgraded to Rocky these issues were gone. We did not seem to have any issues with openstack-dashboard 14.0.2-0ubuntu4~cloud0 and this was very surprising to see however we recently upgraded to 14.0.3-0ubuntu1~cloud0 and we are now having these issues with broken modals again.

The problem seems to be related to what your memcached configuration is in /etc/openstack-dashboard/local_settings.py although I have not been able to pinpoint what exactly is the relationship between memcached and the collectstatic/compress operations building good or bad javascript.

Revision history for this message
Tobias Urdin (tobias-urdin) wrote :

Setting to invalid for this old bug – probably not an issue anymore – if it is, please update here.

Changed in designate-dashboard:
status: Triaged → Invalid
Changed in designate-dashboard (Ubuntu):
status: Confirmed → Invalid
Changed in openstack-dashboard (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.