horizon plugin framework: cannot override default enabled file by same filename

Bug #1700325 reported by Akihiro Motoki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Akihiro Motoki

Bug Description

The horizon plugin framework does not allow to override default panel settings by same filename. This leads to make operators difficult to change the order of panels from the default.

The horizon document says that "The settings are applied in alphabetical order of the filenames. If the same dashboard has configuration files in enabled and local/enabled, the local name will be used." [1] but actually both files are processed in the order of 'enabled' and then 'local/enabled'. This means the default dashboard is once registered in all cases.

This sometimes makes things difficult.
For example, if we move the floating IP panel just after the Router panel, we need to disable the default enabled file _1490_project_floating_ips_panel.py by adding a file with the same filename which contains DISABLED =True and then add locale/enabled/_1450_project_floating_ips_panel.py (for example).

[1] https://docs.openstack.org/horizon/latest/configuration/pluggable_panels.html#introduction

Akihiro Motoki (amotoki)
Changed in horizon:
assignee: nobody → Akihiro Motoki (amotoki)
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/477534

Changed in horizon:
status: New → In Progress
Changed in horizon:
milestone: none → pike-3
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/477534
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=68c57474e1f7d66245509f6b8753e8165f42d9de
Submitter: Jenkins
Branch: master

commit 68c57474e1f7d66245509f6b8753e8165f42d9de
Author: Akihiro Motoki <email address hidden>
Date: Mon Jun 26 13:19:45 2017 +0000

    plugin framework: allow operators to override embeded enabled files

    At now, the horizon plugin framework does not allow to override default panel
    settings by same filename. The embeded enabled files are always processed,
    so this leads to make operators difficult to change the order of panels
    from the default. In the original design of the plugin mechanism,
    we allow to override embeded enabled files by local/enabled files.
    For more detail, see bug 1700325.

    This commit changes import_dashboard_config to override an embeded enabled
    file by specifying a enabled file in local/enabled with the same filename.

    Closes-Bug: #1700325
    Change-Id: Id6b15848206a684eca850a8f510a8ba1608bb7bf

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 12.0.0.0b3

This issue was fixed in the openstack/horizon 12.0.0.0b3 development milestone.

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.