Commit Graph

3 Commits

Author SHA1 Message Date
Matt Borland 20bc6e1516 Make 'switch' between legacy and Angular Images
This patch follows on the example that the Containers set, providing
a 'switch' in the panel-enablement file that currently defaults to
'legacy' (Python-based Images panel) and allows for 'angular' (Angular-
based Images panel).

To be clear, this does NOT enable Angular Images.  It's just setting the
stage to do so at some point, or to allow deployers/devs to easily switch
between the two.

A switch both for HORIZON_CONFIG and for integration tests is necessary
due to the way integration tests operate.

Co-Authored-By: Timur Sufiev <tsufiev@mirantis.com>
Change-Id: I12cd33552218ed1082d2d9a2ae8982639a217a6a
Partially-Implements: blueprint angularize-images-table
2016-08-05 08:17:21 -06:00
Richard Jones 8e2af22a27 Remove unnecessary brackets from enabled files
These brackets are unnecessary and potentially confusing (are
they supposed to be tuples, but without the commas?)

It looks like the brackets are leftovers of cut-n-paste from
other files where the brackets were used to enclose split-line
strings.

Change-Id: Id0208d138562a865185f238b8b78835e25d8a3c4
2015-09-22 11:44:48 +10:00
David Lyle 8303782f1e Move Horizon to pure plugin loading only
The root cause of 1479018 was the mixed method for loading content in
horizon. This patch moves horizon to load purely from enabled files.
There are a couple of things that were required to allow this change.

1) Adding a mechanism, can_register() to horizon/base.py to handle the
configuration based loading checks that had been accumulating in the
panel.py files. This is an optional static method in Panel to
encapsulate such configuration (read settings) based panel loading
logic. And added testing for and documentation for this addition.

2) Create a numbering scheme for plugins. Moved the base dashboards to
_1000_project.py _2000_admin.py _3000_identity.py _5000_settings.py.
then populated the required panel_group and panel enabled files sparsely
in those ranges. The sparseness is to allow for future additions.
Additionally, I moved the already added Angular based panels next to
their Django counterparts.

Once the configuration loading was normalized, the bug reported in
1479018 was resolved and tests work with plugins panels in all
dashboards.

Close-Bug: #1479018
Partially implements: blueprint plugin-sanity

Change-Id: I657e7ce37b2593a901a859cebf3d6ff8ada91941
2015-08-03 14:49:31 -06:00