Horizon dashboard drop down menus and collapsible items unclickable after installing dashboard plugin

Bug #1591911 reported by Murad Awawdeh
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Invalid
High
Paul Karikh

Bug Description

Detailed bug description:
 After installing my horizon dashboard plugin on Horizon deployed by Fuel, all the left sidebar collapsible items become unclickable and won't open sub-menu.
This only happen if the custom plugin has js files in the "static" folder. If the set the attribute "AUTO_DISCOVER_STATIC_FILES = False" and remove any lines of explicit javascript inclusion, Horizon dashbaord will work properly.
I tried also to include empty js file, or js file with only alert("") for example and the issue is produced.

Steps to reproduce:
 1. install the plugin using ".deb" file.
 2. browse horizon Dashboard, left sidebar will become unclickable

Expected results:
 Bad: left sidebar will become should stay clickable

Actual result:
 Good: left sidebar will become unclickable

Reproducibility:
 <put your information here>

Workaround:
 - move js code into panels html files which is bad approach.

Description of the environment:
- Operation system: Ubuntu
- Versions of components: Horizon deployed by Mirantis Fuel liberty
- Related projects installed: openstack/horizon

Additional information:
 - github of the plugin: https://github.com/openstack/horizon-mellanox
 - ".deb" file is attached
 - screenshot attached

Tags: area-horizon
Revision history for this message
Murad Awawdeh (murada) wrote :
Revision history for this message
Murad Awawdeh (murada) wrote :
description: updated
Revision history for this message
Bug Checker Bot (bug-checker) wrote : Autochecker

(This check performed automatically)
Please, make sure that bug description contains the following sections filled in with the appropriate data related to the bug you are describing:

actual result

For more detailed information on the contents of each of the listed sections see https://wiki.openstack.org/wiki/Fuel/How_to_contribute#Here_is_how_you_file_a_bug

tags: added: need-info
Murad Awawdeh (murada)
description: updated
tags: removed: need-info
Murad Awawdeh (murada)
information type: Public → Public Security
information type: Public Security → Public
Timur Sufiev (tsufiev-x)
Changed in mos:
milestone: none → 8.0-updates
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Paul Karikh (pkarikh)
Revision history for this message
Paul Karikh (pkarikh) wrote :

Looks like the issue is not with horizon or mellanox_dashboard, but with its deb package.
I've reproduced the problem and seen that Chrome developer console has horizon.app is missing. That's why all javascript things (like dropdowns) are broken.

After that I disabled compressing static files with COMPRESS_ENABLED = False in local_settings.py and after restarting apache I've got an error that Horizon faled to load horizon_mellanox.js. I belive that happened because horizon_mellanox directory with all its content is present in
 /usr/share/openstack-dashboard/openstack_dashboard/static/ dir, but is missing in /usr/share/openstack-dashboard/static dirm where all static files are placed after running manage.py collectstatic command.

So, after running './manage.py collectstatic --clear --noinput && ./manage.py compress' and 'service apache2 restart' everything works fine. Thus, I believe that this bug is invalid for Horizon since code is fine.

Changed in mos:
status: Confirmed → Invalid
Revision history for this message
Murad Awawdeh (murada) wrote :

Thank you very much Paul,

Where I can find that manage.py ?

is a file I should add to my plugin? or its a Horizon file.

As I can understand, I think that I should add these command to be executed in "deb" package:
./manage.py collectstatic --clear --noinput && ./manage.py compress
service apache2 restart

and do manage.py copy static files to "/usr/share/openstack-dashboard/static" ?

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.