Red Hat Bugzilla – Bug 982587
[RFE] Use convention instead of configuration for UI plugin resources
Last modified: 2014-06-16 11:39:10 EDT
Before UI plugin resources can be served via Engine (PluginResourceServlet), a plugin must specify "resourcePath" attribute within its descriptor , for example:
After this, URLs such as "/webadmin/webadmin/plugin/test/start.html" can be used to serve resources such as /usr/share/ovirt-engine/ui-plugins/test-resources/start.html
Instead of specifying "resourcePath" in plugin descriptor, we could simply use "<descriptorFileName>-resources" convention which maps to /usr/share/ovirt-engine/ui-plugins/<descriptorFileName>-resources
This is meant to address two issues:
1. ensure each plugin has its own (unique) "resourcePath" value
2. reduce the amount of necessary metadata in plugin descriptor
Migration notes for existing plugins:
- remove "resourcePath" attribute from plugin descriptor (i.e. from test.json)
- ensure plugin resources are put in "<descriptorFileName>-resources" directory (i.e. in test-resources)
This is a breaking change with regard to current behavior/API, introducing this RFE should bump up "apiVersion" as proposed in https://bugzilla.redhat.com/967625
Yes, I think it's still relevant. This is a small & easy to implement improvement.
I've had a second thought about this RFE in the meantime. We should keep existing UI plugins backward compatible - the "<descriptorFileName>-resources" convention would be used only if "resourcePath" isn't explicitly specified.
(Note that URLs mentioned in BZ description changed in the meantime, no big deal though.)
Closing old bugs. If this issue is still relevant/important in current version, please re-open the bug.