<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000'>Hey Chris,<br><br>my idea of implementing context-sensitive buttons (menu items) and related dialogs was to de-couple button registration from actual dialog handling, like so:<br><ul><li>add custom button to specific data grid as part of UiInit event, providing callback that represents the "button/menu clicked" action, e.g. "pluginApi.addActionButton(title, callback)"<br></li><li>within the above mentioned callback, show the custom dialog using "pluginApi.showDialog(title, contentUrl, buttons?)" [note: this is the <span style="color:black">"dialog UI API" I meant in my previous email]<br></span></li></ul><br>This basically splits your use-case into two distinct API features (addActionButton, showDialog). For example, one button could show a custom dialog, another one could perform other (non-dialog) actions. What do you think?<br><br>&gt; <span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Or potentially
 since it is a dialog, it could just show it in separate window altogether. <br></span><br>Good idea for initial implementation! This could be easily added to PoC rev.6. Ultimately, I'd prefer a <span style="color:black">"dialog UI API", so that custom dialogs will have same "look and feel" as standard ones (can be done later on though).</span><br><br>&gt; <span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">I’ll
 start looking at adding the ability to launch a dialog with context 
through the plugin API and let you know how that goes in a few days 
(Maybe sooner if
 I have questions about it. ;)</span><br><br>Great, I think you could start with the above mentioned initial implementation, here are some tips:<br><ul><li>add "showDialog(title, contentUrl)" function to plugin API within PluginManager.<span class="pln">exposePluginApi</span><span class="pun">() method</span></li><li><span class="pun">use GWT JSNI to delegate the call to </span><span class="gwt-InlineLabel">PluginUiFunctions, e.g. </span><span class="gwt-InlineLabel">PluginUiFunctions.showDialog() method</span></li><li><span class="gwt-InlineLabel">implement showDialog() method using GWT Window.open(), or WebUtils.openUrlInNewWindow()</span></li></ul><p><br></p>(The above mentioned steps are basically the recipe for adding/implementing new plugin API function.)<br><br>&gt; <span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Finally,
 would it be possible to give an estimate on when you think the PoC rev 6
 will be available? We’ve got scheduled deliveries internally based on 
this
 code and it would be better to make sure everything lines up now.</span><br><br>Well, I'm planning to revisit rev.5 according to review comments, and prepare for UI Plugins Follow-Up Meeting (October 9). I will start working on rev.6 patch right after that.<br><br>Finalizing custom (URL-based iframe'd) main tab, plus API for adding same kind of custom sub tab, should be quite easy - couple of days.<br>Custom context-sensitive buttons (menu items), should be easy as well, but there is some UiCommon integration necessary - 3-4 days.<br><br>Maybe we can split these two in separate rev.6 releases, what do you think? If you prefer to have both implemented as part of rev.6 patch, my rough estimate is around October 19.<br><br>Regards,<br>Vojtech<br><br><br><hr id="zwchr"><div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Christopher Morrissey" &lt;Christopher.Morrissey@netapp.com&gt;<br><b>To: </b>"Vojtech Szocs" &lt;vszocs@redhat.com&gt;<br><b>Cc: </b>"George Costea" &lt;George.Costea@netapp.com&gt;, "Dustin Schoenbrun" &lt;Dustin.Schoenbrun@netapp.com&gt;, engine-devel@ovirt.org<br><b>Sent: </b>Tuesday, October 2, 2012 9:15:45 PM<br><b>Subject: </b>RE: [Engine-devel] UI Plugins: PoC patch revision 5 is here<br><br>



<style><!--

@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}

p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle24
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}

@list l0
        {mso-list-id:180434570;
        mso-list-template-ids:-282402880;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:"Courier New";
        mso-bidi-font-family:"Times New Roman";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:1.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:2.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:2.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:3.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:3.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:4.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:4.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l1
        {mso-list-id:259874230;
        mso-list-template-ids:-1105409970;}
@list l1:level1
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l1:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:"Courier New";
        mso-bidi-font-family:"Times New Roman";}
