Bug 982587 - [RFE] Use convention instead of configuration for UI plugin resources
[RFE] Use convention instead of configuration for UI plugin resources
Status: CLOSED WONTFIX
Product: oVirt
Classification: Community
Component: ovirt-engine-webadmin (Show other bugs)
unspecified
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: vszocs
bugs@ovirt.org
ux
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-09 06:52 EDT by vszocs
Modified: 2014-06-16 11:39 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-16 11:39:10 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description vszocs 2013-07-09 06:52:37 EDT
Before UI plugin resources can be served via Engine (PluginResourceServlet), a plugin must specify "resourcePath" attribute within its descriptor [1], for example:

/usr/share/ovirt-engine/ui-plugins/test.json
{
	"name": "test",
	"url": "/webadmin/webadmin/plugin/test/start.html",
	"resourcePath": "test-resources"
}

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

[1] http://www.ovirt.org/Features/UIPlugins#Plugin_descriptor
Comment 1 Itamar Heim 2013-12-08 02:21:09 EST
still relevant?
Comment 2 vszocs 2013-12-09 05:54:36 EST
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.)
Comment 3 Itamar Heim 2014-06-16 11:39:10 EDT
Closing old bugs. If this issue is still relevant/important in current version, please re-open the bug.

Note You need to log in before you can comment on or make changes to this bug.