Relocating panel to a different dashboard via Pluggable Settings causes TemplateDoesNotExist
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Dashboard (Horizon) |
In Progress
|
Medium
|
Vishal Manchanda |
Bug Description
Steps to reproduce:
1. Move users panel to be under admin dashboard by modifying _3030_identity_
2. Set PANEL_GROUP = 'admin'
3. Set PANEL_DASHBOARD = 'admin'
Expected:
1. Users panel to be under Admin panel group in the navigation.
2. Users panel to load.
Actual:
1. Users panel under Admin panel group in the navigation.
2. Users panel would generate a TemplateDoesNot
Observations:
This issue is due to Dashboard.register populates the panel_template_dirs for horizon template loader with the key "admin/users" for the Identity Users panel. However, TemplateLoader.
description: | updated |
Changed in horizon: | |
status: | New → Confirmed |
importance: | Undecided → High |
milestone: | none → next |
Changed in horizon: | |
assignee: | nobody → Alan Fung (alanfung) |
Changed in horizon: | |
assignee: | Alan Fung (alanfung) → Richard Jones (r1chardj0n3s) |
description: | updated |
Changed in horizon: | |
status: | In Progress → Confirmed |
As a suggestion to address this, we can modify Dashboard.register to generate the key from panel_dir (directory of the panel) instead of appending cls.slug and panel.slug.
Both approaches to generate the key make assumptions about the file layout, but the suggested is less fallible and compatible with (what I presume) to be a function of Pluggable Settings, which is the flexibility of moving panel to any dashboard.