@list l1:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:1.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l1:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:2.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l1:level5
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:2.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l1:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:3.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l1:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:3.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l1:level8
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:4.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l1:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:4.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l2
        {mso-list-id:580258439;
        mso-list-template-ids:-6366690;}
@list l2:level1
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l2:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:"Courier New";
        mso-bidi-font-family:"Times New Roman";}
@list l2:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:1.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l2:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:2.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l2:level5
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:2.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l2:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:3.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l2:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:3.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l2:level8
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:4.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l2:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:4.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l3
        {mso-list-id:713581435;
        mso-list-template-ids:2069783976;}
@list l3:level1
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l3:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:"Courier New";
        mso-bidi-font-family:"Times New Roman";}
@list l3:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:1.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l3:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:2.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l3:level5
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:2.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l3:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:3.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l3:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:3.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l3:level8
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:4.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l3:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:4.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l4
        {mso-list-id:765921994;
        mso-list-template-ids:400719310;}
@list l4:level1
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l4:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:"Courier New";
        mso-bidi-font-family:"Times New Roman";}
@list l4:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:1.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l4:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:2.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l4:level5
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:2.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l4:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:3.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l4:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:3.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l4:level8
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:4.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l4:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:4.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l5
        {mso-list-id:843908114;
        mso-list-template-ids:-1243547606;}
@list l5:level1
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l5:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:"Courier New";
        mso-bidi-font-family:"Times New Roman";}
@list l5:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:1.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l5:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:2.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l5:level5
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:2.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l5:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:3.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l5:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:3.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l5:level8
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:4.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l5:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:4.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l6
        {mso-list-id:964771435;
        mso-list-template-ids:-2000783132;}
@list l6:level1
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l6:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:"Courier New";
        mso-bidi-font-family:"Times New Roman";}
@list l6:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:1.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l6:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:2.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l6:level5
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:2.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l6:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:3.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l6:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:3.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l6:level8
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:4.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l6:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:4.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l7
        {mso-list-id:1145852410;
        mso-list-template-ids:1957228864;}
@list l7:level1
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l7:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:"Courier New";
        mso-bidi-font-family:"Times New Roman";}
@list l7:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:1.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l7:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:2.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l7:level5
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:2.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l7:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:3.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l7:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:3.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l7:level8
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:4.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l7:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:4.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l8
        {mso-list-id:1176848642;
        mso-list-template-ids:1223565722;}
@list l8:level1
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l8:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:"Courier New";
        mso-bidi-font-family:"Times New Roman";}
@list l8:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:1.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l8:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:2.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l8:level5
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:2.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l8:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:3.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l8:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:3.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l8:level8
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:4.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l8:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:4.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l9
        {mso-list-id:1311206220;
        mso-list-template-ids:314224160;}
@list l9:level1
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l9:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:"Courier New";
        mso-bidi-font-family:"Times New Roman";}
@list l9:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:1.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l9:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:2.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l9:level5
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:2.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l9:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:3.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l9:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:3.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l9:level8
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:4.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l9:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:4.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l10
        {mso-list-id:1434012829;
        mso-list-template-ids:-690447050;}
@list l10:level1
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l10:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:"Courier New";
        mso-bidi-font-family:"Times New Roman";}
@list l10:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:1.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l10:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:2.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l10:level5
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:2.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l10:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:3.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l10:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:3.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l10:level8
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:4.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l10:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:4.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l11
        {mso-list-id:1546865247;
        mso-list-template-ids:-1306373494;}
@list l11:level1
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l11:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:"Courier New";
        mso-bidi-font-family:"Times New Roman";}
@list l11:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:1.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l11:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:2.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l11:level5
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:2.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l11:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:3.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l11:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:3.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l11:level8
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:4.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l11:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:4.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l12
        {mso-list-id:2135564416;
        mso-list-template-ids:728504136;}
@list l12:level1
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l12:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:"Courier New";
        mso-bidi-font-family:"Times New Roman";}
@list l12:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:1.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l12:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:2.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l12:level5
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:2.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l12:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:3.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l12:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:3.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l12:level8
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:4.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l12:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:4.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style>


