Bug 982587 - [RFE] Use convention instead of configuration for UI plugin resources
Summary: [RFE] Use convention instead of configuration for UI plugin resources
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-webadmin
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Vojtech Szocs
QA Contact: bugs@ovirt.org
URL:
Whiteboard: ux
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-09 10:52 UTC by Vojtech Szocs
Modified: 2014-06-16 15:39 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-06-16 15:39:10 UTC
oVirt Team: ---
Embargoed:


Attachments (Terms of Use)

Description Vojtech Szocs 2013-07-09 10:52:37 UTC
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 07:21:09 UTC
still relevant?

Comment 2 Vojtech Szocs 2013-12-09 10:54:36 UTC
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 15:39:10 UTC
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.