[Engine-devel] Update on UI Plugins: what's coming in near future

Vojtech Szocs vszocs at redhat.com
Tue Feb 5 16:54:01 UTC 2013


Hello everyone, 

it's been a while since I posted an update on UI Plugins so I thought I'd share some updates and plans for near future. 

First of all, I apologize to Chris and other NetApp folks for not being able to attend oVirt Workshop in Sunnyvale. I've caught a terrible flu just one day before flying to the conference, which is most unfortunate :( I've attached both presentations I prepared for the workshop to this email for reference. Once again, sorry for my absence at the workshop. 

The UI Plugins feature wiki [http://www.ovirt.org/Features/UIPlugins] has been updated in the mean time, you can check it out and let me know what you think. There are still some TODOs like documenting supported functions/events, I'll take care of this in the upcoming days. 

I'm currently working on improving showDialog API, moving away from native browser popups and using WebAdmin dialog infrastructure. You can find the first (work-in-progress) version of the patch at [http://gerrit.ovirt.org/#/c/11717/]. Besides showDialog API, roadmap for near future is following: 

    * allow adding action buttons ( api.addMainTabActionButton ) to main tabs that are currently not supported 


        * currently supported main tabs: Cluster, DataCenter, Disk, Host, Storage, Template, VirtualMachine 
        * remaining main tabs to support: Event, Network, Pool, Quota, User, Volume 


    * 
improve addMainTabActionButton API to allow different action button representations 


        * add both context-sensitive button (toolbar) and corresponding context-menu item (menu) 
        * add only context-sensitive button (toolbar) 
        * add only context-menu item (menu) 


    * 
improve addMainTab/addSubTab API to allow tab widget alignment (left or right) 

        * initial patch submitted by Spenser Shumaker [http://gerrit.ovirt.org/#/c/11273/] 

I've been also thinking about UI Plugins infrastructure and development in general, and came up with some ideas I'm planning to try out: 

    * invert control with regard to obtaining pluginApi instance 


        * currently, WebAdmin exposes pluginApi object in top-level context, and plugins obtain pluginApi via parent.pluginApi(pluginName) 
        * in future, WebAdmin will evaluate pluginApi(pluginName) within top-level context, and assign pluginApi object to iframe window 
        * plugins will obtain pluginApi simply via "api" object that has been assigned to iframe window by WebAdmin (no more parent.pluginApi) 
        * this inversion of control allows more simple and secure way for plugins to interact with plugin API 


    * 
provide sandbox for plugin code running within an iframe 

        * use HTML5 iframe sandbox attribute [http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-sandbox] 
        * more specifically, disallow plugins to directly navigate to top-level document/window (e.g. parent) 
        * reason: UI plugins are not meant to integrate with WebAdmin by directly manipulating top-level UI 
        * instead, UI plugins are meant to integrate with WebAdmin via plugin API and events 
        * if a plugin wants to extend UI, it should do it via plugin API and not by "hacking" top-level UI on its own 



    * remove resourcePath from plugin descriptor, use <descriptorFileName>-files naming convention for static plugin resource directory 

Let me know what you think! 

Vojtech 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/devel/attachments/20130205/09b47665/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ovirt2013-UI-Plugins-Introduction.pdf
Type: application/pdf
Size: 577663 bytes
Desc: not available
URL: <http://lists.ovirt.org/pipermail/devel/attachments/20130205/09b47665/attachment-0002.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ovirt2013-Hello-World-UI-Plugin.pdf
Type: application/pdf
Size: 374068 bytes
Desc: not available
URL: <http://lists.ovirt.org/pipermail/devel/attachments/20130205/09b47665/attachment-0003.pdf>


More information about the Devel mailing list