<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Hi Vojtech,</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Thanks for the reply. The plugin framework for adding a custom context sensitive button/menu item and the iframe loading support for the main tab plugin will
 be welcome additions. </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">For the custom UI dialog, we’re looking for something that works similar to the tab in that it will show a particular URL in an iFrame in a dialog. Or potentially
 since it is a dialog, it could just show it in separate window altogether. The dialog would be opened when the context sensitive button or menu item is activated. So it would be nice if the plugin framework would allow a plugged in button definition to define
 a URL to load in a dialog when it is activated.</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">I’ll start looking at adding the ability to launch a dialog with context through the plugin API and let you know how that goes in a few days (Maybe sooner if
 I have questions about it. ;)</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Finally, would it be possible to give an estimate on when you think the PoC rev 6 will be available? We’ve got scheduled deliveries internally based on this
 code and it would be better to make sure everything lines up now.</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Thanks!</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Chris</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> Vojtech Szocs [mailto:vszocs@redhat.com]
<br>
<b>Sent:</b> Tuesday, October 02, 2012 2:47 PM<br>
<b>To:</b> Morrissey, Christopher<br>
<b>Cc:</b> Costea, George; Schoenbrun, Dustin; engine-devel@ovirt.org<br>
<b>Subject:</b> Re: [Engine-devel] UI Plugins: PoC patch revision 5 is here</span></p>
</div>
</div>
<p class="MsoNormal">&nbsp;</p>
<div>
<p class="MsoNormal"><span style="color:black">Hi Chris,<br>
<br>
many thanks for your feedback and suggestions :)<br>
<br>
Adding context-sensitive button with corresponding menu item sounds good! In fact, this is the proper way how context menu items should be handled, since WebAdmin data grids work with context-sensitive "action buttons" which are reflected within the context
 menu. I agree that this is a very useful feature to have in plugin API, it should be implemented as part of next major PoC revision.<br>
<br>
I have a question though: when the user clicks the custom button or corresponding context menu item, will your plugin handle common dialog UI (everything except actual content) on its own, or do you prefer to have some kind of "dialog UI" API to create the
 standard-looking dialog frame for you? I like the idea of using iframe to present custom content though :)<br>
<br>
As for grouping multiple context-sensitive buttons and corresponding context menu items, this makes sense and we have something like this already implemented in WebAdmin (in Host main tab, Power Management drop-down group button, but this is defined not to
 appear in context menu though). I think this should be part of "custom context-sensitive button / menu item" plugin API feature.<br>
<br>
&gt; </span><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">If needed we can help work on an implementation for the dialog popup plugin framework as we’d like to get it in relatively quickly so we can move forward on the content
 side of our plugin.</span><span style="color:black"><br>
<br>
If I understand correctly, this is about providing "dialog UI" API to create the standard-looking dialog frame + custom content iframe. I'd like to help with this as well,&nbsp; but you can play with the code and propose a patch on top of PoC rev.5 [http://gerrit.ovirt.org/8120].<br>
<br>
&gt; </span><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">For the reverse proxy, would it be easier from a customer standpoint to just include a reverse proxy servlet such as this one?<br>
</span><span style="color:black"><br>
Actually, I was under the impression that oVirt Engine (3.1) package (ovirt-engine) takes care of setting up Apache web server, which redirects all traffic to Engine JBoss AS by default (but maybe I am wrong here). However, if this is the case, an efficient
 way to work around same-origin policy (cross-origin issues) is to configure Apache's reverese proxy module (mod_proxy), as discussed in another thread on engine-devel:
