This message is in MIME format. Since your mail reader does not
understand
this format, some or all of this message may not be legible.
--B_3602362279_2373602
Content-type: text/plain;
charset="ISO-8859-1"
Content-transfer-encoding: quoted-printable
Hi Alexander,
If I try the following:
<!DOCTYPE html>
<html>
<head>
<script>
var api =3D parent.pluginApi('HelloWorld');
api.register({
UiInit: function () {
api.addMainTab('FooTab','xtab123','http://foo.com/');
}
});
api.ready();
</script>
</head>
<body></body>
</html>
I get the error in my browser console:
Sun Feb 25 00:03:56 GMT-600 2018
org.ovirt.engine.ui.webadmin.plugin.PluginManager SEVERE: Exception caught
while invoking event handler function [UiInit] for plugin [HelloWorld]:
Error: java.lang.IndexOutOfBoundsException webadmin:1:13517
<
https://ovirtmgmt.intricatenetworks.com/ovirt-engine/webadmin/?locale=3De...
S
#dashboard-main>=20
Sun Feb 25 00:03:56 GMT-600 2018
org.ovirt.engine.ui.webadmin.plugin.PluginManager WARNING: Plugin
[HelloWorld] removed from service due to failure
However if I remove the line:
api.addMainTab('FooTab','xtab123','http://foo.com/=8C);
And replace it with something simple like:
alert(=8CTest 123=B9);
There are no errors and the alert fires as it should.
Any ideas of what I might be missing?
I am running oVirt 4.2.1 on CentOS =AD Hosted Engine setup with 1 host for
testing.
Thanks
Zip
=20
From: Alexander Wels <awels(a)redhat.com>
Date: Monday, February 19, 2018 at 7:54 AM
To: "users(a)ovirt.org" <users(a)ovirt.org>
Cc: Preston <plord(a)inetx.ca>
Subject: Re: [ovirt-users] oVirt 4.2 WebUI Plugin API Docs?
=20
On Friday, February 16, 2018 6:31:10 PM EST Zip wrote:
> Are there any updated docs for the WebUI Plugins API?
> =20
=20
Unfortunately no, I haven't had a chance to create updated documentation.
However the first two links are mostly still accurate as we haven't done =
any
major changes to the API.
=20
Some things to note that are different from the API documentation in http=
s://
www.ovirt.org/develop/release-management/features/ux/uiplugins/ for
4.2:
=20
- alignRight no longer has any effect, as the UI in 4.2 no longer respect=
s it.
- none of the systemTreeNode selection code does anything (since
there is=
no
more system tree)
- As noted in the documentation itself the RestApiSessionAcquired is no l=
onger
available as we have a proper SSO mechanism that you can utilize at
this
point.
- Main Tabs are now called Main Views (but the api still calls them main =
tabs,
so use the apis described). And sub tabs are now called detail tabs,
but =
the
same thing the API hasn't changed the naming convention so use
subTabs.
- mainTabActionButton location property no longer has any meaning and is
ignored.
=20
That is it I think, we tried to make it so existing plugins would remain
working even if some options no longer mean anything.
=20
> I have found the following which all appear to be old and no longer wor=
king?
ce_Pl
Sunny
> vale_2013.pdf
> =20
> Thanks
> =20
> Zip
=20
=20
=20
--B_3602362279_2373602
Content-type: text/html;
charset="ISO-8859-1"
Content-transfer-encoding: quoted-printable
<html><head><meta http-equiv=3D"content-type"
content=3D"text/html; charset=3Dutf=
-8"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-mode:
space; -we=
bkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; fo=
nt-family: Calibri, sans-serif;"><div><div><div>Hi
Alexander,</div><div><br>=
</div><div>If I try the
following:</div></div></div><div><br></div><div><div=
<!DOCTYPE
html></div><div><html></div><div><head></div><d=
iv> <script></div><div>
var ap=
i =3D parent.pluginApi('HelloWorld');</div><div>
ap=
i.register({</div><div>
UiInit: fun=
ction () {</div><div>
=
api.addMainTab('FooTab','xtab123','http://foo.com/...;
&nbs=
p; }</div><div>
});</=
div><div>
api.ready();</div><div> &l=
t;/script></div><div></head></div><div><body></body></d=
iv><div></html></div></div><div><br></div><div>I
get the error in my b=
rowser console: </div><div><br></div><div><div
class=3D"cm-s-mozilla mes=
sage console-api error error" aria-live=3D"polite"><a
class=3D"theme-twisty"></a=
<span class=3D"message-body-wrapper"><span
class=3D"message-flex-body"><span cl=
ass=3D"message-body
devtools-monospace"><span class=3D"objectBox objectBox-strin=
g">Sun Feb 25 00:03:56 GMT-600 2018 org.ovirt.engine.ui.webadmin.plugin.Plug=
inManager
SEVERE: Exception caught while invoking event handler function [UiInit] for=
plugin [HelloWorld]: Error: java.lang.IndexOutOfBoundsException</span></spa=
n> <span class=3D"message-location devtools-monospace"><span
data-url=3D"https:/=
/ovirtmgmt.intricatenetworks.com/ovirt-engine/webadmin/"
class=3D"frame-link" =
data-line=3D"1" data-column=3D"13517"><span
class=3D"frame-link-source-inner" titl=
e=3D"View source in Debugger ?
https://ovirtmgmt.intricatenetworks.com/ovirt-e=
ngine/webadmin/:1:13517"><a
href=3D"https://ovirtmgmt.intricatenetworks.com/ov=
irt-engine/webadmin/?locale=3Den_US#dashboard-main"
class=3D"frame-link-source" =
draggable=3D"false"><span
class=3D"frame-link-filename">webadmin</span><span cla=
ss=3D"frame-link-line">:1:13517</span></a></span></span></span></span>
</span></div><div class=3D"cm-s-mozilla message console-api error
error" aria=
-live=3D"polite"><span
class=3D"message-body-wrapper"><span class=3D"message-flex-=
body"><span class=3D"message-location devtools-monospace"><span
data-url=3D"http=
s://ovirtmgmt.intricatenetworks.com/ovirt-engine/webadmin/" class=3D"frame-lin=
k" data-line=3D"1"
data-column=3D"13517"><br></span></span></span></span></div><=
div class=3D"cm-s-mozilla message console-api warn warn"
aria-live=3D"polite"><s=
pan data-indent=3D"0" class=3D"indent" style=3D"width:
0px;"></span><span class=3D"i=
con" title=3D"Warning" aria-live=3D"off"></span><span
class=3D"message-body-wrappe=
r">Sun Feb 25 00:03:56 GMT-600 2018 org.ovirt.engine.ui.webadmin.plugin.Plug=
inManager
WARNING: Plugin [HelloWorld] removed from service due to failure</span></di=
v></div><div class=3D"cm-s-mozilla message console-api warn warn"
aria-live=3D"p=
olite"><span
class=3D"message-body-wrapper"><br></span></div><div
class=3D"cm-s-=
mozilla message console-api warn warn" aria-live=3D"polite"><span
class=3D"messa=
ge-body-wrapper"><br></span></div><div
class=3D"cm-s-mozilla message console-a=
pi warn warn" aria-live=3D"polite"><span
class=3D"message-body-wrapper">However =
if I remove the line:</span></div><div class=3D"cm-s-mozilla message
console-a=
pi warn warn" aria-live=3D"polite"><span
class=3D"message-body-wrapper"><br></sp=
an></div><div class=3D"cm-s-mozilla message console-api warn warn"
aria-live=3D"=
polite"><span
class=3D"message-body-wrapper"> api.addMainTab('FooTab','xt=
ab123','<a
href=3D"http://foo.com">http://foo.com</a>/‘);</span></div><d=
iv class=3D"cm-s-mozilla message console-api warn warn"
aria-live=3D"polite"><sp=
an class=3D"message-body-wrapper"><br></span></div><div
class=3D"cm-s-mozilla me=
ssage console-api warn warn" aria-live=3D"polite"><span
class=3D"message-body-wr=
apper">And replace it with something simple like:</span></div><div
class=3D"cm=
-s-mozilla message console-api warn warn" aria-live=3D"polite"><span
class=3D"me=
ssage-body-wrapper"><br></span></div><div
class=3D"cm-s-mozilla message consol=
e-api warn warn" aria-live=3D"polite">alert(‘Test
123’);</div><div=
class=3D"cm-s-mozilla message console-api warn warn"
aria-live=3D"polite"><br><=
/div><div class=3D"cm-s-mozilla message console-api warn warn"
aria-live=3D"poli=
te">There are no errors and the alert fires as it should.</div><div
class=3D"c=
m-s-mozilla message console-api warn warn"
aria-live=3D"polite"><br></div><div=
class=3D"cm-s-mozilla message console-api warn warn"
aria-live=3D"polite"><br><=
/div><div class=3D"cm-s-mozilla message console-api warn warn"
aria-live=3D"poli=
te">Any ideas of what I might be missing?</div><div
class=3D"cm-s-mozilla mess=
age console-api warn warn"
aria-live=3D"polite"><br></div><div class=3D"cm-s-moz=
illa message console-api warn warn" aria-live=3D"polite">I am running
oVirt 4.=
2.1 on CentOS – Hosted Engine setup with 1 host for
testing.</div><div=
class=3D"cm-s-mozilla message console-api warn warn"
aria-live=3D"polite"><br><=
/div><div class=3D"cm-s-mozilla message console-api warn warn"
aria-live=3D"poli=
te">Thanks</div><div class=3D"cm-s-mozilla message console-api warn
warn" aria=
-live=3D"polite"><br></div><div class=3D"cm-s-mozilla
message console-api warn w=
arn"
aria-live=3D"polite">Zip</div><div><br></div><blockquote
style=3D"margin:0 =
0 0 40px; border:none;
padding:0px;"><div><br></div></blockquote><span
id=3D"O=
LK_SRC_BODY_SECTION"><blockquote style=3D"margin:0 0 0 40px; border:none;
padd=
ing:0px;"><div style=3D"font-family:Calibri; font-size:11pt;
text-align:left; =
color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-B=
OTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt s=
olid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt"><span
style=3D"font-weight:=
bold">From: </span> Alexander Wels <<a
href=3D"mailto:awels@redhat.com">awe=
ls(a)redhat.com</a>&gt;<br><span
style=3D"font-weight:bold">Date: </span> Monday=
, February 19, 2018 at 7:54 AM<br><span
style=3D"font-weight:bold">To: </span>=
"<a href=3D"mailto:users@ovirt.org">users@ovirt.org</a>"
<<a href=3D"mailto:=
users@ovirt.org">users(a)ovirt.org</a>&gt;<br><span
style=3D"font-weight:bold">C=
c: </span> Preston <<a
href=3D"mailto:plord@inetx.ca">plord@inetx.ca</a>>=
;<br><span style=3D"font-weight:bold">Subject: </span> Re:
[ovirt-users] oVirt=
4.2 WebUI Plugin API
Docs?<br></div><div><br></div></blockquote><div><div><=
blockquote style=3D"margin:0 0 0 40px; border:none;
padding:0px;"><div>On Frid=
ay, February 16, 2018 6:31:10 PM EST Zip wrote:</div><blockquote
id=3D"MAC_OUT=
LOOK_ATTRIBUTION_BLOCKQUOTE" style=3D"BORDER-LEFT: #b5c4df 5 solid; PADDING:0 =
0 0 5; MARGIN:0 0 0 5;"><div> Are there any updated docs for the WebUI
Plugi=
ns API?</div><div>
</div></blockquote><div><br></div><div>Unfortunately
no, =
I haven't had a chance to create updated documentation. </div><div>However
t=
he first two links are mostly still accurate as we haven't done any
</div><d=
iv>major changes to the
API.</div><div><br></div><div>Some things to note th=
at are different from the API documentation in https://</div><div>www.ovirt.=
org/develop/release-management/features/ux/uiplugins/ for
4.2:</div><div><br=
</div><div>- alignRight no longer has any effect, as the
UI in 4.2 no longe=
r respects it.</div><div>- none of the
systemTreeNode selection code does an=
ything (since there is no </div><div>more system tree)</div><div>-
As noted =
in the documentation itself the RestApiSessionAcquired is no longer </div><d=
iv>available as we have a proper SSO mechanism that you can utilize at this =
</div><div>point.</div><div>- Main Tabs are now called Main Views
(but the a=
pi still calls them main tabs, </div><div>so use the apis described). And su=
b tabs are now called detail tabs, but the </div><div>same thing the API has=
n't changed the naming convention so use subTabs.</div><div>-
mainTabActionB=
utton location property no longer has any meaning and is </div><div>ignored.=
</div><div><br></div><div>That is it I think, we tried to
make it so existin=
g plugins would remain </div><div>working even if some options no longer mea=
n anything.</div><div><br></div><blockquote
id=3D"MAC_OUTLOOK_ATTRIBUTION_BLOC=
KQUOTE" style=3D"BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5=
;"><div> I have found the following which all appear to be old and no
longer=
working?</div><div> </div><div> <a
href=3D"https://www.ovirt.org/documentatio=
n/admin-guide/appe-oVirt_User_Interface_Pl">https://www.ovirt.org...
ion/admin-guide/appe-oVirt_User_Interface_Pl</a></div><div>
ugins/</div><div=
ugins/">https://www.ovirt.org/develop/release-management/features...
ns/</a></div><div> <a
href=3D"http://resources.ovirt.org/old-site-files/UI_Plu=
gins_at_oVirt_Workshop_Sunny">http://resources.ovirt.org/old-site...
lugins_at_oVirt_Workshop_Sunny</a></div><div>
vale_2013.pdf</div><div> </div=
<div> Thanks</div><div> </div><div>
Zip</div></blockquote><div><br></div><d=
iv><br></div><div><br></div></blockquote></div></div></span></body></html>
--B_3602362279_2373602--