<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">Thanks Alexander,</div><div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;"><br></div><div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">This works:</div><div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;"><br></div><div><font face="Calibri,sans-serif">api.addMainTab('oVirtTab', 'ovirt-tab',&nbsp;&#8216;http://www.something.com', {priority: 5});</font></div><div><font face="Calibri,sans-serif"><br></font></div><div><font face="Calibri,sans-serif">Can you advise how to get the&nbsp;</font><span style="font-family: Calibri, sans-serif;">api.addSubTab to work?</span></div><div><font face="Calibri,sans-serif"><br></font></div><div><font face="Calibri,sans-serif">api.addSubTab('ovirt-tab', 'Test 123', 'test-123', '#&#8217;);</font></div><div><font face="Calibri,sans-serif"><br></font></div><div><font face="Calibri,sans-serif">I tried the above and many other combinations, no errors, just doesnt work. Maybe I am wrong on what it does?</font></div><div><font face="Calibri,sans-serif"><br></font></div><div>I am looking to add a submenu &#8211; same as the current 4.2.1 UI shows Network and then(Vnic Profiles) (Networks) as submenus.</div><div><br></div><div>Thanks</div><div><br></div><div>Zip</div><div><br></div><div><font face="Calibri,sans-serif"><br></font></div><blockquote style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; margin: 0px 0px 0px 40px; border: none; padding: 0px;"><div><br></div><div><span class="Apple-style-span" style="font-size: 12px; font-family: Verdana, Helvetica, Arial;"><br></span></div></blockquote></div><span id="OLK_SRC_BODY_SECTION" style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;"><div><div><blockquote style="margin:0 0 0 40px; border:none; padding:0px;"><div>On Sunday, February 25, 2018 1:11:08 AM EST Zip wrote:</div><blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;"><div> Hi Alexander,</div><div> </div><div> If I try the following:</div><div> </div><div> &lt;!DOCTYPE html&gt;</div><div> &lt;html&gt;</div><div> &lt;head&gt;</div><div>&nbsp;&nbsp;&nbsp;&nbsp; &lt;script&gt;</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var api = parent.pluginApi('HelloWorld');</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; api.register({</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UiInit: function () {</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; api.addMainTab('FooTab','xtab123','<a href="http://foo.com/'">http://foo.com/'</a>);</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; });</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; api.ready();</div><div>&nbsp;&nbsp;&nbsp;&nbsp; &lt;/script&gt;</div><div> &lt;/head&gt;</div><div> &lt;body&gt;&lt;/body&gt;</div><div> &lt;/html&gt;</div><div> </div><div> I get the error in my browser console:</div><div> </div><div> Sun Feb 25 00:03:56 GMT-600 2018</div><div> org.ovirt.engine.ui.webadmin.plugin.PluginManager SEVERE: Exception caught</div><div> while invoking event handler function [UiInit] for plugin [HelloWorld]:</div><div> Error: java.lang.IndexOutOfBoundsException webadmin:1:13517</div><div> &lt;<a href="https://ovirtmgmt.intricatenetworks.com/ovirt-engine/webadmin/?locale=en_US">https://ovirtmgmt.intricatenetworks.com/ovirt-engine/webadmin/?locale=en_US</a></div><div> #dashboard-main&gt;</div><div> </div><div> Sun Feb 25 00:03:56 GMT-600 2018</div><div> org.ovirt.engine.ui.webadmin.plugin.PluginManager WARNING: Plugin</div><div> [HelloWorld] removed from service due to failure</div><div> </div><div> </div><div> However if I remove the line:</div><div> </div><div>&nbsp;&nbsp;api.addMainTab('FooTab','xtab123','<a href="http://foo.com/&#338;">http://foo.com/&#338;</a>);</div><div> </div><div> And replace it with something simple like:</div><div> </div><div> alert(&#338;Test 123¹);</div><div> </div><div> There are no errors and the alert fires as it should.</div><div> </div><div> </div><div> Any ideas of what I might be missing?</div><div> </div><div> I am running oVirt 4.2.1 on CentOS ­ Hosted Engine setup with 1 host for</div><div> testing.</div><div> </div><div> Thanks</div><div> </div><div> Zip</div><div> </div></blockquote><div><br></div><div>Well you found a bug, I will be posting a patch soon. To bypass the problem </div><div>add the following:</div><div><br></div><div>api.addMainTab('FooTab','xtab123','<a href="http://foo.com/">http://foo.com/</a>, {priority: N});</div><div><br></div><div>Where N is a number between 0 and 5</div><div><br></div><div>This will determine where the new menu item will show up in the menu, 0 being </div><div>at the top below the dashboard, and 5 being right above Events. Normally it is </div><div>supposed to simply add to the end, however due to the bug it won't.</div><div><br></div><blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;"><div> &gt; From:&nbsp;&nbsp;Alexander Wels &lt;<a href="mailto:awels@redhat.com">awels@redhat.com</a>&gt;</div><div> &gt; Date:&nbsp;&nbsp;Monday, February 19, 2018 at 7:54 AM</div><div> &gt; To:&nbsp;&nbsp;"<a href="mailto:users@ovirt.org">users@ovirt.org</a>" &lt;<a href="mailto:users@ovirt.org">users@ovirt.org</a>&gt;</div><div> &gt; Cc:&nbsp;&nbsp;Preston &lt;<a href="mailto:plord@inetx.ca">plord@inetx.ca</a>&gt;</div><div> &gt; Subject:&nbsp;&nbsp;Re: [ovirt-users] oVirt 4.2 WebUI Plugin API Docs?</div><div> &gt; </div><div> &gt; On Friday, February 16, 2018 6:31:10 PM EST Zip wrote:</div><div> &gt;&gt;&nbsp;&nbsp;Are there any updated docs for the WebUI Plugins API?</div><div> &gt; </div><div> &gt; Unfortunately no, I haven't had a chance to create updated documentation.</div><div> &gt; However the first two links are mostly still accurate as we haven't done</div><div> &gt; any major changes to the API.</div><div> &gt; </div><div> &gt; Some things to note that are different from the API documentation in</div><div> &gt; https:// www.ovirt.org/develop/release-management/features/ux/uiplugins/</div><div> &gt; for 4.2:</div><div> &gt; </div><div> &gt; - alignRight no longer has any effect, as the UI in 4.2 no longer respects</div><div> &gt; it. - none of the systemTreeNode selection code does anything (since</div><div> &gt; there is no more system tree)</div><div> &gt; - As noted in the documentation itself the RestApiSessionAcquired is no</div><div> &gt; longer available as we have a proper SSO mechanism that you can utilize</div><div> &gt; at this point.</div><div> &gt; - Main Tabs are now called Main Views (but the api still calls them main</div><div> &gt; tabs, so use the apis described). And sub tabs are now called detail</div><div> &gt; tabs, but the same thing the API hasn't changed the naming convention so</div><div> &gt; use subTabs. - mainTabActionButton location property no longer has any</div><div> &gt; meaning and is ignored.</div><div> &gt; </div><div> &gt; That is it I think, we tried to make it so existing plugins would remain</div><div> &gt; working even if some options no longer mean anything.</div><div> &gt; </div><div> &gt;&gt;&nbsp;&nbsp;I have found the following which all appear to be old and no longer</div><div> &gt;&gt;&nbsp;&nbsp;working?</div><div> &gt;&gt;&nbsp;&nbsp;</div><div> &gt;&gt;&nbsp;&nbsp;<a href="https://www.ovirt.org/documentation/admin-guide/appe-oVirt_User_Interfac">https://www.ovirt.org/documentation/admin-guide/appe-oVirt_User_Interfac</a></div><div> &gt;&gt;&nbsp;&nbsp;e_Pl ugins/</div><div> &gt;&gt;&nbsp;&nbsp;<a href="https://www.ovirt.org/develop/release-management/features/ux/uiplugins/">https://www.ovirt.org/develop/release-management/features/ux/uiplugins/</a></div><div> &gt;&gt;&nbsp;&nbsp;<a href="http://resources.ovirt.org/old-site-files/UI_Plugins_at_oVirt_Workshop_S">http://resources.ovirt.org/old-site-files/UI_Plugins_at_oVirt_Workshop_S</a></div><div> &gt;&gt;&nbsp;&nbsp;unny vale_2013.pdf</div><div> &gt;&gt;&nbsp;&nbsp;</div><div> &gt;&gt;&nbsp;&nbsp;Thanks</div><div> &gt;&gt;&nbsp;&nbsp;</div><div> &gt;&gt;&nbsp;&nbsp;Zip</div></blockquote><div><br></div><div><br></div><div><br></div></blockquote></div></div></span></body></html>