<a href="http://lists.ovirt.org/pipermail/engine-devel/2012-September/002511.html" target="_blank">
http://lists.ovirt.org/pipermail/engine-devel/2012-September/002511.html</a><br>
<br>
This way, you could use Apache to bring Engine and arbitrary (local or remote) web services on same origin. What do you think?<br>
<br>
On the other hand, using a special-purpose reverse proxy servlet directly in Engine, not sure if that's a good idea though.. (I'd prefer configuring "front-end" web server, such as Apache, for this purpose)<br>
<br>
I'm also sending a couple of updates:<br>
<br>
<strong>UI Plugins Follow-Up Meeting:</strong> scheduled for Tuesday, October 9 at 4pm GMT+1 (I'll send a meeting invitation soon, also planning to re-write oVirt UI Plugins wiki soon after that)<br>
<br>
<b>PoC rev.5 patch update:</b> many thanks to Juan and Doron for reviewing the recent patch [http://gerrit.ovirt.org/8120]! I'll update the patch accordingly as revision 5.1<br>
<br>
<b>Planned items to be included in PoC revision 6:</b></span></p>
<ul type="disc">
<li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l7 level1 lfo1">
adding custom context-sensitive button (either separately or within a button group), along with corresponding context menu item representation</li><li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l7 level1 lfo1">
update custom main tab to show the actual content (iframe) from the given URL</li><li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l7 level1 lfo1">
adding custom sub tab that shows content from the given URL</li></ul>
<p><span style="color:black">&nbsp;</span></p>
<p><b><span style="color:black">More items to consider having in PoC revision 6:</span></b><span style="color:black"></span></p>
<ul type="disc">
<li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l11 level1 lfo2">
"dialog UI" API to create the standard-looking dialog frame + custom content iframe</li><li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l11 level1 lfo2">
Engine REST API exposed through plugin API</li><li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l11 level1 lfo2">
integration with Tasks pane to provide visual feedback on custom operations</li><li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l11 level1 lfo2">
extending existing dialogs (e.g. Edit Cluster Policy - custom properties)</li></ul>
<p><span style="color:black">&nbsp;</span></p>
<p><span style="color:black">Let me know what you think.</span></p>
<p><span style="color:black">&nbsp;</span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="color:black">Regards,<br>
Vojtech<br>
<br>
</span></p>
<div class="MsoNormal" style="text-align:center" align="center"><span style="color:black">
<hr id="zwchr" size="2" width="100%" align="center">
</span></div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black">From:
</span></b><span style="font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black">"Christopher Morrissey" &lt;Christopher.Morrissey@netapp.com&gt;<br>
<b>To: </b>vszocs@redhat.com<br>
<b>Cc: </b>"George Costea" &lt;George.Costea@netapp.com&gt;, "Dustin Schoenbrun" &lt;Dustin.Schoenbrun@netapp.com&gt;, engine-devel@ovirt.org<br>
<b>Sent: </b>Tuesday, October 2, 2012 6:15:34 PM<br>
<b>Subject: </b>RE: [Engine-devel] UI Plugins: PoC patch revision 5 is here</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Hi Vojtech,</span><span style="color:black"></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><span style="color:black"></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">The patch is great and has cleared up some questions I had about the implementation. I’ve been able to get the sample plugins working and waded through the
 code changes, so feel like I have a good understanding of what was delivered. Thanks a lot for putting this all together. I do have a few questions and suggestions for you, though.</span><span style="color:black"></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><span style="color:black"></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Will there eventually be a way to add one or more buttons to the context sensitive buttons and menus throughout the interface? For example, we’d like to allow
 a button to provision a datastore when a data center, cluster, or host is selected. When the button is clicked, it would open a dialog with an iframe in which we would load our interface to perform the associated action. Some contexts would have several buttons,
 such as a storage domain (provision, resize, dedupe management, destroy) so it would probably make sense for a drop down menu to be available as well so that the number of buttons above the table doesn’t get too cluttered. We’d also like to add these same
 actions to the menus that popup when a contextual object is right clicked.</span><span style="color:black"></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><span style="color:black"></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">If needed we can help work on an implementation for the dialog popup plugin framework as we’d like to get it in relatively quickly so we can move forward on
 the content side of our plugin.</span><span style="color:black"></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><span style="color:black"></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">For the reverse proxy, would it be easier from a customer standpoint to just include a reverse proxy servlet such as this one? &nbsp;</span><span style="color:black"><a href="http://sourceforge.net/projects/j2ep/" target="_blank">http://sourceforge.net/projects/j2ep/</a>
</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">I’m just thinking that setting up and managing a plugin for the HTTP server may be more complex than including one internally that would be transparent to a
 customer.</span><span style="color:black"></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><span style="color:black"></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Thanks,</span><span style="color:black"></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Chris</span><span style="color:black"></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="color:black">From:</span></b><span style="color:black"> Vojtech Szocs &lt;<a href="mailto:vszocs@redhat.com" target="_blank">vszocs@redhat.com</a>&gt;<br>
<b>Date:</b> September 21, 2012 4:37:31 PM EDT<br>
<b>To:</b> engine-devel &lt;<a href="mailto:engine-devel@ovirt.org" target="_blank">engine-devel@ovirt.org</a>&gt;<br>
<b>Subject:</b> <b>[Engine-devel] UI Plugins: PoC patch revision 5 is here</b></span></p>
</div>
</blockquote>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="color:black">Hi guys,<br>
<br>
it's been a while but here comes the latest revision of UI Plugins proof-of-concept patch (please find it attached).<br>
<br>
This revision was originally meant to focus solely on server-side components of the plugin infrastructure. However, I ended up implementing all the major concepts and ideas as discussed on engine-devel mailing list, impacting both client-side and server-side
 parts of the plugin infrastructure. As a result, UI plugin infrastructure should be pretty much complete now, so we can focus on specific plugin API features in upcoming PoC revisions.<br>
<br>
There's a whole bunch of changes and improvements in this revision, so I'll try to cover all the relevant parts step by step. If you have any comments, questions or ideas, please let me know!<br>
<br>
So here we go... (or if you just want to get the patch, find the link at the end of this message)</span></p>
<div class="MsoNormal" style="text-align:center" align="center"><span style="color:black">
<hr size="2" width="100%" align="center">
</span></div>
<p class="MsoNormal"><span style="color:black"><br>
<strong>0. Added new Engine configuration values</strong><b><br>
</b><br>
<u>UI plugin data path</u> is represented by <em>ConfigValues.UIPluginDataPath</em> enum option ("UIPluginDataPath" in
<i>vdc_options</i> table), and resolved relative to <i>ConfigValues.DataDir</i> if possible. Following (default) values:</span></p>
<ul type="disc">
<li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo3">
<i>UIPluginDataPath = ui-plugins</i></li><li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo3">
<i>DataDir = /usr/share/ovirt-engine</i></li></ul>
<p class="MsoNormal"><span style="color:black">result in UI plugin data path: <i>
/usr/share/ovirt-engine/ui-plugins</i><br>
<br>
<u>UI plugin config path</u> is represented by <i>ConfigValues.UIPluginConfigPath</i> enum option ("UIPluginConfigPath" in
<i>vdc_options</i> table), and resolved relative to <i>ConfigValues.ConfigDir</i> if possible. Following (default) values:</span></p>
<ul type="disc">
<li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l3 level1 lfo4">
<i>UIPluginConfigPath = ui-plugins</i></li><li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l3 level1 lfo4">
<i>ConfigDir = /etc/ovirt-engine</i></li></ul>
<p><span style="color:black">result in UI plugin config path: <i>/etc/ovirt-engine/ui-plugins</i></span></p>
<p class="MsoNormal"><span style="color:black"><br>
<b>1. Processing UI plugin data on the server<br>
</b><br>
<i>PluginDataManager</i> is the class responsible for reading, validating and caching UI plugin descriptor/configuration data on the server (Engine). It has two main responsibilities:</span></p>
<ul type="disc">
<li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l2 level1 lfo5">
return a snapshot of currently valid plugin data (<i>getCurrentData</i> method)</li><li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l2 level1 lfo5">
reload plugin data from local file system if necessary (<i>reloadData</i> method)</li></ul>
<p><span style="color:black">The <i>reloadData</i> method doesn't modify "live" plugin data directly. Instead, it creates a local working copy of current plugin data, updates this copy as it reads/validates plugin descriptor and configuration files, and attempts
 to update "live" plugin data through conditional reference re-assignment (using <i>
java.util.concurrent.atomic.AtomicReference.compareAndSet</i> method).</span></p>
<p><span style="color:black">&nbsp;</span></p>
<p><span style="color:black">In other words, <i>reloadData</i> method makes no attempts with regard to Java lock-based synchronization, in favor of dealing with "live" data through
<i>AtomicReference</i> (reference that involves atomic <i>volatile</i> reads and writes):</span></p>
<ul type="disc">
<li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l4 level1 lfo6">
In the best case, a thread will succeed in updating "live" data (<i>AtomicReference.compareAndSet</i> == true), which means that "live" data remained unchanged since this thread acquired a reference of current plugin data.</li><li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l4 level1 lfo6">
In the worst case, a thread will NOT succeed in updating "live" data (<i>AtomicReference.compareAndSet</i> == false), which means that "live" data was already changed by another thread since this thread acquired a reference of current plugin data.</li></ul>
<p><span style="color:black">In my opinion, when dealing with external resources like the local file system, this is a good compromise between performance and up-to-date data. While we might not get "completely-up-to-date" data at the given point in time (<i>reloadData
 + getCurrentData</i>), we are guaranteed to get "recently-up-to-date" and consistent data. In other words, the requirement of "completely-up-to-date" data would involve
<i>synchronized</i> statements that would hurt performance. In my (very humble) opinion, the benefit of having "completely-up-to-date" data, at the cost of reduced performance, is not really worth it, especially in our case when the user can just hit refresh
 (F5) to reload WebAdmin and its plugin data.</span></p>
<p><span style="color:black">&nbsp;</span></p>
<p><u><span style="color:black">Plugin descriptor files</span></u><span style="color:black"> are expected to be placed in UI plugin data path, for example:
<i>/usr/share/ovirt-engine/ui-plugins/foo.json</i></span></p>
<p><span style="color:black">&nbsp;</span></p>
<p><span style="color:black">Following descriptor file attributes are implemented and recognized by the plugin infrastructure:</span></p>
<ul type="disc">
<li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l10 level1 lfo7">
<i>name</i>: A name that uniquely identifies the plugin (required attribute).</li><li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l10 level1 lfo7">
<i>url</i>: URL of plugin host page that invokes the plugin code (required attribute).</li><li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l10 level1 lfo7">
<i>config</i>: Default configuration object associated with the plugin (optional attribute).</li><li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l10 level1 lfo7">
<i>resourcePath</i>: Path to plugin static resources, relative to UI plugin data path (optional attribute). This is used when serving plugin files through Engine
<i>PluginResourceServlet</i> (more on this below).</li></ul>
<p><u><span style="color:black">Plugin configuration files</span></u><span style="color:black"> are expected to be placed in UI plugin config path, for example:
<i>/etc/engine/ui-plugins/foo-config.json</i></span></p>
<p><span style="color:black">&nbsp;</span></p>
<p><span style="color:black">Note that plugin configuration files follow the "&lt;descriptorFileName&gt;-config.json" convention.</span></p>
<p><span style="color:black">&nbsp;</span></p>
<p><span style="color:black">Following configuration file attributes are implemented and recognized by the plugin infrastructure:</span></p>
<ul type="disc">
<li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l9 level1 lfo8">
<i>config</i>: Custom configuration object associated with the plugin (optional attribute). This overrides the default plugin descriptor configuration, if any.</li><li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l9 level1 lfo8">
<i>enabled</i>: Indicates whether the plugin should be loaded on WebAdmin startup (optional attribute). Default value is 'true'.</li><li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l9 level1 lfo8">
<i>order</i>: Defines the relative order in which the plugin will be loaded on WebAdmin startup (optional attribute). Default value is
<i>Integer.MAX_VALUE</i> (lowest order).</li></ul>
<p><span style="color:black">The concept of merging custom configuration (<i>config</i> attribute in
<i>foo-config.json</i>), if any, on top of default configuration (<i>config</i> attribute in
<i>foo.json</i>), if any, remains unchanged. This makes the plugin configuration quite flexible - in my opinion, the added complexity of handling/merging such configuration is definitely worth the effort.</span></p>
<p><span style="color:black">&nbsp;</span></p>
<p><span style="color:black">The <i>enabled</i> attribute is straight-forward, allowing users to turn the given plugin off, if necessary. In future, users should still be able to load such plugins through WebAdmin GUI.</span></p>
<p><span style="color:black">&nbsp;</span></p>
<p><span style="color:black">The <i>order</i> attribute controls the order in which plugins are loaded on WebAdmin startup. Since plugin resources are fetched asynchronously by the browser, this is basically a way of imposing some degree of determinism in the
 "generally-non-deterministic" plugin environment, which is helpful when troubleshooting problems with multiple plugins. This attribute is also helpful due to file listing methods in
<i>java.io.File</i> giving no guarantees that files would be listed in any particular order (otherwise we could just go for the "NN-&lt;descriptorFileName&gt;.json" convention, with NN being the order number).</span></p>
<p class="MsoNormal"><span style="color:black"><br>
<b>2. Modified behavior of WebadminDynamicHostingServlet<br>
</b><br>
<i>WebadminDynamicHostingServlet</i> is the servlet used to serve WebAdmin application host page (HTML page that bootstraps WebAdmin JavaScript code).<br>
<br>
In addition to its former behavior, as part of handling the given request, <i>WebadminDynamicHostingServlet</i>:</span></p>
<ul type="disc">
<li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l8 level1 lfo9">
reloads descriptor/configuration data from local file system if necessary, and obtains a snapshot of currently valid plugin data (<i>PluginDataManager.reloadAndGetCurrentData</i>)</li><li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l8 level1 lfo9">
embeds all plugin meta-data, suitable for use in client-side plugin infrastructure, into WebAdmin host page as "pluginDefinitions" JavaScript array (<i>PluginDefinitions</i>)</li></ul>
<p class="MsoNormal"><span style="color:black">As a result, reloading UI plugin descriptor/configuration data is as simple as refreshing (F5) WebAdmin application in the browser (no need to restart Engine).<br>
<br>
<b>3. Added servlet for serving plugin static resources<br>
</b><br>
<i>PluginResourceServlet</i> is the servlet used to serve UI plugin static files (plugin host page, 3rd party JavaScript, etc.) from the local file system.<br>
<br>
For example, requesting URL:</span></p>
<ul type="disc">
<li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l5 level1 lfo10">
<i><a>http://&lt;EngineManagerHost&gt;:8700/webadmin/webadmin/plugin/foo/content/start.html</a></i></li></ul>
<p><span style="color:black">will send the content of:</span></p>
<ul type="disc">
<li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l1 level1 lfo11">
<i>/usr/share/ovirt-engine/ui-plugins/&lt;resourcePath&gt;/content/start.html</i></li></ul>
<p><span style="color:black">to the client.</span></p>
<p><span style="color:black">&nbsp;</span></p>
<p><span style="color:black">As shown in the above example:</span></p>
<ul type="disc">
<li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l12 level1 lfo12">
<i>/webadmin/webadmin/plugin/</i> is the servlet root path for <i>PluginResourceServlet</i></li><li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l12 level1 lfo12">
in the extra path beyond the servlet root path (<i>/foo/content/start.html</i>):</li></ul>
<ul type="disc">
<ul type="circle">
<li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l12 level2 lfo12">
<i>/foo</i> represents the name of the plugin</li><li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l12 level2 lfo12">
<i>/content/start.html</i> represents the path to requested resource, relative to "UIPluginDataPath / &lt;resourcePath&gt;"</li></ul>
</ul>
<p class="MsoNormal"><span style="color:black">Note that each plugin using <i>PluginResourceServlet</i> to serve its static files must declare non-empty
<i>resourcePath</i> attribute in within the plugin descriptor.<br>
<br>
Also note that <i>PluginResourceServlet</i>, unlike <i>WebadminDynamicHostingServlet</i>, does NOT reload descriptor/configuration data from local file system as part of handling the given request. In other words, it's assumed that plugin data has already been
 (re)loaded when serving WebAdmin application host page, with subsequent requests to
<i>PluginResourceServlet</i> reading the current plugin information.<br>
<br>
Until we solve the cross-origin issue in a clean way, <i>PluginResourceServlet</i> should be used to serve all plugin resources from local file system.<br>
<br>
<b>4. Plugin lifecycle improved to deal with misbehaving plugins</b><br>
<br>
<i>PluginState</i> enum has been modified to deal with plugins that allow uncaught exceptions to escape from plugin event handler functions (e.g. "UiInit"):</span></p>
<ul type="disc">
<li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l6 level1 lfo13">
removed state <i>INITIALIZED</i></li><li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l6 level1 lfo13">
added state <i>INITIALIZING</i>: The plugin is (currently) being initialized by calling UiInit event handler function.</li><li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l6 level1 lfo13">
added state <i>IN_USE</i>: Plugin's UiInit event handler function has completed successfully, we can now call other event handler functions as necessary. The plugin is in use now.</li><li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l6 level1 lfo13">
added state <i>FAILED</i>: An uncaught exception escaped while calling an event handler function, which indicates internal error within the plugin code. The plugin is removed from service.</li></ul>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="color:black">I've attached a simple state diagram that illustrates different states and transitions between them (green color is initial state, red color is end state).<br>
<br>
Uncaught exceptions in plugin event handler functions will be caught and handled by the plugin infrastructure. This prevents a misbehaving plugin from breaking WebAdmin application, since WebAdmin is the caller (initiator) of the function call. In such case,
 the plugin will be removed from service.<br>
<br>
<b>Update on cross-origin issue (consequence of same-origin policy)</b><br>
<br>
In order for the plugin to access WebAdmin plugin API, plugin host page (e.g. <i>
start.html</i>) must be served from URL on same origin as Engine origin. Otherwise, plugin code running in the context of an iframe'd host page will fail to evaluate "parent.pluginApi" expression, with "parent" being top-level (WebAdmin) window, and "pluginApi"
 being the global plugin API object exposed by WebAdmin.<br>
<br>
This is why <i>PluginResourceServlet</i>, available on Engine origin, should be used to serve all plugin resources from local file system.<br>
<br>
There's only one issue that remains to be solved: cross-origin "plugin vs. remote service" communication, with "remote service" being anything other than Engine (REST API). In future, we'll address this with Apache reverse proxy configuration, so that users
 can configure Apache server (placed in front of Engine JBoss AS) to put arbitrary (local or remote non-Engine) services on same origin. However, this requires a change in current Apache configuration. Until then, users can manually edit the Engine Apache configuration
 file (<i>/etc/httpd/conf.d/ovirt-engine.conf</i>).</span></p>
<div class="MsoNormal" style="text-align:center" align="center"><span style="color:black">
<hr size="2" width="100%" align="center">
</span></div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="color:black"><br>
I've attached some sample plugin files for you to experiment with. Instead of attaching actual patch file (92 kB) to this email, I've submitted the patch to oVirt Gerrit:
<a href="http://gerrit.ovirt.org/8120" target="_blank">http://gerrit.ovirt.org/8120</a><br>
<br>
Let me know what you think!<br>
<br>
Cheers,<br>
Vojtech</span></p>
</div>
</div>
</blockquote>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal"><span style="color:black">&lt;ui-plugin-sample-files.tar.gz&gt;</span></p>
</div>
</blockquote>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal"><span style="color:black">&lt;ui-plugin-lifecycle.png&gt;</span></p>
</div>
</blockquote>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal"><span style="color:black">_______________________________________________<br>
Engine-devel mailing list<br>
<a href="mailto:Engine-devel@ovirt.org" target="_blank">Engine-devel@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/engine-devel" target="_blank">http://lists.ovirt.org/mailman/listinfo/engine-devel</a></span></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><span style="color:black">&nbsp;</span></p>
</div>
</div>


</div><br></div></body></html>